File tree Expand file tree Collapse file tree 4 files changed +25
-8
lines changed
Expand file tree Collapse file tree 4 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 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 />
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11import { 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
310const 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} )
Original file line number Diff line number Diff line change @@ -113,18 +113,18 @@ function clearStore() {
113113}
114114function 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 ()
You can’t perform that action at this time.
0 commit comments