@bsgoal/common 1.7.0 → 1.7.2

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/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-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}
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-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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsgoal/common",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -2,7 +2,7 @@
2
2
  * @Author: canlong.shen
3
3
  * @Date: 2023-05-18 16:24:31
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-05-18 16:54:41
5
+ * @LastEditTime: 2023-05-18 17:29:13
6
6
  * @FilePath: \common\src\components\bsgoal-base-button\demo.vue
7
7
  * @Description: 按钮 演示
8
8
  *
@@ -31,7 +31,8 @@ export default {
31
31
  </script>
32
32
  <template>
33
33
  <div class="bsgoal-base-button-demo">
34
- <BsgoalBaseButton :task="task"> </BsgoalBaseButton>
34
+ <BsgoalBaseButton :task="task" mode="add"> </BsgoalBaseButton>
35
+ <BsgoalBaseButton :task="task" mode="delete"> </BsgoalBaseButton>
35
36
  <BsgoalBaseButton :task="task" #default="{ loading }">
36
37
  <div>
37
38
  {{ loading }}
@@ -2,7 +2,7 @@
2
2
  * @Author: canlong.shen
3
3
  * @Date: 2023-05-18 16:24:25
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-05-18 17:00:41
5
+ * @LastEditTime: 2023-05-18 17:28:21
6
6
  * @FilePath: \common\src\components\bsgoal-base-button\index.vue
7
7
  * @Description: 统一按钮
8
8
  *
@@ -11,8 +11,8 @@
11
11
  <script setup>
12
12
  /* setup模板
13
13
  ---------------------------------------------------------------- */
14
- import { ref, unref } from 'vue'
15
- import { Plus } from '@element-plus/icons-vue'
14
+ import { ref, unref, computed } from 'vue'
15
+ import { Delete, Plus } from '@element-plus/icons-vue'
16
16
 
17
17
  // props
18
18
  const props = defineProps({
@@ -34,6 +34,11 @@ const props = defineProps({
34
34
  content: {
35
35
  type: [String],
36
36
  default: '新增'
37
+ },
38
+ mode: {
39
+ type: [String],
40
+ default: 'add',
41
+ validator: (v) => ['add', 'delete', 'edit', 'detail'].includes(v)
37
42
  }
38
43
  })
39
44
 
@@ -50,6 +55,29 @@ const triggerClick = () => {
50
55
  })
51
56
  }
52
57
  // ---> E 触发按钮 <---
58
+
59
+ // ---> S 模式 <---
60
+
61
+ const typeGet = computed(() => {
62
+ const { mode = '', type = '' } = props
63
+
64
+ switch (mode) {
65
+ case 'delete':
66
+ return 'danger'
67
+ }
68
+ return type
69
+ })
70
+ const iconGet = computed(() => {
71
+ const { mode = '', icon = '' } = props
72
+
73
+ switch (mode) {
74
+ case 'delete':
75
+ return Delete
76
+ }
77
+ return icon
78
+ })
79
+
80
+ // ---> E 模式 <---
53
81
  </script>
54
82
  <script>
55
83
  export default {
@@ -60,7 +88,7 @@ export default {
60
88
  <div class="bsgoal-base-button">
61
89
  <div class="base_button" @click="triggerClick">
62
90
  <slot :loading="loading">
63
- <el-button :type="type" :icon="icon" :loading="loading">{{ content }}</el-button>
91
+ <el-button :type="typeGet" :icon="iconGet" :loading="loading">{{ content }}</el-button>
64
92
  </slot>
65
93
  </div>
66
94
  </div>
package/src/entry.js CHANGED
@@ -6,6 +6,7 @@ import BsgoalBaseTree from '@/components/bsgoal-base-tree/index.vue'
6
6
  import BsgoalBaseDialog from '@/components/bsgoal-base-dialog/index.vue'
7
7
  import BsgoalBaseTabs from '@/components/bsgoal-base-tabs/index.vue'
8
8
  import BsgoalBaseLink from '@/components/bsgoal-base-link/index.vue'
9
+ import BsgoalBaseButton from '@/components/bsgoal-base-button/index.vue'
9
10
  import enumType from '@/enums/enumType.js'
10
11
  import { useFetch } from '@/combines/useFetchs.js'
11
12
 
@@ -25,7 +26,8 @@ export default {
25
26
  BsgoalBaseTree,
26
27
  BsgoalBaseDialog,
27
28
  BsgoalBaseTabs,
28
- BsgoalBaseLink
29
+ BsgoalBaseLink,
30
+ BsgoalBaseButton
29
31
  }
30
32
 
31
33
  for (const [name, component] of Object.entries(componentsMap)) {