@lambo-design/schema-paging-table 1.0.0-beta.75 → 1.0.0-beta.77
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 +6 -2
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.77",
|
|
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/shared": "^1.0.0-beta.
|
|
17
|
-
"@lambo-design/
|
|
14
|
+
"@lambo-design/core": "^4.7.1-beta.167",
|
|
15
|
+
"@lambo-design/schema-form": "^1.0.0-beta.92",
|
|
16
|
+
"@lambo-design/shared": "^1.0.0-beta.283",
|
|
17
|
+
"@lambo-design/paging-table": "^1.0.0-beta.96"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
|
package/src/index.vue
CHANGED
|
@@ -306,7 +306,6 @@ export default {
|
|
|
306
306
|
textOverflow: 'ellipsis',
|
|
307
307
|
whiteSpace: 'nowrap'
|
|
308
308
|
}
|
|
309
|
-
console.log(style)
|
|
310
309
|
return h('span', {
|
|
311
310
|
style: style,
|
|
312
311
|
domProps: { title: item.name ? item.name : param.row[obj.key] }
|
|
@@ -318,6 +317,7 @@ export default {
|
|
|
318
317
|
} else if (obj.hasOwnProperty('type') && (obj.type === 'selection'||obj.type === 'single-selection')) {
|
|
319
318
|
this.selectCondition = item.selectCondition ? item.selectCondition : ''
|
|
320
319
|
} else if (item.tooltip) {
|
|
320
|
+
if(typeof obj.render !== 'function')
|
|
321
321
|
obj.render = (h, param) => {
|
|
322
322
|
return h('span', {
|
|
323
323
|
style: {
|
|
@@ -391,8 +391,12 @@ export default {
|
|
|
391
391
|
let query = item.clickEvent?.route?.keys?.reduce((acc, sourceItem) => {
|
|
392
392
|
return Object.assign(acc, {[sourceItem]: currentRow[sourceItem]})
|
|
393
393
|
}, {})
|
|
394
|
+
// 解析路由路径中的动态参数,将{key}格式的占位符替换为currentRow中对应的值
|
|
395
|
+
// 例如:/?user={id} 会被替换为 /?user=123(假设currentRow.id为123)
|
|
396
|
+
// 如果currentRow中不存在对应key的值,则替换为空字符串
|
|
397
|
+
let targetPath = item.clickEvent?.route?.path.replace(/\{([^}]+)\}/g, (match, key) => currentRow[key] || '');
|
|
394
398
|
self.$router.push({
|
|
395
|
-
path:
|
|
399
|
+
path: targetPath,
|
|
396
400
|
query
|
|
397
401
|
})
|
|
398
402
|
} else if (item.clickEvent?.type === "request") {
|