@bsgoal/common 2.15.3 → 2.15.5
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/dist/index.mjs +2313 -2304
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +14 -14
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-search-table/index.vue +8 -2
- package/src/components/bsgoal-base-sizes/index.vue +1 -2
- package/src/components/bsgoal-base-table/index.vue +23 -8
- package/src/components/bsgoal-base-tree-table/demo.vue +5 -1
- package/src/components/bsgoal-base-tree-table/index.vue +10 -5
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.base_tooltip_popper{max-width:20em}.bsgoal-base-form .base_form .el-form-item{margin-right:10px}.bsgoal-base-form .base_form div.el-input,.bsgoal-base-form .base_form div.el-select{width:100%}.bsgoal-base-form .base_form--visible{width:0px;height:0px;overflow:hidden}.bsgoal-base-sizes{display:inline-block}.bsgoal-base-sizes .base_sizes_input{cursor:pointer;margin-left:16px}.bsgoal-base-sizes .base_sizes_item{text-align:center;font-size:14px;padding:0 20px;color:#606266;height:34px;line-height:34px;cursor:pointer}.bsgoal-base-sizes .base_sizes_item:hover{background-color:#f5f7fa}.bsgoal-base-sizes .base_sizes_item--selected{color:#409eff;font-weight:700}.bsgoal-base-sizes .bsgoal_micro_app .el-input__suffix{margin-right:8px!important}.bsgoal-base-table-pagination{text-align:right}.bsgoal-base-table-pagination .base_table_pagination{display:inline-block;margin-top:16px}.bsgoal-base-table-empty .base_table_empty{text-align:center}.bsgoal-base-table-empty .base_table_empty_img{padding-top:16px;line-height:initial}.bsgoal-base-table-empty .base_table_empty_text{display:inline-block}.bsgoal-base-table .base_table{padding:16px}.bsgoal-base-table .base_table_menu{margin-bottom:8px}.bsgoal-base-table .el-table__body-wrapper{overflow-y:hidden!important}.bsgoal-base-table .el-scrollbar__view{height:100%}.bsgoal-base-table .base_table--tree{margin-top:10px}.bsgoal-base-table th>div.cell{white-space:nowrap}.bsgoal-base-line .base_line{height:10px;background-color:#f0f2f5}.bsgoal-base-line .bsgoal-base-line__vertical{display:inline-block;height:100%}.bsgoal-base-line .base_line__vertical{width:10px;height:100%}.bsgoal-base-line .bsgoal-base-line__fill{position:absolute;left:0;right:0}.bsgoal-base-search-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:33.5px}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{height:100%;width:100%}.bsgoal-base-cascader .base_cascader{width:inherit;height:inherit}.bsgoal-base-search .base_search{padding:16px 6px 8px 16px}.bsgoal-base-search .base_search .el-form-item{margin-bottom:8px;margin-right:10px}.bsgoal-base-search .base_search div.el-input,.bsgoal-base-search .base_search div.el-select{width:100%}.bsgoal-base-search .el-col{margin-bottom:0!important}.bsgoal-base-tree-fold .base_tree_fold{position:absolute;top:0;bottom:0;right:10px;margin:auto;width:14px;height:38px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:10px;background-color:var(--el-color-primary)}.bsgoal-base-tree-fold .base_tree_fold--hide{right:0px}.bsgoal-base-tree{display:inline-block}.bsgoal-base-tree .base_tree{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;min-width:14px}.bsgoal-base-tree .base_tree_main{width:221px;padding:16px;scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:auto}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar{width:6px;height:6px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.2);width:20px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-track{background-color:#fff}.bsgoal-base-tree .base_tree_main_input{margin-bottom:10px}.bsgoal-base-tree .base_tree .el-tree-node__content>i.el-tree-node__expand-icon{padding-left:0}.bsgoal-base-tree .base_tree_node{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_label{-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_icon{-webkit-box-flex:0;-ms-flex:none;flex:none}.bsgoal-base-button,.bsgoal-base-button .base_button{display:inline-block}.bsgoal-base-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal-dialog__footer--conceal .el-dialog__footer{display:none}.bsgoal-base-dialog .el-dialog__footer{height:initial;line-height:initial}.bsgoal-base-dialog .el-dialog__footer .el-button{margin-left:initial}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa;height:initial!important}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header .el-dialog__headerbtn{top:0px;right:8px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__body{padding:0}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content{padding:30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form{padding:0 0 0 30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form .bsgoal-base-form .base_form{padding:initial;padding-top:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--blank{padding-top:0}.bsgoal-base-dialog .base_dialog_footer_cancel{margin-right:16px}.bsgoal-base-tabs .base_tabs--fill{position:absolute;top:8px;bottom:0;left:16px;right:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.bsgoal-base-tabs .base_tabs--fill>div.el-tabs__content{-webkit-box-flex:1;-ms-flex:1;flex:1;position:relative}.bsgoal-base-alert .el-alert,.bsgoal-base-item .base_item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bsgoal-base-item .base_item_label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#606266;height:32px;line-height:32px;padding-right:12px}.bsgoal-base-tree-table .base_tree_table{display:-webkit-box;display:-ms-flexbox;display:flex}.bsgoal-base-tree-table .base_tree_table--table{overflow:hidden}.bsgoal-base-viewer{display:inline-block}.bsgoal-base-viewer .base_viewer{margin:4px 8px}
|
|
1
|
+
@charset "UTF-8";.base_tooltip_popper{max-width:20em}.bsgoal-base-form .base_form .el-form-item{margin-right:10px}.bsgoal-base-form .base_form div.el-input,.bsgoal-base-form .base_form div.el-select{width:100%}.bsgoal-base-form .base_form--visible{width:0px;height:0px;overflow:hidden}.bsgoal-base-sizes{display:inline-block}.bsgoal-base-sizes .base_sizes_input{cursor:pointer;margin-left:16px}.bsgoal-base-sizes .base_sizes_item{text-align:center;font-size:14px;padding:0 20px;color:#606266;height:34px;line-height:34px;cursor:pointer}.bsgoal-base-sizes .base_sizes_item:hover{background-color:#f5f7fa}.bsgoal-base-sizes .base_sizes_item--selected{color:#409eff;font-weight:700}.bsgoal-base-sizes .bsgoal_micro_app .el-input__suffix{margin-right:8px!important}.bsgoal-base-table-pagination{text-align:right}.bsgoal-base-table-pagination .base_table_pagination{display:inline-block;margin-top:16px}.bsgoal-base-table-empty .base_table_empty{text-align:center}.bsgoal-base-table-empty .base_table_empty_img{padding-top:16px;line-height:initial}.bsgoal-base-table-empty .base_table_empty_text{display:inline-block}.bsgoal-base-table .base_table{padding:16px}.bsgoal-base-table .base_table_menu{margin-bottom:8px}.bsgoal-base-table .el-table__body-wrapper{overflow-y:hidden!important}.bsgoal-base-table .el-scrollbar__view{height:100%}.bsgoal-base-table .base_table--tree{margin-top:10px}.bsgoal-base-table th>div.cell{white-space:nowrap}.bsgoal-base-table .bsgoal_micro_app .el-scrollbar{margin-bottom:0!important}.bsgoal-base-line .base_line{height:10px;background-color:#f0f2f5}.bsgoal-base-line .bsgoal-base-line__vertical{display:inline-block;height:100%}.bsgoal-base-line .base_line__vertical{width:10px;height:100%}.bsgoal-base-line .bsgoal-base-line__fill{position:absolute;left:0;right:0}.bsgoal-base-search-operation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:33.5px}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{height:100%;width:100%}.bsgoal-base-cascader .base_cascader{width:inherit;height:inherit}.bsgoal-base-search .base_search{padding:16px 6px 8px 16px}.bsgoal-base-search .base_search .el-form-item{margin-bottom:8px;margin-right:10px}.bsgoal-base-search .base_search div.el-input,.bsgoal-base-search .base_search div.el-select{width:100%}.bsgoal-base-search .el-col{margin-bottom:0!important}.bsgoal-base-tree-fold .base_tree_fold{position:absolute;top:0;bottom:0;right:10px;margin:auto;width:14px;height:38px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:10px;background-color:var(--el-color-primary)}.bsgoal-base-tree-fold .base_tree_fold--hide{right:0px}.bsgoal-base-tree{display:inline-block}.bsgoal-base-tree .base_tree{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;min-width:14px}.bsgoal-base-tree .base_tree_main{width:221px;padding:16px;scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:auto}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar{width:6px;height:6px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.2);width:20px}.bsgoal-base-tree .base_tree_main::-webkit-scrollbar-track{background-color:#fff}.bsgoal-base-tree .base_tree_main_input{margin-bottom:10px}.bsgoal-base-tree .base_tree .el-tree-node__content>i.el-tree-node__expand-icon{padding-left:0}.bsgoal-base-tree .base_tree_node{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_label{-webkit-box-flex:1;-ms-flex:1;flex:1}.bsgoal-base-tree .base_tree_node_icon{-webkit-box-flex:0;-ms-flex:none;flex:none}.bsgoal-base-button,.bsgoal-base-button .base_button{display:inline-block}.bsgoal-base-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal-dialog__footer--conceal .el-dialog__footer{display:none}.bsgoal-base-dialog .el-dialog__footer{height:initial;line-height:initial}.bsgoal-base-dialog .el-dialog__footer .el-button{margin-left:initial}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa;height:initial!important}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header .el-dialog__headerbtn{top:0px;right:8px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__body{padding:0}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content{padding:30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form{padding:0 0 0 30px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--form .bsgoal-base-form .base_form{padding:initial;padding-top:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .base_dialog_content--blank{padding-top:0}.bsgoal-base-dialog .base_dialog_footer_cancel{margin-right:16px}.bsgoal-base-tabs .base_tabs--fill{position:absolute;top:8px;bottom:0;left:16px;right:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.bsgoal-base-tabs .base_tabs--fill>div.el-tabs__content{-webkit-box-flex:1;-ms-flex:1;flex:1;position:relative}.bsgoal-base-alert .el-alert,.bsgoal-base-item .base_item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bsgoal-base-item .base_item_label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#606266;height:32px;line-height:32px;padding-right:12px}.bsgoal-base-tree-table .base_tree_table{display:-webkit-box;display:-ms-flexbox;display:flex}.bsgoal-base-tree-table .base_tree_table--table{overflow:hidden}.bsgoal-base-viewer{display:inline-block}.bsgoal-base-viewer .base_viewer{margin:4px 8px}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-18 17:04:47
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-28
|
|
5
|
+
* @LastEditTime: 2023-06-28 14:19:38
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-search-table\index.vue
|
|
7
7
|
* @Description: 查询+表格 基础组件
|
|
8
8
|
*
|
|
@@ -133,7 +133,7 @@ const props = defineProps({
|
|
|
133
133
|
}
|
|
134
134
|
})
|
|
135
135
|
|
|
136
|
-
const emits = defineEmits(['select', 'select-all', 'selection-change'])
|
|
136
|
+
const emits = defineEmits(['select', 'select-all', 'selection-change', 'on-total-change'])
|
|
137
137
|
|
|
138
138
|
const transferFoldStatus = ref(false)
|
|
139
139
|
provide('transferFoldStatus', transferFoldStatus)
|
|
@@ -196,6 +196,11 @@ const triggerSelectAll = (selection) => {
|
|
|
196
196
|
const triggerSelectionChange = (selection) => {
|
|
197
197
|
emits('selection-change', selection)
|
|
198
198
|
}
|
|
199
|
+
|
|
200
|
+
const triggerTotalChange = (total = 0) => {
|
|
201
|
+
emits('on-total-change', total)
|
|
202
|
+
}
|
|
203
|
+
|
|
199
204
|
// ---> E 触发事件 <---
|
|
200
205
|
|
|
201
206
|
// ---> S 暴露事件 <---
|
|
@@ -243,6 +248,7 @@ defineExpose({
|
|
|
243
248
|
@select="triggerSelect"
|
|
244
249
|
@select-all="triggerSelectAll"
|
|
245
250
|
@selection-change="triggerSelectionChange"
|
|
251
|
+
@on-total-change="triggerTotalChange"
|
|
246
252
|
>
|
|
247
253
|
<!-- S 顶部菜单 -->
|
|
248
254
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-27 16:52:31
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-28
|
|
5
|
+
* @LastEditTime: 2023-06-28 14:56:45
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-sizes\index.vue
|
|
7
7
|
* @Description: 页数切换 公共组件
|
|
8
8
|
*
|
|
@@ -99,7 +99,6 @@ watchEffect(() => {
|
|
|
99
99
|
})
|
|
100
100
|
|
|
101
101
|
const isMicroApp = window.__MICRO_APP_ENVIRONMENT__
|
|
102
|
-
console.log('isMicroApp',isMicroApp);
|
|
103
102
|
|
|
104
103
|
// ---> E input <---
|
|
105
104
|
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 11:29:04
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-28
|
|
5
|
+
* @LastEditTime: 2023-06-28 15:08:52
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-table\index.vue
|
|
7
7
|
* @Description:
|
|
8
8
|
*
|
|
@@ -136,8 +136,7 @@ const props = defineProps({
|
|
|
136
136
|
}
|
|
137
137
|
})
|
|
138
138
|
|
|
139
|
-
const emits = defineEmits(['select','select-all','selection-change'])
|
|
140
|
-
|
|
139
|
+
const emits = defineEmits(['select', 'select-all', 'selection-change', 'on-total-change'])
|
|
141
140
|
|
|
142
141
|
/**
|
|
143
142
|
* @Author: canlong.shen
|
|
@@ -220,6 +219,10 @@ watch(resData, (data) => {
|
|
|
220
219
|
}
|
|
221
220
|
})
|
|
222
221
|
|
|
222
|
+
watchEffect(() => {
|
|
223
|
+
emits('on-total-change', total.value)
|
|
224
|
+
})
|
|
225
|
+
|
|
223
226
|
// 查询
|
|
224
227
|
const refreshList = (params = {}) => {
|
|
225
228
|
searchParams.value = params
|
|
@@ -257,14 +260,17 @@ const triggerSelectionChange = (selection) => {
|
|
|
257
260
|
|
|
258
261
|
// ---> S 暴露事件 <---
|
|
259
262
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
+
const BSGOAL_EL_TABLE_REF = ref(null)
|
|
264
|
+
|
|
265
|
+
const clearSelection = () => {
|
|
263
266
|
BSGOAL_EL_TABLE_REF.value.clearSelection()
|
|
264
|
-
|
|
267
|
+
}
|
|
265
268
|
|
|
266
269
|
// ---> E 暴露事件 <---
|
|
267
270
|
|
|
271
|
+
// ---> S 兼容微前端 <---
|
|
272
|
+
const isMicroApp = window.__MICRO_APP_ENVIRONMENT__
|
|
273
|
+
// ---> E 兼容微前端 <---
|
|
268
274
|
|
|
269
275
|
// 暴露的属性
|
|
270
276
|
defineExpose({
|
|
@@ -275,7 +281,10 @@ defineExpose({
|
|
|
275
281
|
|
|
276
282
|
<template>
|
|
277
283
|
<div class="bsgoal-base-table">
|
|
278
|
-
<div
|
|
284
|
+
<div
|
|
285
|
+
class="base_table"
|
|
286
|
+
:class="{ 'base_table--tree': TREE_SWITCH_STATUS === false, bsgoal_micro_app: isMicroApp }"
|
|
287
|
+
>
|
|
279
288
|
<!-- S 表头操作区域 -->
|
|
280
289
|
<div class="base_table_menu" v-if="$slots.menu">
|
|
281
290
|
<slot name="menu"></slot>
|
|
@@ -382,5 +391,11 @@ defineExpose({
|
|
|
382
391
|
th > div.cell {
|
|
383
392
|
white-space: nowrap;
|
|
384
393
|
}
|
|
394
|
+
|
|
395
|
+
.bsgoal_micro_app {
|
|
396
|
+
.el-scrollbar {
|
|
397
|
+
margin-bottom: 0px !important;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
385
400
|
}
|
|
386
401
|
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-20 09:20:51
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-28 14:
|
|
5
|
+
* @LastEditTime: 2023-06-28 14:22:20
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\demo.vue
|
|
7
7
|
* @Description: 树 + 列表 + 演示
|
|
8
8
|
*
|
|
@@ -807,6 +807,9 @@ const triggerTableSelectAll = () => {
|
|
|
807
807
|
const triggerTableSelectionChange = () => {
|
|
808
808
|
console.log('triggerTableSelectionChange', triggerTableSelectionChange)
|
|
809
809
|
}
|
|
810
|
+
const triggerTableTotalChange = (total = 0) => {
|
|
811
|
+
console.log('triggerTableTotalChange', total)
|
|
812
|
+
}
|
|
810
813
|
|
|
811
814
|
const clearSelection = () => {
|
|
812
815
|
BSGOAL_BASE_TREE_TABLE_REF.value.clearSelection()
|
|
@@ -834,6 +837,7 @@ const clearSelection = () => {
|
|
|
834
837
|
@on-select-table="triggerTableSelect"
|
|
835
838
|
@on-select-all-table="triggerTableSelectAll"
|
|
836
839
|
@on-selection-change-table="triggerTableSelectionChange"
|
|
840
|
+
@on-total-change-table="triggerTableTotalChange"
|
|
837
841
|
>
|
|
838
842
|
<!-- <template #tree="{data}">
|
|
839
843
|
<div>{{ data }}</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-20 09:20:44
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-28 14:
|
|
5
|
+
* @LastEditTime: 2023-06-28 14:21:32
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\index.vue
|
|
7
7
|
* @Description: 树结构 + 列表
|
|
8
8
|
*
|
|
@@ -177,7 +177,8 @@ const emits = defineEmits([
|
|
|
177
177
|
'on-add-tree',
|
|
178
178
|
'on-select-table',
|
|
179
179
|
'on-select-all-table',
|
|
180
|
-
'on-selection-change-table'
|
|
180
|
+
'on-selection-change-table',
|
|
181
|
+
'on-total-change-table'
|
|
181
182
|
])
|
|
182
183
|
|
|
183
184
|
// ---> S 注入插槽 <---
|
|
@@ -225,15 +226,18 @@ const refreshList = (params = {}) => {
|
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
// ---> S 触发事件 <---
|
|
228
|
-
const triggerSelect = (selection, row) => {
|
|
229
|
+
const triggerSelect = (selection = {}, row =[]) => {
|
|
229
230
|
emits('on-select-table', selection, row)
|
|
230
231
|
}
|
|
231
|
-
const triggerSelectAll = (selection) => {
|
|
232
|
+
const triggerSelectAll = (selection = {}) => {
|
|
232
233
|
emits('on-select-all-table', selection)
|
|
233
234
|
}
|
|
234
|
-
const triggerSelectionChange = (selection) => {
|
|
235
|
+
const triggerSelectionChange = (selection = {}) => {
|
|
235
236
|
emits('on-selection-change-table', selection)
|
|
236
237
|
}
|
|
238
|
+
const triggerTotalChange = (total = 0) => {
|
|
239
|
+
emits('on-total-change-table', total)
|
|
240
|
+
}
|
|
237
241
|
// ---> E 触发事件 <---
|
|
238
242
|
|
|
239
243
|
// ---> S 暴露事件 <---
|
|
@@ -294,6 +298,7 @@ const tableStyler = computed(() => {
|
|
|
294
298
|
@select="triggerSelect"
|
|
295
299
|
@select-all="triggerSelectAll"
|
|
296
300
|
@selection-change="triggerSelectionChange"
|
|
301
|
+
@on-total-change="triggerTotalChange"
|
|
297
302
|
>
|
|
298
303
|
<template v-for="slotName of slotNames" v-slot:[slotName]="{ row = {} }">
|
|
299
304
|
<slot :name="slotName" :row="row"></slot>
|