@bsgoal/common 2.3.0 → 2.5.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 +1218 -1142
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-item/demo.vue +50 -0
- package/src/components/bsgoal-base-item/index.vue +59 -0
- package/src/components/bsgoal-base-switch/demo.vue +39 -0
- package/src/components/bsgoal-base-switch/index.vue +76 -0
- package/src/entry.js +4 -0
- package/src/router/index.js +11 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.base_tooltip_popper{max-width:20em}.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-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-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-dialog__footer--conceal .el-dialog__footer{display:none}.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}.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 30px 30px}.bsgoal-base-button,.bsgoal-base-button .base_button{display:inline-block}.bsgoal-base-alert .el-alert{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}
|
|
1
|
+
@charset "UTF-8";.base_tooltip_popper{max-width:20em}.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-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-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-dialog__footer--conceal .el-dialog__footer{display:none}.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}.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 30px 30px}.bsgoal-base-button,.bsgoal-base-button .base_button{display:inline-block}.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:inherit;color:#606266;height:32px;line-height:32px;padding-right:12px}
|
package/package.json
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-05-24 17:46:26
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-05-24 18:05:46
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-item\demo.vue
|
|
7
|
+
* @Description: 表单项 演示
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
/* setup模板
|
|
13
|
+
---------------------------------------------------------------- */
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
import BsgoalBaseItem from './index.vue'
|
|
16
|
+
import BsgoalBaseSwitch from '../bsgoal-base-switch/index.vue';
|
|
17
|
+
const props = defineProps({})
|
|
18
|
+
|
|
19
|
+
</script>
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: 'BsgoalBaseItemDemo'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const switchModelValue = ref('0')
|
|
26
|
+
</script>
|
|
27
|
+
<template>
|
|
28
|
+
<div class="bsgoal-base-item-demo">
|
|
29
|
+
<div class="base_item_demo">
|
|
30
|
+
<BsgoalBaseItem>
|
|
31
|
+
<template #label>
|
|
32
|
+
<div>是否开通接听值班表设置</div>
|
|
33
|
+
</template>
|
|
34
|
+
<template #content>
|
|
35
|
+
<div>
|
|
36
|
+
<BsgoalBaseSwitch v-model="switchModelValue" />
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
</BsgoalBaseItem>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
<style lang="scss" scoped>
|
|
44
|
+
/* 自定义样式
|
|
45
|
+
---------------------------------------------------------------- */
|
|
46
|
+
</style>
|
|
47
|
+
<style lang="scss">
|
|
48
|
+
/* 覆盖样式
|
|
49
|
+
---------------------------------------------------------------- */
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-05-24 17:46:21
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-05-24 18:08:53
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-item\index.vue
|
|
7
|
+
* @Description: 表单项
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
<script setup>
|
|
11
|
+
/* setup模板
|
|
12
|
+
---------------------------------------------------------------- */
|
|
13
|
+
import { ref } from 'vue'
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
/**
|
|
16
|
+
* label 后缀
|
|
17
|
+
*/
|
|
18
|
+
suffix: {
|
|
19
|
+
type: [String],
|
|
20
|
+
default: ':'
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
</script>
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
name: 'BsgoalBaseItem'
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
<template>
|
|
30
|
+
<div class="bsgoal-base-item">
|
|
31
|
+
<div class="base_item">
|
|
32
|
+
<div class="base_item_label">
|
|
33
|
+
<slot name="label"> </slot> <span>{{ suffix }}</span>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="base_item_contetn">
|
|
36
|
+
<slot name="content"></slot>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
<style lang="scss">
|
|
42
|
+
/* 覆盖样式
|
|
43
|
+
---------------------------------------------------------------- */
|
|
44
|
+
.bsgoal-base-item {
|
|
45
|
+
.base_item {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
.base_item_label {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
font-size: inherit;
|
|
53
|
+
color: #606266;
|
|
54
|
+
height: 32px;
|
|
55
|
+
line-height: 32px;
|
|
56
|
+
padding-right: 12px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-05-24 17:20:47
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-05-24 17:43:05
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-switch\demo.vue
|
|
7
|
+
* @Description: 开关 公共组件 演示
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
<script setup>
|
|
11
|
+
/* setup模板
|
|
12
|
+
---------------------------------------------------------------- */
|
|
13
|
+
import { ref } from 'vue'
|
|
14
|
+
import BsgoalBaseSwitch from './index.vue'
|
|
15
|
+
const props = defineProps({})
|
|
16
|
+
|
|
17
|
+
const modelValue = ref('0')
|
|
18
|
+
</script>
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: 'BsgoalBaseSwitchDemo'
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
<template>
|
|
25
|
+
<div class="bsgoal-base-switch-demo">
|
|
26
|
+
<div class="base_switch_demo">
|
|
27
|
+
{{ modelValue }}
|
|
28
|
+
<BsgoalBaseSwitch v-model="modelValue" />
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
<style lang="scss" scoped>
|
|
33
|
+
/* 自定义样式
|
|
34
|
+
---------------------------------------------------------------- */
|
|
35
|
+
</style>
|
|
36
|
+
<style lang="scss">
|
|
37
|
+
/* 覆盖样式
|
|
38
|
+
---------------------------------------------------------------- */
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-05-24 17:20:40
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-05-24 17:44:16
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-switch\index.vue
|
|
7
|
+
* @Description: switch 开关
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
/* setup模板
|
|
13
|
+
---------------------------------------------------------------- */
|
|
14
|
+
import { ref } from 'vue'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
/**
|
|
17
|
+
* text 配置 选项
|
|
18
|
+
*/
|
|
19
|
+
textRange: {
|
|
20
|
+
type: [Array],
|
|
21
|
+
default: () => ['是', '否']
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* value 配置 选项
|
|
25
|
+
*/
|
|
26
|
+
valueRange: {
|
|
27
|
+
type: [Array],
|
|
28
|
+
default: () => ['1', '0']
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* value
|
|
32
|
+
*/
|
|
33
|
+
modelValue: {
|
|
34
|
+
type: [],
|
|
35
|
+
default: ''
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
const emits = defineEmits(['update:modelValue'])
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @Author: canlong.shen
|
|
42
|
+
* @description: 触发 值变化
|
|
43
|
+
* @default:
|
|
44
|
+
* @return {*}
|
|
45
|
+
*/
|
|
46
|
+
const triggerChange = (value = '') => {
|
|
47
|
+
emits('update:modelValue', value)
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
export default {
|
|
53
|
+
name: 'BsgoalBaseSwitch'
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<template>
|
|
57
|
+
<div class="bsgoal-base-switch">
|
|
58
|
+
<el-switch
|
|
59
|
+
class="base_switch"
|
|
60
|
+
:model-value="modelValue"
|
|
61
|
+
:active-value="valueRange[0]"
|
|
62
|
+
:inactive-value="valueRange[1]"
|
|
63
|
+
:active-text="textRange[0]"
|
|
64
|
+
:inactive-text="textRange[1]"
|
|
65
|
+
@change="triggerChange"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
<style lang="scss" scoped>
|
|
70
|
+
/* 自定义样式
|
|
71
|
+
---------------------------------------------------------------- */
|
|
72
|
+
</style>
|
|
73
|
+
<style lang="scss">
|
|
74
|
+
/* 覆盖样式
|
|
75
|
+
---------------------------------------------------------------- */
|
|
76
|
+
</style>
|
package/src/entry.js
CHANGED
|
@@ -12,6 +12,8 @@ import BsgoalBaseAlert from '@/components/bsgoal-base-alert/index.vue'
|
|
|
12
12
|
import BsgoalBaseSelect from '@/components/bsgoal-base-select/index.vue'
|
|
13
13
|
import BsgoalBaseTime from '@/components/bsgoal-base-time/index.vue'
|
|
14
14
|
import BsgoalBaseTimeRange from '@/components/bsgoal-base-time-range/index.vue'
|
|
15
|
+
import BsgoalBaseSwitch from '@/components/bsgoal-base-switch/index.vue'
|
|
16
|
+
import BsgoalBaseItem from '@/components/bsgoal-base-item/index.vue'
|
|
15
17
|
import componentTypeEnums from '@/enums/componentTypeEnums.js'
|
|
16
18
|
import { useFetch } from '@/combines/useFetchs.js'
|
|
17
19
|
|
|
@@ -38,6 +40,8 @@ export default {
|
|
|
38
40
|
BsgoalBaseSelect,
|
|
39
41
|
BsgoalBaseTime,
|
|
40
42
|
BsgoalBaseTimeRange,
|
|
43
|
+
BsgoalBaseSwitch,
|
|
44
|
+
BsgoalBaseItem,
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
for (const [name, component] of Object.entries(componentsMap)) {
|
package/src/router/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 10:41:52
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-05-24
|
|
5
|
+
* @LastEditTime: 2023-05-24 17:43:27
|
|
6
6
|
* @FilePath: \common\src\router\index.js
|
|
7
7
|
* @Description: 路由配置
|
|
8
8
|
*
|
|
@@ -113,6 +113,16 @@ const router = createRouter({
|
|
|
113
113
|
name: '时间选择器',
|
|
114
114
|
component: import('@/components/bsgoal-base-time/demo.vue')
|
|
115
115
|
},
|
|
116
|
+
{
|
|
117
|
+
path: 'bsgoal-base-switch-demo',
|
|
118
|
+
name: '开关',
|
|
119
|
+
component: import('@/components/bsgoal-base-switch/demo.vue')
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
path: 'bsgoal-base-item-demo',
|
|
123
|
+
name: '表单项',
|
|
124
|
+
component: import('@/components/bsgoal-base-item/demo.vue')
|
|
125
|
+
},
|
|
116
126
|
]
|
|
117
127
|
}
|
|
118
128
|
]
|