@bsgoal/common 1.0.3 → 1.1.0
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 +487 -413
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-cascader/demo.vue +317 -0
- package/src/components/bsgoal-base-cascader/index.vue +93 -0
- package/src/components/bsgoal-base-search/demo.vue +179 -159
- package/src/components/bsgoal-base-search/index.vue +22 -2
- package/src/enums/enumType.js +3 -2
- package/src/router/index.js +6 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.bsgoal-base-form .base_form{padding:16px 6px 8px 16px}.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-table-pagination{text-align:right}.bsgoal-base-table-pagination .base_table_pagination{display:inline-block;margin-top:16px}.bsgoal-base-table .base_table{padding:16px}.bsgoal-base-table .base_table_menu{margin-bottom:8px}.bsgoal-base-table .el-table__inner-wrapper{overflow:hidden}.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-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-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-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa}.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 0 30px 30px}
|
|
1
|
+
@charset "UTF-8";.bsgoal-base-form .base_form{padding:16px 6px 8px 16px}.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-table-pagination{text-align:right}.bsgoal-base-table-pagination .base_table_pagination{display:inline-block;margin-top:16px}.bsgoal-base-table .base_table{padding:16px}.bsgoal-base-table .base_table_menu{margin-bottom:8px}.bsgoal-base-table .el-table__inner-wrapper{overflow:hidden}.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-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-dialog .base_dialog_header{font-weight:500;color:#303133;font-size:16px}.bsgoal-base-dialog .bsgoal_base_dialog_main .el-dialog__header{padding:16px 30px;margin-right:0;background-color:#f5f7fa}.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 0 30px 30px}
|
package/package.json
CHANGED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-04-25 15:29:36
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-04-25 16:01:05
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-cascader\demo.vue
|
|
7
|
+
* @Description: 级联选择公共组件 演示
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "BsgoalBaseCascaderDemo",
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
16
|
+
<script setup>
|
|
17
|
+
/* setup模板
|
|
18
|
+
---------------------------------------------------------------- */
|
|
19
|
+
import { ref ,watch } from 'vue';
|
|
20
|
+
import BsgoalBaseCascader from './index.vue'
|
|
21
|
+
// props
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const cascaderValue = ref(['component','form'])
|
|
27
|
+
|
|
28
|
+
watch(cascaderValue,(val) => {
|
|
29
|
+
console.log('cascaderValue',val);
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const cascaderData = ref([
|
|
33
|
+
{
|
|
34
|
+
value: 'guide',
|
|
35
|
+
label: 'Guide',
|
|
36
|
+
children: [
|
|
37
|
+
{
|
|
38
|
+
value: 'disciplines',
|
|
39
|
+
label: 'Disciplines',
|
|
40
|
+
children: [
|
|
41
|
+
{
|
|
42
|
+
value: 'consistency',
|
|
43
|
+
label: 'Consistency',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: 'feedback',
|
|
47
|
+
label: 'Feedback',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
value: 'efficiency',
|
|
51
|
+
label: 'Efficiency',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
value: 'controllability',
|
|
55
|
+
label: 'Controllability',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: 'navigation',
|
|
61
|
+
label: 'Navigation',
|
|
62
|
+
children: [
|
|
63
|
+
{
|
|
64
|
+
value: 'side nav',
|
|
65
|
+
label: 'Side Navigation',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
value: 'top nav',
|
|
69
|
+
label: 'Top Navigation',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
value: 'component',
|
|
77
|
+
label: 'Component',
|
|
78
|
+
children: [
|
|
79
|
+
{
|
|
80
|
+
value: 'basic',
|
|
81
|
+
label: 'Basic',
|
|
82
|
+
children: [
|
|
83
|
+
{
|
|
84
|
+
value: 'layout',
|
|
85
|
+
label: 'Layout',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
value: 'color',
|
|
89
|
+
label: 'Color',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
value: 'typography',
|
|
93
|
+
label: 'Typography',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
value: 'icon',
|
|
97
|
+
label: 'Icon',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
value: 'button',
|
|
101
|
+
label: 'Button',
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value: 'form',
|
|
107
|
+
label: 'Form',
|
|
108
|
+
children: [
|
|
109
|
+
{
|
|
110
|
+
value: 'radio',
|
|
111
|
+
label: 'Radio',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
value: 'checkbox',
|
|
115
|
+
label: 'Checkbox',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
value: 'input',
|
|
119
|
+
label: 'Input',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
value: 'input-number',
|
|
123
|
+
label: 'InputNumber',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
value: 'select',
|
|
127
|
+
label: 'Select',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
value: 'cascader',
|
|
131
|
+
label: 'Cascader',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
value: 'switch',
|
|
135
|
+
label: 'Switch',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
value: 'slider',
|
|
139
|
+
label: 'Slider',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
value: 'time-picker',
|
|
143
|
+
label: 'TimePicker',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
value: 'date-picker',
|
|
147
|
+
label: 'DatePicker',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
value: 'datetime-picker',
|
|
151
|
+
label: 'DateTimePicker',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
value: 'upload',
|
|
155
|
+
label: 'Upload',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
value: 'rate',
|
|
159
|
+
label: 'Rate',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
value: 'form',
|
|
163
|
+
label: 'Form',
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
value: 'data',
|
|
169
|
+
label: 'Data',
|
|
170
|
+
children: [
|
|
171
|
+
{
|
|
172
|
+
value: 'table',
|
|
173
|
+
label: 'Table',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
value: 'tag',
|
|
177
|
+
label: 'Tag',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
value: 'progress',
|
|
181
|
+
label: 'Progress',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
value: 'tree',
|
|
185
|
+
label: 'Tree',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
value: 'pagination',
|
|
189
|
+
label: 'Pagination',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
value: 'badge',
|
|
193
|
+
label: 'Badge',
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
value: 'notice',
|
|
199
|
+
label: 'Notice',
|
|
200
|
+
children: [
|
|
201
|
+
{
|
|
202
|
+
value: 'alert',
|
|
203
|
+
label: 'Alert',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
value: 'loading',
|
|
207
|
+
label: 'Loading',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
value: 'message',
|
|
211
|
+
label: 'Message',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
value: 'message-box',
|
|
215
|
+
label: 'MessageBox',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
value: 'notification',
|
|
219
|
+
label: 'Notification',
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
value: 'navigation',
|
|
225
|
+
label: 'Navigation',
|
|
226
|
+
children: [
|
|
227
|
+
{
|
|
228
|
+
value: 'menu',
|
|
229
|
+
label: 'Menu',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
value: 'tabs',
|
|
233
|
+
label: 'Tabs',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
value: 'breadcrumb',
|
|
237
|
+
label: 'Breadcrumb',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
value: 'dropdown',
|
|
241
|
+
label: 'Dropdown',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
value: 'steps',
|
|
245
|
+
label: 'Steps',
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
value: 'others',
|
|
251
|
+
label: 'Others',
|
|
252
|
+
children: [
|
|
253
|
+
{
|
|
254
|
+
value: 'dialog',
|
|
255
|
+
label: 'Dialog',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
value: 'tooltip',
|
|
259
|
+
label: 'Tooltip',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
value: 'popover',
|
|
263
|
+
label: 'Popover',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
value: 'card',
|
|
267
|
+
label: 'Card',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
value: 'carousel',
|
|
271
|
+
label: 'Carousel',
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
value: 'collapse',
|
|
275
|
+
label: 'Collapse',
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
value: 'resource',
|
|
283
|
+
label: 'Resource',
|
|
284
|
+
children: [
|
|
285
|
+
{
|
|
286
|
+
value: 'axure',
|
|
287
|
+
label: 'Axure Components',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
value: 'sketch',
|
|
291
|
+
label: 'Sketch Templates',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
value: 'docs',
|
|
295
|
+
label: 'Design Documentation',
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
},
|
|
299
|
+
])
|
|
300
|
+
|
|
301
|
+
</script>
|
|
302
|
+
<template>
|
|
303
|
+
<div class="bsgoal-base-cascader-demo">
|
|
304
|
+
<BsgoalBaseCascader v-model="cascaderValue" :data-options="cascaderData" />
|
|
305
|
+
</div>
|
|
306
|
+
</template>
|
|
307
|
+
<style lang="scss" scoped>
|
|
308
|
+
/* 自定义样式
|
|
309
|
+
---------------------------------------------------------------- */
|
|
310
|
+
.bsgoal-base-cascader-demo {
|
|
311
|
+
|
|
312
|
+
}
|
|
313
|
+
</style>
|
|
314
|
+
<style lang="scss">
|
|
315
|
+
/* 覆盖样式
|
|
316
|
+
---------------------------------------------------------------- */
|
|
317
|
+
</style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-04-25 15:29:27
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-04-25 16:38:59
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-cascader\index.vue
|
|
7
|
+
* @Description: 级联选择 公共组件
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
name: 'BsgoalBaseCascader'
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
<script setup>
|
|
16
|
+
/* setup模板
|
|
17
|
+
---------------------------------------------------------------- */
|
|
18
|
+
import { ref } from 'vue'
|
|
19
|
+
// props
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
/**
|
|
22
|
+
* 绑定的值
|
|
23
|
+
*/
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: [Array],
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* 数据
|
|
30
|
+
* {
|
|
31
|
+
* value: '',
|
|
32
|
+
* label: '',
|
|
33
|
+
* children: [
|
|
34
|
+
*
|
|
35
|
+
* ]
|
|
36
|
+
* }
|
|
37
|
+
*/
|
|
38
|
+
dataOptions: {
|
|
39
|
+
type: [Array],
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* placeholder 输入框占位文本
|
|
44
|
+
*/
|
|
45
|
+
placeholder: {
|
|
46
|
+
type: [String],
|
|
47
|
+
default: ''
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const emits = defineEmits(['update:model-value', 'on-change'])
|
|
52
|
+
|
|
53
|
+
const configProps = ref({
|
|
54
|
+
checkStrictly: true,
|
|
55
|
+
multiple: false
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @Author: canlong.shen
|
|
60
|
+
* @description: 触发选择
|
|
61
|
+
* @param {*} val
|
|
62
|
+
* @default:
|
|
63
|
+
* @return {*}
|
|
64
|
+
*/
|
|
65
|
+
const changeCascaderValue = (val) => {
|
|
66
|
+
emits('update:model-value', val)
|
|
67
|
+
emits('on-change', val)
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
<template>
|
|
71
|
+
<div class="bsgoal-base-cascader">
|
|
72
|
+
<el-cascader
|
|
73
|
+
clearable
|
|
74
|
+
class="base_cascader"
|
|
75
|
+
:model-value="modelValue"
|
|
76
|
+
:options="dataOptions"
|
|
77
|
+
:props="configProps"
|
|
78
|
+
:placeholder="placeholder"
|
|
79
|
+
@change="changeCascaderValue"
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<style lang="scss">
|
|
85
|
+
/* 覆盖样式
|
|
86
|
+
---------------------------------------------------------------- */
|
|
87
|
+
.bsgoal-base-cascader {
|
|
88
|
+
width: 100%;
|
|
89
|
+
.base_cascader {
|
|
90
|
+
width: inherit;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</style>
|