diff --git a/ui/src/layout/components/top-bar/avatar/ResetPassword.vue b/ui/src/layout/components/top-bar/avatar/ResetPassword.vue index 1d52a0193..47a85a1f5 100644 --- a/ui/src/layout/components/top-bar/avatar/ResetPassword.vue +++ b/ui/src/layout/components/top-bar/avatar/ResetPassword.vue @@ -6,7 +6,7 @@ :model="resetPasswordForm" :rules="rules" > -

{{ $t("layout.topbar.avatar.dialog.newPassword") }}

+

{{ $t('layout.topbar.avatar.dialog.newPassword') }}

-

{{ $t("layout.topbar.avatar.dialog.useEmail") }}

+

{{ $t('layout.topbar.avatar.dialog.useEmail') }}

- + - {{ isDisabled ? $t('layout.topbar.avatar.dialog.resend', { time }) : $t('layout.topbar.avatar.dialog.getVerificationCode') }} + {{ + isDisabled + ? $t('layout.topbar.avatar.dialog.resend', { time }) + : $t('layout.topbar.avatar.dialog.getVerificationCode') + }}
@@ -88,7 +100,13 @@ const time = ref(60) const rules = ref>({ // @ts-ignore - code: [{ required: true, message: t('layout.topbar.avatar.dialog.enterVerificationCode'), trigger: 'blur' }], + code: [ + { + required: true, + message: t('layout.topbar.avatar.dialog.enterVerificationCode'), + trigger: 'blur' + } + ], password: [ { required: true, @@ -131,7 +149,7 @@ const rules = ref>({ */ const sendEmail = () => { UserApi.sendEmailToCurrent(loading).then(() => { - MsgSuccess(t('verificationCodeSentSuccess')) + MsgSuccess(t('layout.topbar.avatar.dialog.verificationCodeSentSuccess')) isDisabled.value = true handleTimeChange() }) @@ -176,7 +194,5 @@ const close = () => { } defineExpose({ open, close }) - - diff --git a/ui/src/views/log/component/EditContentDialog.vue b/ui/src/views/log/component/EditContentDialog.vue index 97a91727a..b1febe3b8 100644 --- a/ui/src/views/log/component/EditContentDialog.vue +++ b/ui/src/views/log/component/EditContentDialog.vue @@ -18,15 +18,20 @@
- - + + (false) const loading = ref(false) @@ -151,6 +189,26 @@ watch(dialogVisible, (bool) => { } }) +const onUploadImg = async (files: any, callback: any) => { + const res = await Promise.all( + files.map((file: any) => { + return new Promise((rev, rej) => { + const fd = new FormData() + fd.append('file', file) + + imageApi + .postImage(fd) + .then((res: any) => { + rev(res) + }) + .catch((error) => rej(error)) + }) + }) + ) + + callback(res.map((item) => item.data)) +} + function changeDataset(id: string) { form.value.document_id = '' getDocument(id) diff --git a/ui/src/views/template/component/CreateModelDialog.vue b/ui/src/views/template/component/CreateModelDialog.vue index c1c352482..a42ebffd5 100644 --- a/ui/src/views/template/component/CreateModelDialog.vue +++ b/ui/src/views/template/component/CreateModelDialog.vue @@ -170,7 +170,7 @@ const model_form_field = ref>([]) const dialogVisible = ref(false) const base_form_data_rule = ref({ - name: { required: true, trigger: 'blur', message: '模型名不能为空' }, + name: { required: true, trigger: 'blur', message: '模型名称不能为空' }, permission_type: { required: true, trigger: 'change', message: '权限不能为空' }, model_type: { required: true, trigger: 'change', message: '模型类型不能为空' }, model_name: { required: true, trigger: 'change', message: '基础模型不能为空' } diff --git a/ui/src/views/template/component/EditModel.vue b/ui/src/views/template/component/EditModel.vue index 6901bd92a..422eff720 100644 --- a/ui/src/views/template/component/EditModel.vue +++ b/ui/src/views/template/component/EditModel.vue @@ -164,7 +164,7 @@ const model_form_field = ref>([]) const dialogVisible = ref(false) const base_form_data_rule = ref({ - name: { required: true, trigger: 'blur', message: '模型名不能为空' }, + name: { required: true, trigger: 'blur', message: '模型名称不能为空' }, model_type: { required: true, trigger: 'change', message: '模型类型不能为空' }, model_name: { required: true, trigger: 'change', message: '基础模型不能为空' } })