Skip to content

Commit 745a01c

Browse files
fix: 修复文档问题
1 parent b5452e3 commit 745a01c

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

ui/src/components/app-table/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
:placeholder="`请输入${quickCreateName}`"
1010
class="w-500 mr-12"
1111
autofocus
12-
:maxlength="quickCreateMaxlength"
12+
:maxlength="quickCreateMaxlength || '-'"
1313
:show-word-limit="quickCreateMaxlength ? true : false"
1414
@keydown.enter="submitHandle"
1515
/>

ui/src/components/read-write/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
v-model="writeValue"
2020
placeholder="请输入"
2121
autofocus
22-
:maxlength="maxlength"
22+
:maxlength="maxlength || '-'"
2323
:show-word-limit="maxlength ? true : false"
24+
@keydown.enter="submit"
2425
></el-input>
2526
</div>
2627

ui/src/stores/modules/common.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
import { defineStore } from 'pinia'
2+
import type { pageRequest } from '@/api/type/common'
3+
4+
export interface commonTypes {
5+
breadcrumb: any
6+
paginationConfig: any | null
7+
search: any
8+
}
29

310
const useCommonStore = defineStore({
411
id: 'common',
5-
state: () => ({
6-
breadcrumb: null
12+
state: (): commonTypes => ({
13+
breadcrumb: null,
14+
// 搜索和分页缓存
15+
paginationConfig: null,
16+
search: null
717
}),
818
actions: {
919
saveBreadcrumb(data: any) {
1020
this.breadcrumb = data
21+
},
22+
savePage(val: string, data: pageRequest) {
23+
this.paginationConfig[val] = data
24+
},
25+
saveCondition(val: string, data: any) {
26+
this.search[val] = data
1127
}
1228
}
1329
})

ui/src/views/dataset/CreateDataset.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,18 @@ function clearStore() {
113113
}
114114
function submit() {
115115
loading.value = true
116-
const data = [] as any
116+
const documents = [] as any
117117
StepSecondRef.value?.paragraphList.map((item: any) => {
118-
data.push({
118+
documents.push({
119119
name: item.name,
120120
paragraphs: item.content
121121
})
122122
})
123-
const obj = { ...baseInfo.value, data } as datasetData
123+
const obj = { ...baseInfo.value, documents } as datasetData
124124
if (id) {
125125
// 上传文档
126126
document
127-
.asyncPostDocument(id as string, data)
127+
.asyncPostDocument(id as string, documents)
128128
.then(() => {
129129
MsgSuccess('提交成功')
130130
clearStore()

0 commit comments

Comments
 (0)