Skip to content

Commit 67ec325

Browse files
perf: Upgrade markdown editor version(#3322)
* perf: Optimize login loading issues * perf: Upgrade markdown editor version(#3322) --------- Co-authored-by: wangdan-fit2cloud <[email protected]>
1 parent 3d6bcb9 commit 67ec325

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"katex": "^0.16.10",
3535
"lodash": "^4.17.21",
3636
"marked": "^12.0.2",
37-
"md-editor-v3": "^4.16.7",
37+
"md-editor-v3": "^5.8.4",
3838
"mermaid": "^10.9.0",
3939
"mitt": "^3.0.0",
4040
"moment": "^2.30.1",

ui/src/views/login/index.vue

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@
4545
>
4646
</el-input>
4747

48-
<img :src="identifyCode" alt="" height="38" class="ml-8 cursor border border-r-4" @click="makeCode" />
48+
<img
49+
:src="identifyCode"
50+
alt=""
51+
height="38"
52+
class="ml-8 cursor border border-r-4"
53+
@click="makeCode"
54+
/>
4955
</div>
5056
</el-form-item>
5157
</div>
@@ -259,20 +265,25 @@ function changeMode(val: string) {
259265
}
260266
261267
const login = () => {
262-
loginFormRef.value?.validate().then(() => {
263-
loading.value = true
264-
user
265-
.login(
266-
loginMode.value,
267-
loginForm.value.username,
268-
loginForm.value.password,
269-
loginForm.value.captcha
270-
)
271-
.then(() => {
272-
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
273-
router.push({ name: 'home' })
274-
})
275-
.finally(() => (loading.value = false))
268+
if (!loginFormRef.value) {
269+
return
270+
}
271+
loginFormRef.value?.validate((valid) => {
272+
if (valid) {
273+
loading.value = true
274+
user
275+
.login(
276+
loginMode.value,
277+
loginForm.value.username,
278+
loginForm.value.password,
279+
loginForm.value.captcha
280+
)
281+
.then(() => {
282+
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
283+
router.push({ name: 'home' })
284+
})
285+
.finally(() => (loading.value = false))
286+
}
276287
})
277288
}
278289

ui/src/workflow/nodes/question-node/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
$t('views.application.applicationForm.form.prompt.tooltip')
8484
}}</template>
8585
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
86-
<el-icon><EditPen /></el-icon>
8786
</el-tooltip>
8887
</div>
8988
</template>

0 commit comments

Comments
 (0)