|
@@ -328,8 +328,10 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
|
const submitForm = async () => {
|
|
|
formData.value.userType = userTypeG.value
|
|
|
- formData.value.username = 'abc0123'
|
|
|
- formData.value.password = 'abc0123'
|
|
|
+ if (formType.value === 'create') {
|
|
|
+ formData.value.username = 'abc0123'
|
|
|
+ formData.value.password = 'abc0123'
|
|
|
+ }
|
|
|
// 校验表单
|
|
|
if (!formRef) return
|
|
|
const valid = await formRef.value.validate()
|