|
@@ -15,7 +15,6 @@ import useFetch from '@/hooks/useFetch'
|
|
import useVModel from '@/hooks/useVModel'
|
|
import useVModel from '@/hooks/useVModel'
|
|
import useVW from '@/hooks/useVW'
|
|
import useVW from '@/hooks/useVW'
|
|
import useForm from '@/hooks/useForm'
|
|
import useForm from '@/hooks/useForm'
|
|
-import useMainStore from '@/store/main'
|
|
|
|
import BaseForm from '@/components/element/BaseForm.vue'
|
|
import BaseForm from '@/components/element/BaseForm.vue'
|
|
import BaseDialog from '@/components/element/BaseDialog.vue'
|
|
import BaseDialog from '@/components/element/BaseDialog.vue'
|
|
import ConfirmButton from '@/components/common/ConfirmButton.vue'
|
|
import ConfirmButton from '@/components/common/ConfirmButton.vue'
|
|
@@ -23,25 +22,24 @@ import ConfirmButton from '@/components/common/ConfirmButton.vue'
|
|
import type { EpFormItem, EpFormRules } from 'global-type'
|
|
import type { EpFormItem, EpFormRules } from 'global-type'
|
|
|
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
|
+ userName: string
|
|
modelValue: boolean
|
|
modelValue: boolean
|
|
}>()
|
|
}>()
|
|
|
|
|
|
const visible = useVModel(props, 'modelValue')
|
|
const visible = useVModel(props, 'modelValue')
|
|
|
|
|
|
-const mainStore = useMainStore()
|
|
|
|
-
|
|
|
|
const { formRef, elFormRef } = useForm()
|
|
const { formRef, elFormRef } = useForm()
|
|
|
|
|
|
const userModel = reactive<{ name: string; password: string; rePassword?: string }>({
|
|
const userModel = reactive<{ name: string; password: string; rePassword?: string }>({
|
|
- name: '',
|
|
|
|
|
|
+ name: props.userName,
|
|
password: '',
|
|
password: '',
|
|
rePassword: '',
|
|
rePassword: '',
|
|
})
|
|
})
|
|
|
|
|
|
watch(
|
|
watch(
|
|
- () => mainStore.myUserInfo,
|
|
|
|
|
|
+ () => props.userName,
|
|
() => {
|
|
() => {
|
|
- userModel.name = mainStore?.myUserInfo?.name || ''
|
|
|
|
|
|
+ userModel.name = props.userName
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|