@bsgoal/common 2.11.0 → 2.11.1
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 +2056 -2027
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +8 -8
- 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/demo.vue +2 -1
- package/src/components/bsgoal-base-search-table/index.vue +16 -1
- package/src/components/bsgoal-base-tree/demo.vue +8 -3
- package/src/components/bsgoal-base-tree/index.vue +43 -4
- package/src/components/bsgoal-base-tree-table/index.vue +2 -7
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-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-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}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{width:100%}.bsgoal-base-cascader .base_cascader{width: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-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:#409eff}.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-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}
|
|
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-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-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}.bsgoal-base-search-operation .operation_fold{margin-left:12px;cursor:pointer;min-width:3em}.bsgoal-base-cascader{width:100%}.bsgoal-base-cascader .base_cascader{width: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-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:#409eff}.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}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-18 17:04:53
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-21 10:22:10
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-search-table\demo.vue
|
|
7
7
|
* @Description: 查询 + 表格 组合公共组件
|
|
8
8
|
*
|
|
@@ -747,6 +747,7 @@ const task = (done = () => {}, rows = {}) => {
|
|
|
747
747
|
:fetch="fetch"
|
|
748
748
|
:config-options="configOptions"
|
|
749
749
|
:expression="75"
|
|
750
|
+
:page-size="40"
|
|
750
751
|
@on-search="triggerSearch"
|
|
751
752
|
>
|
|
752
753
|
<!--
|
|
@@ -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-
|
|
5
|
+
* @LastEditTime: 2023-06-21 10:21:34
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-search-table\index.vue
|
|
7
7
|
* @Description: 查询+表格 基础组件
|
|
8
8
|
*
|
|
@@ -123,9 +123,24 @@ const props = defineProps({
|
|
|
123
123
|
hasSearch: {
|
|
124
124
|
type: Boolean,
|
|
125
125
|
default: true
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* pageSize
|
|
129
|
+
*/
|
|
130
|
+
pageSize: {
|
|
131
|
+
type: [Number],
|
|
132
|
+
default: 0
|
|
126
133
|
}
|
|
127
134
|
})
|
|
128
135
|
|
|
136
|
+
|
|
137
|
+
// ---> S 注入分页的值 <---
|
|
138
|
+
const pageSizeValue = unref(props.pageSize)
|
|
139
|
+
if (pageSizeValue) {
|
|
140
|
+
provide('PAGINATION_PAGE_SIZE', ref(props.pageSize))
|
|
141
|
+
}
|
|
142
|
+
// ---> E 注入分页的值 <---
|
|
143
|
+
|
|
129
144
|
const transferFoldStatus = ref(false)
|
|
130
145
|
provide('transferFoldStatus', transferFoldStatus)
|
|
131
146
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-21 08:43:39
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-21 10:19:13
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree\demo.vue
|
|
7
7
|
* @Description: 左侧树的演示
|
|
8
8
|
*
|
|
@@ -58,7 +58,8 @@ const treeLazyLoad = (node) => {
|
|
|
58
58
|
resove([
|
|
59
59
|
{
|
|
60
60
|
label: 'label2-1',
|
|
61
|
-
isLeaf: true
|
|
61
|
+
isLeaf: true,
|
|
62
|
+
hasIcon:true
|
|
62
63
|
},
|
|
63
64
|
{
|
|
64
65
|
label: 'label2-2',
|
|
@@ -90,6 +91,10 @@ const treeInitNode = (node) => {
|
|
|
90
91
|
}, 1000)
|
|
91
92
|
})
|
|
92
93
|
}
|
|
94
|
+
|
|
95
|
+
const triggerAddClick = (params = '') => {
|
|
96
|
+
console.log('params', params)
|
|
97
|
+
}
|
|
93
98
|
</script>
|
|
94
99
|
<template>
|
|
95
100
|
<div class="bsgoal-base-tree-demo">
|
|
@@ -98,8 +103,8 @@ const treeInitNode = (node) => {
|
|
|
98
103
|
:lazy-load="treeLazyLoad"
|
|
99
104
|
:init-node="treeInitNode"
|
|
100
105
|
@on-click="triggerTreeClick"
|
|
106
|
+
@on-click-add="triggerAddClick"
|
|
101
107
|
/>
|
|
102
|
-
|
|
103
108
|
</div>
|
|
104
109
|
</div>
|
|
105
110
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-21 08:43:33
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-21 10:18:38
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree\index.vue
|
|
7
7
|
* @Description: 虚拟化树型结构 公共组件
|
|
8
8
|
*
|
|
@@ -14,7 +14,7 @@ import { ref, watch, watchEffect } from 'vue'
|
|
|
14
14
|
import directiveBase from '../../directives/directiveBase.js'
|
|
15
15
|
import BsgoalBaseLine from '../bsgoal-base-line/index.vue'
|
|
16
16
|
import BsgoalBaseTreeFold from '../bsgoal-base-tree-fold/index.vue'
|
|
17
|
-
|
|
17
|
+
import { Plus } from '@element-plus/icons-vue'
|
|
18
18
|
defineOptions({
|
|
19
19
|
name: 'BsgoalBaseTree'
|
|
20
20
|
})
|
|
@@ -69,7 +69,7 @@ const props = defineProps({
|
|
|
69
69
|
}
|
|
70
70
|
})
|
|
71
71
|
|
|
72
|
-
const emits = defineEmits(['on-click', 'on-switch'])
|
|
72
|
+
const emits = defineEmits(['on-click', 'on-switch', 'on-click-add'])
|
|
73
73
|
|
|
74
74
|
// 计算高度的指令
|
|
75
75
|
const vHeight = directiveBase.height
|
|
@@ -133,6 +133,18 @@ const loadNode = async (node, resolve, props) => {
|
|
|
133
133
|
resolve(lazyNodeData || [])
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @Author: canlong.shen
|
|
139
|
+
* @description: 点击加号图标触发事件
|
|
140
|
+
* @param {*} node
|
|
141
|
+
* @param {*} data
|
|
142
|
+
* @default:
|
|
143
|
+
* @return {*}
|
|
144
|
+
*/
|
|
145
|
+
const handleItemAdd = (node = null, data = {}) => {
|
|
146
|
+
emits('on-click-add', { node, data })
|
|
147
|
+
}
|
|
136
148
|
</script>
|
|
137
149
|
<template>
|
|
138
150
|
<div class="bsgoal-base-tree">
|
|
@@ -152,7 +164,24 @@ const loadNode = async (node, resolve, props) => {
|
|
|
152
164
|
:props="treeProps"
|
|
153
165
|
:filter-node-method="filterNode"
|
|
154
166
|
@node-click="clickNodeTree"
|
|
155
|
-
|
|
167
|
+
>
|
|
168
|
+
<template #default="{ node, data }">
|
|
169
|
+
<div class="base_tree_node">
|
|
170
|
+
<!-- S 节点名称 -->
|
|
171
|
+
<span class="base_tree_node_label">
|
|
172
|
+
{{ node.label }}
|
|
173
|
+
</span>
|
|
174
|
+
<!-- E 节点名称 -->
|
|
175
|
+
<!-- S 操作符号 -->
|
|
176
|
+
<span class="base_tree_node_icon" v-show="data.hasIcon">
|
|
177
|
+
<el-icon color="#409EFF" @click="handleItemAdd(node, data)">
|
|
178
|
+
<Plus />
|
|
179
|
+
</el-icon>
|
|
180
|
+
</span>
|
|
181
|
+
<!-- E 操作符号 -->
|
|
182
|
+
</div>
|
|
183
|
+
</template>
|
|
184
|
+
</el-tree>
|
|
156
185
|
<!-- E 树结构 -->
|
|
157
186
|
</div>
|
|
158
187
|
<!-- S 横线 -->
|
|
@@ -213,5 +242,15 @@ const loadNode = async (node, resolve, props) => {
|
|
|
213
242
|
.base_tree .el-tree-node__content > i.el-tree-node__expand-icon {
|
|
214
243
|
padding-left: 0px;
|
|
215
244
|
}
|
|
245
|
+
.base_tree_node {
|
|
246
|
+
display: flex;
|
|
247
|
+
flex: 1;
|
|
248
|
+
}
|
|
249
|
+
.base_tree_node_label {
|
|
250
|
+
flex: 1;
|
|
251
|
+
}
|
|
252
|
+
.base_tree_node_icon {
|
|
253
|
+
flex: none;
|
|
254
|
+
}
|
|
216
255
|
}
|
|
217
256
|
</style>
|
|
@@ -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-
|
|
5
|
+
* @LastEditTime: 2023-06-21 10:21:31
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\index.vue
|
|
7
7
|
* @Description: 树结构 + 列表
|
|
8
8
|
*
|
|
@@ -157,12 +157,7 @@ const props = defineProps({
|
|
|
157
157
|
}
|
|
158
158
|
})
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
const pageSizeValue = unref(props.pageSize)
|
|
162
|
-
if (pageSizeValue) {
|
|
163
|
-
provide('PAGINATION_PAGE_SIZE', ref(props.pageSize))
|
|
164
|
-
}
|
|
165
|
-
// ---> E 注入分页的值 <---
|
|
160
|
+
|
|
166
161
|
|
|
167
162
|
// ---> S 注入插槽 <---
|
|
168
163
|
const slots = useSlots()
|