@lambo-design/schema-paging-table 1.0.0-beta.27 → 1.0.0-beta.29
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 +4 -4
- package/src/index.vue +61 -54
- package/.versionrc +0 -23
- package/CHANGELOG.md +0 -31
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.29",
|
|
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/schema-form": "^1.0.0-beta.54",
|
|
14
|
+
"@lambo-design/core": "^4.7.1-beta.139",
|
|
16
15
|
"@lambo-design/paging-table": "^1.0.0-beta.77",
|
|
17
|
-
"@lambo-design/
|
|
16
|
+
"@lambo-design/shared": "^1.0.0-beta.199",
|
|
17
|
+
"@lambo-design/schema-form": "^1.0.0-beta.55"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
|
package/src/index.vue
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</template>
|
|
59
59
|
<script>
|
|
60
60
|
import ajax from '@lambo-design/shared/utils/ajax'
|
|
61
|
-
import {
|
|
61
|
+
import {operateBtn, operateHref, operateMore} from '@lambo-design/shared/utils/assist'
|
|
62
62
|
import LamboPagingTable from '@lambo-design/paging-table'
|
|
63
63
|
// import LamboSchemaForm from '@lambo-design/schema-form'
|
|
64
64
|
// const LamboSchemaForm = ()=> import('@lambo-design/schema-form')
|
|
@@ -166,60 +166,67 @@ export default {
|
|
|
166
166
|
}
|
|
167
167
|
}else if(obj.hasOwnProperty("type") && obj.type === "operate"){
|
|
168
168
|
obj.render = (h, param) => {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
});
|
|
201
|
-
}else{
|
|
202
|
-
self.fetch(request,response)
|
|
169
|
+
let visibleDomsd = [];
|
|
170
|
+
let dropdownDomsd = [];
|
|
171
|
+
obj.button.map((item, index) => {
|
|
172
|
+
let doms = operateHref(self, h, param.row, item.name || param.row[obj.key], (vm, currentRow) => {
|
|
173
|
+
if (item.clickEvent?.type === "route") {
|
|
174
|
+
// self.$Message.info(item.clickEvent.name)
|
|
175
|
+
let query = item.clickEvent?.route?.keys?.reduce((acc, sourceItem) => {
|
|
176
|
+
return Object.assign(acc, {[sourceItem]: currentRow[sourceItem]})
|
|
177
|
+
}, {})
|
|
178
|
+
self.$router.push({
|
|
179
|
+
path: item.clickEvent?.route?.path,
|
|
180
|
+
query
|
|
181
|
+
})
|
|
182
|
+
} else if (item.clickEvent?.type === "request") {
|
|
183
|
+
// self.$Message.info(item.clickEvent.name)
|
|
184
|
+
let data = item.clickEvent?.request?.keys?.reduce((acc, sourceItem) => {
|
|
185
|
+
return Object.assign(acc, {[sourceItem]: currentRow[sourceItem]})
|
|
186
|
+
}, {})
|
|
187
|
+
let request = {
|
|
188
|
+
url: item.clickEvent.request.url,
|
|
189
|
+
method: item.clickEvent.request.method,
|
|
190
|
+
param: data,
|
|
191
|
+
}
|
|
192
|
+
let response = item.clickEvent.response
|
|
193
|
+
if (item.clickEvent.tips) {
|
|
194
|
+
let tips = item.clickEvent.tips
|
|
195
|
+
this.$Modal.confirm({
|
|
196
|
+
title: tips.title,
|
|
197
|
+
content: '<p>' + tips.content + '</p>',
|
|
198
|
+
onOk: () => {
|
|
199
|
+
self.fetch(request, response)
|
|
203
200
|
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
},{})
|
|
208
|
-
self.$emit(item.clickEvent?.method?.name,args)
|
|
209
|
-
}else if(item.clickEvent?.type==="modal"){
|
|
210
|
-
self.$Message.info(item.clickEvent.name)
|
|
211
|
-
}
|
|
212
|
-
},item.permission)
|
|
213
|
-
|
|
214
|
-
if(item && typeof item.condition == "function"){
|
|
215
|
-
if(item.condition(param)){
|
|
216
|
-
return doms
|
|
217
|
-
}
|
|
218
|
-
}else{
|
|
219
|
-
return doms
|
|
201
|
+
});
|
|
202
|
+
} else {
|
|
203
|
+
self.fetch(request, response)
|
|
220
204
|
}
|
|
221
|
-
})
|
|
222
|
-
|
|
205
|
+
} else if (item.clickEvent?.type === "method") {
|
|
206
|
+
let args = item.clickEvent?.method?.keys?.reduce((total, current) => {
|
|
207
|
+
return Object.assign(total, {[current]: currentRow[current]})
|
|
208
|
+
}, {})
|
|
209
|
+
self.$emit(item.clickEvent?.method?.name, args)
|
|
210
|
+
} else if (item.clickEvent?.type === "modal") {
|
|
211
|
+
self.$Message.info(item.clickEvent.name)
|
|
212
|
+
}
|
|
213
|
+
}, item.permission)
|
|
214
|
+
|
|
215
|
+
const conditionMet = item && typeof item.condition === "function" ? item.condition(param) : true;
|
|
216
|
+
if (index < 3) {
|
|
217
|
+
if (conditionMet) {
|
|
218
|
+
visibleDomsd.push(doms);
|
|
219
|
+
}
|
|
220
|
+
} else {
|
|
221
|
+
if (conditionMet) {
|
|
222
|
+
dropdownDomsd.push(h('DropdownItem', {}, [doms]));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
})
|
|
226
|
+
return h('div', {}, [
|
|
227
|
+
...visibleDomsd,
|
|
228
|
+
dropdownDomsd.length !== 0 ? operateMore(self, h, dropdownDomsd) : null
|
|
229
|
+
]);
|
|
223
230
|
}
|
|
224
231
|
}
|
|
225
232
|
columns.push(item)
|
|
@@ -302,7 +309,7 @@ export default {
|
|
|
302
309
|
let self = this;
|
|
303
310
|
if (item.clickEvent?.type === "route") {
|
|
304
311
|
const routeInfo = item.clickEvent.route;
|
|
305
|
-
const keysExist = routeInfo.keys && self.multiSelect;
|
|
312
|
+
const keysExist = routeInfo.keys && routeInfo.keys.length !== 0 && self.multiSelect;
|
|
306
313
|
const selection = keysExist ? self.getSelection() : null;
|
|
307
314
|
if (keysExist && selection.length !== 1) {
|
|
308
315
|
self.$Message.info('请只选择一条记录!');
|
package/.versionrc
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tagPrefix": "@lambo-design/schema-paging-table@",
|
|
3
|
-
"releaseCommitMessageFormat": "chore(release): @lambo-design/schema-paging-table@{{currentTag}}",
|
|
4
|
-
"path": ".",
|
|
5
|
-
"header": "# Changelog",
|
|
6
|
-
"types": [
|
|
7
|
-
{"type": "chore", "section":"'🎫 Chores | 其他更新", "hidden": false},
|
|
8
|
-
{"type": "revert", "section":"⏪ Reverts | 回退", "hidden": false},
|
|
9
|
-
{"type": "feat", "section": "✨ Features | 新功能", "hidden": false},
|
|
10
|
-
{"type": "fix", "section": "🐛 Bug Fixes | Bug 修复", "hidden": false},
|
|
11
|
-
{"type": "improvement", "section": "Feature Improvements", "hidden": false},
|
|
12
|
-
{"type": "docs", "section":"📝 Documentation | 文档", "hidden": false},
|
|
13
|
-
{"type": "style", "section":"💄 Styles | 风格", "hidden": false},
|
|
14
|
-
{"type": "refactor", "section":"💄 Styles | 风格", "hidden": false},
|
|
15
|
-
{"type": "perf", "section":"⚡ Performance Improvements | 性能优化", "hidden": false},
|
|
16
|
-
{"type": "test", "section":"✅ Tests | 测试", "hidden": false},
|
|
17
|
-
{"type": "build", "section":"👷 Build System | 构建", "hidden": false},
|
|
18
|
-
{"type": "ci", "section":"🔧 Continuous Integration | CI 配置", "hidden":false}
|
|
19
|
-
],
|
|
20
|
-
"commitUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/{{hash}}",
|
|
21
|
-
"compareUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/{{previousTag}}...{{currentTag}}",
|
|
22
|
-
"issueUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/issues/{{id}}"
|
|
23
|
-
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
## [1.0.0-beta.27](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/schema-paging-table@1.0.0-beta.26...@lambo-design/schema-paging-table@1.0.0-beta.27) (2024-06-18)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### ✨ Features | 新功能
|
|
6
|
-
|
|
7
|
-
* **schema-paging-table:** 表格上按钮带参路由跳转bug修复 ([cf055a8](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/cf055a8cedbc662017c04b72f6aa35125b3b11e0))
|
|
8
|
-
|
|
9
|
-
## [1.0.0-beta.26](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/schema-paging-table@1.0.0-beta.24...@lambo-design/schema-paging-table@1.0.0-beta.26) (2024-06-15)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### 💄 Styles | 风格
|
|
13
|
-
|
|
14
|
-
* **CHANGELOG合规性改造:** CHANGELOG模板变更 ([f3d224b](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/f3d224bad70714fe23f6352629301118a3a2f54e))
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### '🎫 Chores | 其他更新
|
|
18
|
-
|
|
19
|
-
* **release:** 1.0.0-beta.25 ([90e96a6](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/90e96a6108eac5dc218bf75f407fa811b36ed162))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### ✨ Features | 新功能
|
|
23
|
-
|
|
24
|
-
* **schema-paging-table:** 默认值查询条件请求次数优化 ([2878f66](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/2878f667af042b931ee928867de53a40df4ea154))
|
|
25
|
-
|
|
26
|
-
## [1.0.0-beta.25](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/schema-paging-table@1.0.0-beta.24...@lambo-design/schema-paging-table@1.0.0-beta.25) (2024-04-07)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### 💄 Styles | 风格
|
|
30
|
-
|
|
31
|
-
* **CHANGELOG合规性改造:** CHANGELOG模板变更 ([f3d224b](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/f3d224bad70714fe23f6352629301118a3a2f54e))
|