@lambo-design/schema-paging-table 1.0.0-beta.36 → 1.0.0-beta.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/index.vue +26 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/schema-paging-table",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"standard-version": "^9.5.0",
|
|
14
|
-
"@lambo-design/
|
|
15
|
-
"@lambo-design/
|
|
16
|
-
"@lambo-design/schema-form": "^1.0.0-beta.
|
|
17
|
-
"@lambo-design/
|
|
14
|
+
"@lambo-design/shared": "^1.0.0-beta.205",
|
|
15
|
+
"@lambo-design/paging-table": "^1.0.0-beta.78",
|
|
16
|
+
"@lambo-design/schema-form": "^1.0.0-beta.61",
|
|
17
|
+
"@lambo-design/core": "^4.7.1-beta.139"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
|
package/src/index.vue
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
<LamboPagingTable
|
|
3
3
|
ref="schemaPagingTable"
|
|
4
4
|
:dataUrl="dataUrl"
|
|
5
|
+
:data="data"
|
|
5
6
|
:columns="tableColumn"
|
|
6
7
|
:autoSearch="autoSearch"
|
|
7
8
|
:searchParams="tableSearchParams"
|
|
8
9
|
:transformResponse="transformResponse"
|
|
9
10
|
:showTableOption="showTableOption"
|
|
11
|
+
:showOptionLayout="showOptionLayout"
|
|
12
|
+
:pageDisable="pageDisable"
|
|
10
13
|
@on-row-click="onRowClick"
|
|
11
14
|
@on-selection-change="onSelectionChange"
|
|
12
15
|
@on-select="onSelect"
|
|
@@ -88,6 +91,12 @@ export default {
|
|
|
88
91
|
required: true,
|
|
89
92
|
default: ''
|
|
90
93
|
},
|
|
94
|
+
data: {
|
|
95
|
+
type: Array,
|
|
96
|
+
default() {
|
|
97
|
+
return [];
|
|
98
|
+
}
|
|
99
|
+
},
|
|
91
100
|
autoSearch: {
|
|
92
101
|
type: Boolean,
|
|
93
102
|
required: false,
|
|
@@ -104,6 +113,15 @@ export default {
|
|
|
104
113
|
type: Boolean,
|
|
105
114
|
default: true
|
|
106
115
|
},
|
|
116
|
+
showOptionLayout: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: true
|
|
119
|
+
},
|
|
120
|
+
//是否禁用分页
|
|
121
|
+
pageDisable: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
},
|
|
107
125
|
rowKey: {
|
|
108
126
|
type: String,
|
|
109
127
|
require: false,
|
|
@@ -210,6 +228,10 @@ export default {
|
|
|
210
228
|
self.fetch(request, response)
|
|
211
229
|
}
|
|
212
230
|
} else if (item.clickEvent?.type === "method") {
|
|
231
|
+
if(!item.clickEvent?.method?.keys) {
|
|
232
|
+
self.$emit(item.clickEvent?.method?.name, param.index);
|
|
233
|
+
return ;
|
|
234
|
+
}
|
|
213
235
|
let args = item.clickEvent?.method?.keys?.reduce((total, current) => {
|
|
214
236
|
return Object.assign(total, {[current]: currentRow[current]})
|
|
215
237
|
}, {})
|
|
@@ -342,8 +364,10 @@ export default {
|
|
|
342
364
|
self.$router.push({ path: routeInfo.path, query })
|
|
343
365
|
}
|
|
344
366
|
} else if (item.clickEvent?.type === "method") {
|
|
367
|
+
const methodInfo = item.clickEvent.method;
|
|
368
|
+
const keysExist = methodInfo.keys && methodInfo.keys.length !== 0;
|
|
345
369
|
let selection = self.getSelection()
|
|
346
|
-
if (
|
|
370
|
+
if (keysExist && selection.length === 0) {
|
|
347
371
|
self.$Message.info('请选择一条记录!')
|
|
348
372
|
return
|
|
349
373
|
}
|
|
@@ -374,6 +398,7 @@ export default {
|
|
|
374
398
|
},
|
|
375
399
|
doSearch: function () {
|
|
376
400
|
this.tableSearchParams = Object.assign({}, this.queryForm)
|
|
401
|
+
this.clearSelectData();
|
|
377
402
|
},
|
|
378
403
|
onReset() {
|
|
379
404
|
// Object.assign(this.queryForm, this.$options.propsData.form)
|