diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 7b943494..7b388d75 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -74,7 +74,7 @@ defineOptions({ name: 'MemberDetail' }) const activeName = ref('point') // 账户明细 选中的 tabs const loading = ref(true) // 加载中 -const user = ref() +const user = ref({}) /** 添加/修改操作 */ const formRef = ref() diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 066d5f79..0a45f17c 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -160,6 +160,7 @@ import { dateFormatter } from '@/utils/formatTime' import * as UserApi from '@/api/member/user' import { DICT_TYPE } from '@/utils/dict' +import UserForm from './UserForm.vue' import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue' import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue' @@ -218,6 +219,12 @@ const openDetail = (id: number) => { push({ name: 'MemberUserDetail', params: { id } }) } +/** 添加/修改操作 */ +const formRef = ref() +const openForm = (type: string, id?: number) => { + formRef.value.open(type, id) +} + /** 表格选中事件 */ const handleSelectionChange = (rows: UserApi.UserVO[]) => { selectedIds.value = rows.map((row) => row.id)