@bsgoal/common 2.8.0 → 2.8.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/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-dialog .bsgoal_base_dialog_main .base_dialog_content--form .bsgoal-base-form .base_form{padding:initial;padding-top:16px}.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:14px;color:#606266;height:32px;line-height:32px;padding-right:12px}
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-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 .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-dialog .bsgoal_base_dialog_main .base_dialog_content--form .bsgoal-base-form .base_form{padding:initial;padding-top:16px}.bsgoal-base-dialog .base_dialog_footer_cancel{margin-right:16px}.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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsgoal/common",
3
- "version": "2.8.0",
3
+ "version": "2.8.3",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -14,7 +14,6 @@
14
14
  import { ref, unref, computed } from 'vue'
15
15
  import { Delete, Plus, CloseBold, Select } from '@element-plus/icons-vue'
16
16
 
17
-
18
17
  defineOptions({
19
18
  name: 'BsgoalBaseButton'
20
19
  })
@@ -51,13 +50,23 @@ const props = defineProps({
51
50
  plain: {
52
51
  type: [Boolean],
53
52
  default: false
53
+ },
54
+ /**
55
+ * 是否有 loading
56
+ */
57
+ hasLoading: {
58
+ type: [Boolean],
59
+ default: true
54
60
  }
55
61
  })
56
62
 
57
63
  // ---> S 触发按钮 <---
58
64
  const loading = ref(false)
59
65
  const triggerClick = () => {
66
+ // 默认 loading 是打开的
67
+ if(props.hasLoading){
60
68
  loading.value = true
69
+ }
61
70
  const { task } = props
62
71
  const taskValue = unref(task)
63
72
  taskValue(() => {
@@ -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-05-18 14:56:57
5
+ * @LastEditTime: 2023-05-30 15:31:41
6
6
  * @FilePath: \common\src\components\bsgoal-base-dialog\demo.vue
7
7
  * @Description: 弹窗公共组件 演示
8
8
  *
@@ -52,22 +52,29 @@ const tabsConfigOptions = ref([
52
52
  ])
53
53
 
54
54
  const triggerConfirm = (done) => {
55
- console.log('关闭前');
56
- done()
55
+ setTimeout(() => {
56
+ done()
57
+ }, 3000)
58
+ console.log('关闭前')
57
59
  }
58
60
  </script>
59
61
  <template>
60
62
  <div class="bsgoal-base-dialog-demo">
61
63
  <div class="base_dialog_demo">
62
64
  <BsgoalBaseDialog v-model="dialogVisible" width="600" :footer="false">
63
- <BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
65
+ <BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
64
66
  <template #footer>
65
67
  <el-button type="primary">底部按钮</el-button>
66
68
  </template>
67
- </BsgoalBaseDialog >
68
- <BsgoalBaseDialog v-model="dialogVisible2" size="max" type="form" @on-confirm="triggerConfirm">
69
- <BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
70
- </BsgoalBaseDialog >
69
+ </BsgoalBaseDialog>
70
+ <BsgoalBaseDialog
71
+ v-model="dialogVisible2"
72
+ size="max"
73
+ type="form"
74
+ @on-confirm="triggerConfirm"
75
+ >
76
+ <BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
77
+ </BsgoalBaseDialog>
71
78
  <el-button type="primary" @click="test">打开弹窗</el-button>
72
79
  <el-button type="primary" @click="test2">打开弹窗2</el-button>
73
80
  </div>
@@ -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-05-26 15:39:08
5
+ * @LastEditTime: 2023-05-30 15:45:49
6
6
  * @FilePath: \common\src\components\bsgoal-base-dialog\index.vue
7
7
  * @Description: 弹窗公共组件
8
8
  *
@@ -12,6 +12,7 @@
12
12
  /* setup模板
13
13
  ---------------------------------------------------------------- */
14
14
  import { ref, watch, computed } from 'vue'
15
+ import BsgoalBaseButton from '../bsgoal-base-button/index.vue'
15
16
 
16
17
  defineOptions({
17
18
  name: 'BsgoalBaseDialog'
@@ -95,9 +96,10 @@ const cancel = () => {
95
96
  * @default:
96
97
  * @return {*}
97
98
  */
98
- const confirm = () => {
99
+ const confirm = (done = () => {}) => {
99
100
  emits('on-confirm', () => {
100
101
  dialogVisible.value = false
102
+ done()
101
103
  })
102
104
  }
103
105
 
@@ -156,8 +158,16 @@ const widthGet = computed(() => {
156
158
  <template #footer>
157
159
  <slot name="footer" v-if="footer">
158
160
  <span class="base_dialog_footer">
159
- <el-button @click="cancel">{{ cancelTxt }}</el-button>
160
- <el-button type="primary" @click="confirm"> {{ confirmTxt }} </el-button>
161
+ <BsgoalBaseButton
162
+ class='base_dialog_footer_cancel'
163
+ mode="cancel"
164
+ :task="cancel"
165
+ :content="cancelTxt"
166
+ :has-loading="false"
167
+ >
168
+ </BsgoalBaseButton>
169
+ <BsgoalBaseButton mode="confirm" :task="confirm" :content="confirmTxt">
170
+ </BsgoalBaseButton>
161
171
  </span>
162
172
  </slot>
163
173
  </template>
@@ -209,5 +219,8 @@ const widthGet = computed(() => {
209
219
  }
210
220
  }
211
221
  }
222
+ .base_dialog_footer_cancel {
223
+ margin-right:16px;
224
+ }
212
225
  }
213
226
  </style>