@bsgoal/common 1.5.1 → 1.5.3
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 +628 -590
- 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-dialog/demo.vue +34 -7
- package/src/components/bsgoal-base-dialog/index.vue +57 -9
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-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_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-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_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}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-23 16:35:24
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-04
|
|
5
|
+
* @LastEditTime: 2023-05-04 10:08:13
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-dialog\demo.vue
|
|
7
7
|
* @Description: 弹窗公共组件 演示
|
|
8
8
|
*
|
|
@@ -18,25 +18,52 @@ export default {
|
|
|
18
18
|
---------------------------------------------------------------- */
|
|
19
19
|
import { ref } from 'vue'
|
|
20
20
|
import BsgoalBaseDialog from './index.vue'
|
|
21
|
-
|
|
21
|
+
import BsgoalBaseTabs from '../bsgoal-base-tabs/index.vue'
|
|
22
22
|
|
|
23
23
|
// props
|
|
24
24
|
const props = defineProps({})
|
|
25
25
|
|
|
26
26
|
const dialogVisible = ref(false)
|
|
27
|
+
const dialogVisible2 = ref(false)
|
|
27
28
|
|
|
28
29
|
const test = () => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
dialogVisible.value = true
|
|
31
|
+
}
|
|
32
|
+
const test2 = () => {
|
|
33
|
+
dialogVisible2.value = true
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
const activeTabName = ref('tab1')
|
|
37
|
+
const tabsConfigOptions = ref([
|
|
38
|
+
{
|
|
39
|
+
label: 'tab1',
|
|
40
|
+
value: 'tab1'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'tab2',
|
|
44
|
+
value: 'tab2'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'tab3',
|
|
48
|
+
value: 'tab3'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: 'tab4',
|
|
52
|
+
value: 'tab4'
|
|
53
|
+
}
|
|
54
|
+
])
|
|
34
55
|
</script>
|
|
35
56
|
<template>
|
|
36
57
|
<div class="bsgoal-base-dialog-demo">
|
|
37
58
|
<div class="base_dialog_demo">
|
|
38
|
-
<BsgoalBaseDialog v-model="dialogVisible" width="600"
|
|
39
|
-
|
|
59
|
+
<BsgoalBaseDialog v-model="dialogVisible" width="600">
|
|
60
|
+
<BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
|
|
61
|
+
</BsgoalBaseDialog>
|
|
62
|
+
<BsgoalBaseDialog v-model="dialogVisible2" size="max" type="form">
|
|
63
|
+
<BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
|
|
64
|
+
</BsgoalBaseDialog>
|
|
65
|
+
<el-button type="primary" @click="test">打开弹窗</el-button>
|
|
66
|
+
<el-button type="primary" @click="test2">打开弹窗2</el-button>
|
|
40
67
|
</div>
|
|
41
68
|
</div>
|
|
42
69
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-23 16:35:19
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-04
|
|
5
|
+
* @LastEditTime: 2023-05-04 10:07:14
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-dialog\index.vue
|
|
7
7
|
* @Description: 弹窗公共组件
|
|
8
8
|
*
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
<script setup>
|
|
17
17
|
/* setup模板
|
|
18
18
|
---------------------------------------------------------------- */
|
|
19
|
-
import { ref, watch } from 'vue'
|
|
19
|
+
import { ref, watch, computed } from 'vue'
|
|
20
20
|
// props
|
|
21
21
|
const props = defineProps({
|
|
22
22
|
/**
|
|
@@ -46,14 +46,29 @@ const props = defineProps({
|
|
|
46
46
|
confirmTxt: {
|
|
47
47
|
type: [String],
|
|
48
48
|
default: '确定'
|
|
49
|
-
},
|
|
50
|
-
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
51
|
* 宽度
|
|
52
52
|
*/
|
|
53
|
-
width:{
|
|
54
|
-
type:[String,Number]
|
|
53
|
+
width: {
|
|
54
|
+
type: [String, Number]
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* 弹窗类型
|
|
58
|
+
*/
|
|
59
|
+
type: {
|
|
60
|
+
type: [String],
|
|
61
|
+
default: 'default',
|
|
62
|
+
validator: (v) => ['default', 'form', 'blank'].includes(v)
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* 弹窗大小
|
|
66
|
+
*/
|
|
67
|
+
size: {
|
|
68
|
+
type: [String, Number],
|
|
69
|
+
default: 'medium',
|
|
70
|
+
validator: (v) => ['small', 'medium', 'lagre', 'max', 'dnymic'].includes(v)
|
|
55
71
|
}
|
|
56
|
-
|
|
57
72
|
})
|
|
58
73
|
|
|
59
74
|
const emits = defineEmits(['update:modelValue', 'on-confirm'])
|
|
@@ -89,16 +104,41 @@ watch(
|
|
|
89
104
|
watch(dialogVisible, (v) => {
|
|
90
105
|
emits('update:modelValue', v)
|
|
91
106
|
})
|
|
107
|
+
|
|
108
|
+
// 设置不同尺寸
|
|
109
|
+
|
|
110
|
+
const widthGet = computed(() => {
|
|
111
|
+
const { width, size } = props
|
|
112
|
+
|
|
113
|
+
if (width) {
|
|
114
|
+
return width
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
switch (size) {
|
|
118
|
+
case 'small':
|
|
119
|
+
return '480px'
|
|
120
|
+
case 'medium':
|
|
121
|
+
return '720px'
|
|
122
|
+
case 'lagre':
|
|
123
|
+
return '960px'
|
|
124
|
+
case 'max':
|
|
125
|
+
return '1232px'
|
|
126
|
+
case 'dnymic':
|
|
127
|
+
return '80%'
|
|
128
|
+
default:
|
|
129
|
+
return width
|
|
130
|
+
}
|
|
131
|
+
})
|
|
92
132
|
</script>
|
|
93
133
|
<template>
|
|
94
134
|
<div class="bsgoal-base-dialog">
|
|
95
135
|
<div class="base_dialog">
|
|
96
136
|
<!-- S 组件实体 -->
|
|
97
|
-
<el-dialog v-model="dialogVisible" custom-class="bsgoal_base_dialog_main" :width="
|
|
137
|
+
<el-dialog v-model="dialogVisible" custom-class="bsgoal_base_dialog_main" :width="widthGet">
|
|
98
138
|
<template #header>
|
|
99
139
|
<div class="base_dialog_header">{{ title }}</div>
|
|
100
140
|
</template>
|
|
101
|
-
<div class="base_dialog_content">
|
|
141
|
+
<div :class="['base_dialog_content', { 'base_dialog_content--form': type === 'form' }]">
|
|
102
142
|
<slot></slot>
|
|
103
143
|
</div>
|
|
104
144
|
<template #footer>
|
|
@@ -133,6 +173,14 @@ watch(dialogVisible, (v) => {
|
|
|
133
173
|
}
|
|
134
174
|
}
|
|
135
175
|
.el-dialog__body {
|
|
176
|
+
padding: 0px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.base_dialog_content {
|
|
180
|
+
padding: 30px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.base_dialog_content--form {
|
|
136
184
|
padding: 0px 0px 30px 30px;
|
|
137
185
|
}
|
|
138
186
|
}
|