@bsgoal/common 1.6.6 → 1.6.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsgoal/common",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -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-06 14:53:11
5
+ * @LastEditTime: 2023-05-18 14:56:57
6
6
  * @FilePath: \common\src\components\bsgoal-base-dialog\demo.vue
7
7
  * @Description: 弹窗公共组件 演示
8
8
  *
@@ -52,6 +52,11 @@ const tabsConfigOptions = ref([
52
52
  value: 'tab4'
53
53
  }
54
54
  ])
55
+
56
+ const triggerConfirm = (done) => {
57
+ console.log('关闭前');
58
+ done()
59
+ }
55
60
  </script>
56
61
  <template>
57
62
  <div class="bsgoal-base-dialog-demo">
@@ -61,10 +66,10 @@ const tabsConfigOptions = ref([
61
66
  <template #footer>
62
67
  <el-button type="primary">底部按钮</el-button>
63
68
  </template>
64
- </BsgoalBaseDialog>
65
- <BsgoalBaseDialog v-model="dialogVisible2" size="max" type="form">
66
- <BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
67
- </BsgoalBaseDialog>
69
+ </BsgoalBaseDialog >
70
+ <BsgoalBaseDialog v-model="dialogVisible2" size="max" type="form" @on-confirm="triggerConfirm">
71
+ <BsgoalBaseTabs v-memo="activeTabName" :config-options="tabsConfigOptions" />
72
+ </BsgoalBaseDialog >
68
73
  <el-button type="primary" @click="test">打开弹窗</el-button>
69
74
  <el-button type="primary" @click="test2">打开弹窗2</el-button>
70
75
  </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-10 11:56:01
5
+ * @LastEditTime: 2023-05-18 14:54:15
6
6
  * @FilePath: \common\src\components\bsgoal-base-dialog\index.vue
7
7
  * @Description: 弹窗公共组件
8
8
  *
@@ -97,8 +97,9 @@ const cancel = () => {
97
97
  * @return {*}
98
98
  */
99
99
  const confirm = () => {
100
- dialogVisible.value = false
101
- emits('on-confirm')
100
+ emits('on-confirm', () => {
101
+ dialogVisible.value = false
102
+ })
102
103
  }
103
104
 
104
105
  watch(
@@ -141,8 +142,12 @@ const widthGet = computed(() => {
141
142
  <div class="bsgoal-base-dialog">
142
143
  <div class="base_dialog">
143
144
  <!-- S 组件实体 -->
144
- <el-dialog v-model="dialogVisible" custom-class="bsgoal_base_dialog_main"
145
- :class="{ 'bsgoal-dialog__footer--conceal': !footer }" :width="widthGet">
145
+ <el-dialog
146
+ v-model="dialogVisible"
147
+ custom-class="bsgoal_base_dialog_main"
148
+ :class="{ 'bsgoal-dialog__footer--conceal': !footer }"
149
+ :width="widthGet"
150
+ >
146
151
  <template #header>
147
152
  <div class="base_dialog_header">{{ title }}</div>
148
153
  </template>
@@ -200,4 +205,5 @@ const widthGet = computed(() => {
200
205
  padding: 0px 0px 30px 30px;
201
206
  }
202
207
  }
203
- }</style>
208
+ }
209
+ </style>
@@ -8,17 +8,6 @@
8
8
  *
9
9
  -->
10
10
 
11
- <template>
12
- <div class="bsgoal-base-form-demo">
13
- <BsgoalBaseForm readonly ref="BSGOAL_BASE_FORM_REF" :limits="10" :config-options="configOptions" :values="values" none="--" />
14
- <el-button type="primary" @click="confirm">提交</el-button>
15
- </div>
16
- </template>
17
- <script>
18
- export default {
19
- name: 'BsgoalBaseFormDemo'
20
- }
21
- </script>
22
11
  <script setup>
23
12
  /* setup模板
24
13
  ---------------------------------------------------------------- */
@@ -27,20 +16,17 @@ import { ref, computed, toRefs, watch, unref } from 'vue'
27
16
  import EnumType from '../../enums/enumType.js'
28
17
 
29
18
  const values = ref({
30
- prop1:'112123123123123123',
31
- prop2:'select1',
32
- prop20:''
19
+ prop1: '112123123123123123',
20
+ prop2: 'select1',
21
+ prop20: ''
33
22
  })
34
23
 
35
24
  const BSGOAL_BASE_FORM_REF = ref(null)
36
25
 
37
- const confirm = () => {
38
- BSGOAL_BASE_FORM_REF.value.validateForm( (res) => {
39
-
40
- console.log('res',res);
41
-
42
- } )
43
-
26
+ const confirm = () => {
27
+ BSGOAL_BASE_FORM_REF.value.validateForm((res) => {
28
+ console.log('res', res)
29
+ })
44
30
  }
45
31
 
46
32
  // 配置项
@@ -51,8 +37,8 @@ const configOptions = ref([
51
37
  prop: 'prop1',
52
38
  type: EnumType.INPUT,
53
39
  width: '100px',
54
- rules:true,
55
- readonly:true
40
+ rules: true,
41
+ readonly: true
56
42
  },
57
43
  {
58
44
  label: 'prop20',
@@ -60,8 +46,8 @@ const configOptions = ref([
60
46
  prop: 'prop20',
61
47
  type: EnumType.INPUT,
62
48
  width: '100px',
63
- rules:true,
64
- readonly:true
49
+ rules: true,
50
+ readonly: true
65
51
  },
66
52
  {
67
53
  label: 'prop2',
@@ -86,8 +72,7 @@ const configOptions = ref([
86
72
  value: 'select5'
87
73
  }
88
74
  ],
89
- readonly:true
90
-
75
+ readonly: true
91
76
  },
92
77
  {
93
78
  label: 'prop3',
@@ -191,6 +176,24 @@ const configOptions = ref([
191
176
  }
192
177
  ])
193
178
  </script>
179
+ <script>
180
+ export default {
181
+ name: 'BsgoalBaseFormDemo'
182
+ }
183
+ </script>
184
+ <template>
185
+ <div class="bsgoal-base-form-demo">
186
+ <BsgoalBaseForm
187
+ readonly
188
+ ref="BSGOAL_BASE_FORM_REF"
189
+ :limits="10"
190
+ :config-options="configOptions"
191
+ :values="values"
192
+ none="--"
193
+ />
194
+ <el-button type="primary" @click="confirm">提交</el-button>
195
+ </div>
196
+ </template>
194
197
  <style lang="scss" scoped>
195
198
  /* 自定义样式
196
199
  ---------------------------------------------------------------- */