diff --git a/ui/src/layout/components/top-bar/avatar/ResetPasssword.vue b/ui/src/layout/components/top-bar/avatar/ResetPasssword.vue
index eedb9e29e..c063eb7f2 100644
--- a/ui/src/layout/components/top-bar/avatar/ResetPasssword.vue
+++ b/ui/src/layout/components/top-bar/avatar/ResetPasssword.vue
@@ -41,8 +41,13 @@
- 获取验证码
+ {{ isDisabled ? `重新发送(${time}s)` : '获取验证码' }}
@@ -77,6 +82,8 @@ const resetPasswordForm = ref({
const resetPasswordFormRef = ref()
const loading = ref(false)
+const isDisabled = ref(false)
+const time = ref(60)
const rules = ref>({
code: [{ required: true, message: '请输入验证码' }],
@@ -123,9 +130,23 @@ const rules = ref>({
const sendEmail = () => {
UserApi.sendEmailToCurrent(loading).then(() => {
MsgSuccess('发送验证码成功')
+ isDisabled.value = true
+ handleTimeChange()
})
}
+const handleTimeChange = () => {
+ if (time.value <= 0) {
+ isDisabled.value = false
+ time.value = 60
+ } else {
+ setTimeout(() => {
+ time.value--
+ handleTimeChange()
+ }, 1000)
+ }
+}
+
const open = () => {
resetPasswordForm.value = {
code: '',
diff --git a/ui/src/views/applicaiton-overview/component/APIKeyDialog.vue b/ui/src/views/applicaiton-overview/component/APIKeyDialog.vue
index d95bcaa34..347d7069e 100644
--- a/ui/src/views/applicaiton-overview/component/APIKeyDialog.vue
+++ b/ui/src/views/applicaiton-overview/component/APIKeyDialog.vue
@@ -24,7 +24,7 @@
{{ datetimeFormat(row.create_time) }}
-
+
diff --git a/ui/src/views/application/CreateAndSetting.vue b/ui/src/views/application/CreateAndSetting.vue
index df64ea602..a99d05771 100644
--- a/ui/src/views/application/CreateAndSetting.vue
+++ b/ui/src/views/application/CreateAndSetting.vue
@@ -40,7 +40,7 @@
type="textarea"
placeholder="描述该应用的应用场景及用途,如:MaxKB 小助手回答用户提出的 MaxKB 产品使用问题"
:rows="3"
- maxlength="500"
+ maxlength="256"
show-word-limit
/>
@@ -109,6 +109,7 @@
v-model="applicationForm.model_setting.prompt"
:rows="6"
type="textarea"
+ maxlength="2048"
:placeholder="defaultPrompt"
/>
diff --git a/ui/src/views/dataset/component/BaseForm.vue b/ui/src/views/dataset/component/BaseForm.vue
index 73bec9e17..a196c46b9 100644
--- a/ui/src/views/dataset/component/BaseForm.vue
+++ b/ui/src/views/dataset/component/BaseForm.vue
@@ -21,7 +21,7 @@
v-model="form.desc"
type="textarea"
placeholder="描述知识库的内容,详尽的描述将帮助AI能深入理解该知识库的内容,能更准确的检索到内容,提高该知识库的命中率。"
- maxlength="500"
+ maxlength="256"
show-word-limit
:autosize="{ minRows: 3 }"
@blur="form.desc = form.desc.trim()"
diff --git a/ui/src/views/document/component/ImportDocumentDialog.vue b/ui/src/views/document/component/ImportDocumentDialog.vue
index 0d191cbcb..219e0a9db 100644
--- a/ui/src/views/document/component/ImportDocumentDialog.vue
+++ b/ui/src/views/document/component/ImportDocumentDialog.vue
@@ -34,7 +34,7 @@
@@ -42,6 +42,7 @@