wupengfei
昨天 e372854c71bc97d162452cc4b3f5cfa586da50a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<template>
  <ContentScrollView hasPaddingTop style="background-color: transparent">
    <EditElectricUserAccount :id="id" @success="handleSuccess" ref="editElectricUserAccountRef" />
  </ContentScrollView>
  <PageFooter>
    <PageFooterBtn type="primary" @click="handleSave">保存</PageFooterBtn>
  </PageFooter>
</template>
 
<script setup lang="ts">
import Taro from '@tarojs/taro';
import { EditElectricUserAccount } from '@life-payment/components';
import { goBack } from '@/utils';
import type { ComponentExposed } from 'vue-component-type-helpers';
 
defineOptions({
  name: 'InnerPage',
});
 
const router = Taro.useRouter();
const id = router.params?.id ?? '';
 
const editElectricUserAccountRef = useTemplateRef<ComponentExposed<typeof EditElectricUserAccount>>(
  'editElectricUserAccountRef'
);
 
function handleSave() {
  editElectricUserAccountRef.value?.handleSave?.();
}
 
function handleSuccess() {
  goBack();
}
</script>