Skip to content

Commit f048b5a

Browse files
fix: The selection box for variables should support clearing.(#4515)
1 parent b26e9ed commit f048b5a

File tree

4 files changed

+21
-25
lines changed

4 files changed

+21
-25
lines changed

ui/src/locales/lang/zh-CN/workflow.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import tool from '@/api/tool/tool'
2-
import type {title} from 'process'
3-
41
export default {
52
node: '节点',
63
nodeName: '节点名称',
@@ -138,7 +135,7 @@ export default {
138135
fileUploadType: {
139136
label: '上传的文件类型',
140137
documentText: '需要使用“文档内容提取”节点解析文档内容',
141-
imageText: '需要使用“图片模型”节点解析图片内容',
138+
imageText: '需要使用“图片理解”节点解析图片内容',
142139
audioText: '需要使用“语音转文本”节点解析音频内容',
143140
videoText: '需要使用“视频理解”节点解析视频内容',
144141
otherText: '需要自行解析该类型文件',

ui/src/views/chat/user-login/scanCompinents/wecomQrCode.vue

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@
33
</template>
44

55
<script lang="ts" setup>
6-
import {useRoute, useRouter} from 'vue-router'
6+
import { useRoute, useRouter } from 'vue-router'
77
import * as ww from '@wecom/jssdk'
88
import {
99
WWLoginLangType,
1010
WWLoginPanelSizeType,
1111
WWLoginRedirectType,
12-
WWLoginType
12+
WWLoginType,
1313
} from '@wecom/jssdk'
14-
import {ref, nextTick, defineProps} from 'vue'
15-
import {MsgError} from '@/utils/message'
14+
import { ref, nextTick } from 'vue'
15+
import { MsgError } from '@/utils/message'
1616
import useStore from '@/stores'
17-
import {getBrowserLang} from '@/locales'
17+
import { getBrowserLang } from '@/locales'
1818
1919
const router = useRouter()
2020
const route = useRoute()
2121
const {
22-
params: {accessToken},
22+
params: { accessToken },
2323
} = route as any
2424
const wwLogin = ref({})
25-
const obj = ref<any>({isWeComLogin: false})
26-
const {chatUser} = useStore()
25+
const obj = ref<any>({ isWeComLogin: false })
26+
const { chatUser } = useStore()
2727
2828
const props = defineProps<{
2929
config: {
30-
callback_url: string;
30+
callback_url: string
3131
app_secret: string
3232
app_key: string
3333
corp_id?: string
@@ -39,7 +39,7 @@ const init = async () => {
3939
await nextTick() // 确保DOM已更新
4040
const data = {
4141
corpId: props.config.corp_id,
42-
agentId: props.config.agent_id
42+
agentId: props.config.agent_id,
4343
}
4444
const lang = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
4545
const redirectUri = props.config.callback_url
@@ -54,26 +54,25 @@ const init = async () => {
5454
state: 'fit2cloud-wecom-qr',
5555
lang: lang === 'zh-CN' || lang === 'zh-Hant' ? WWLoginLangType.zh : WWLoginLangType.en,
5656
redirect_type: WWLoginRedirectType.callback,
57-
panel_size: WWLoginPanelSizeType.small
57+
panel_size: WWLoginPanelSizeType.small,
5858
},
5959
onCheckWeComLogin: obj.value,
60-
async onLoginSuccess({code}: any) {
60+
async onLoginSuccess({ code }: any) {
6161
chatUser.wecomCallback(code, accessToken).then(() => {
6262
setTimeout(() => {
6363
router.push({
6464
name: 'chat',
65-
params: {accessToken: accessToken},
65+
params: { accessToken: accessToken },
6666
query: route.query,
6767
})
6868
})
6969
})
7070
},
7171
onLoginFail(err) {
7272
MsgError(`${err.errMsg}`)
73-
}
73+
},
7474
})
75-
} catch (error) {
76-
}
75+
} catch (error) {}
7776
}
7877
7978
init()
@@ -84,6 +83,5 @@ init()
8483
margin-top: -20px;
8584
height: 331px;
8685
justify-content: center;
87-
8886
}
8987
</style>

ui/src/workflow/common/NodeCascader.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
v-bind="$attrs"
88
v-model="data"
99
separator=" > "
10+
clearable
1011
>
1112
<template #default="{ node, data }">
1213
<span class="flex align-center" @wheel="wheel">

ui/src/workflow/common/data.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,10 @@ export const knowledgeLoopMenuNodes = [
851851
label: t('views.tool.dataSource.title'),
852852
list: [dataSourceLocalNode, dataSourceWebNode],
853853
},
854+
{
855+
label: t('views.knowledge.title'),
856+
list: [documentSplitNode, knowledgeWriteNode, documentExtractNode],
857+
},
854858
{
855859
label: t('workflow.nodes.classify.aiCapability'),
856860
list: [
@@ -866,10 +870,6 @@ export const knowledgeLoopMenuNodes = [
866870
questionNode,
867871
],
868872
},
869-
{
870-
label: t('views.knowledge.title'),
871-
list: [documentSplitNode, knowledgeWriteNode, documentExtractNode],
872-
},
873873
{
874874
label: t('workflow.nodes.classify.businessLogic'),
875875
list: [conditionNode, replyNode, loopContinueNode, loopBreakNode],

0 commit comments

Comments
 (0)