@lambo-design/schema-paging-table 1.0.0-beta.65 → 1.0.0-beta.67
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 +14 -12
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.67",
|
|
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/
|
|
17
|
-
"@lambo-design/
|
|
14
|
+
"@lambo-design/core": "^4.7.1-beta.160",
|
|
15
|
+
"@lambo-design/shared": "^1.0.0-beta.260",
|
|
16
|
+
"@lambo-design/paging-table": "^1.0.0-beta.93",
|
|
17
|
+
"@lambo-design/schema-form": "^1.0.0-beta.87"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
|
package/src/index.vue
CHANGED
|
@@ -251,19 +251,19 @@ export default {
|
|
|
251
251
|
const conditionMet = item && typeof item.condition === "function" ? item.condition(param) : true;
|
|
252
252
|
const execConditionMet = item && typeof item.execCondition === "function" ? item.execCondition(param) : true;
|
|
253
253
|
if(conditionMet){
|
|
254
|
-
let
|
|
254
|
+
let dom
|
|
255
255
|
if (!execConditionMet) {
|
|
256
|
-
|
|
256
|
+
dom = item.name ? item.name : param.row[obj.key]
|
|
257
257
|
} else {
|
|
258
|
-
|
|
258
|
+
dom = operateHref(self, h, param.row, item.name || param.row[obj.key], (vm, currentRow) => {
|
|
259
259
|
self.handleClickEvent(item, currentRow)
|
|
260
260
|
}, '', item.permission)
|
|
261
261
|
}
|
|
262
262
|
let directives = item.permission ? [{ name: "permission", value: item.permission }] : null;
|
|
263
263
|
// 权限原因 导致按钮不可见 会影响更多按钮数量
|
|
264
264
|
if (visibleDomsd.length <= self.operColumnDropdownNum) {
|
|
265
|
-
visibleDomsd.push(
|
|
266
|
-
if (visibleDomsd.length
|
|
265
|
+
visibleDomsd.push(dom);
|
|
266
|
+
if (visibleDomsd.length >= self.operColumnDropdownNum) {
|
|
267
267
|
dropdownDomsd.push(h('DropdownItem', {
|
|
268
268
|
nativeOn: {
|
|
269
269
|
'click': () => {
|
|
@@ -271,8 +271,7 @@ export default {
|
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
273
|
directives
|
|
274
|
-
}, [
|
|
275
|
-
visibleDomsd.splice(self.operColumnDropdownNum, 1)
|
|
274
|
+
}, [dom]))
|
|
276
275
|
}
|
|
277
276
|
} else {
|
|
278
277
|
dropdownDomsd.push(h('DropdownItem', {
|
|
@@ -282,13 +281,16 @@ export default {
|
|
|
282
281
|
}
|
|
283
282
|
},
|
|
284
283
|
directives
|
|
285
|
-
}, [
|
|
284
|
+
}, [dom]))
|
|
286
285
|
}
|
|
287
286
|
}
|
|
288
287
|
})
|
|
288
|
+
if (visibleDomsd.length > self.operColumnDropdownNum) {
|
|
289
|
+
visibleDomsd.splice(self.operColumnDropdownNum - 1, 2)
|
|
290
|
+
}
|
|
289
291
|
return h('div', {}, [
|
|
290
292
|
...visibleDomsd,
|
|
291
|
-
dropdownDomsd.length
|
|
293
|
+
dropdownDomsd.length > 1 ? operateMore(self,h,dropdownDomsd) : null
|
|
292
294
|
]);
|
|
293
295
|
}
|
|
294
296
|
} else if (obj.hasOwnProperty('type') && (obj.type === 'selection'||obj.type === 'single-selection')) {
|
|
@@ -395,7 +397,7 @@ export default {
|
|
|
395
397
|
self.fetch(request, response)
|
|
396
398
|
}
|
|
397
399
|
} else if (item.clickEvent?.type === "method") {
|
|
398
|
-
if(!item.clickEvent?.method?.keys) {
|
|
400
|
+
if(!item.clickEvent?.method?.keys || item.clickEvent.method.keys.length === 0) {
|
|
399
401
|
self.$emit(item.clickEvent?.method?.name, currentRow._index,currentRow);
|
|
400
402
|
return ;
|
|
401
403
|
}
|
|
@@ -454,8 +456,8 @@ export default {
|
|
|
454
456
|
self.$router.push({ path: routeInfo.path, query })
|
|
455
457
|
} else {
|
|
456
458
|
const query = keysExist
|
|
457
|
-
|
|
458
|
-
|
|
459
|
+
? routeInfo.keys.reduce((acc, key) => ({ ...acc, [key]: selection[0][key] }), {})
|
|
460
|
+
: null;
|
|
459
461
|
self.$router.push({ path: routeInfo.path, query })
|
|
460
462
|
}
|
|
461
463
|
} else if (item.clickEvent?.type === "method") {
|