@bsgoal/common 2.15.12 → 2.15.15
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 +2142 -2131
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +14 -14
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-form/demo.vue +4 -4
- package/src/components/bsgoal-base-form/index.vue +38 -9
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 15:00:00
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-30
|
|
5
|
+
* @LastEditTime: 2023-06-30 16:10:39
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-form\demo.vue
|
|
7
7
|
* @Description: 表单公共组件演示组件
|
|
8
8
|
*
|
|
@@ -127,7 +127,7 @@ const configOptions = ref([
|
|
|
127
127
|
value: [],
|
|
128
128
|
type: ComponentTypeEnums.SELECT,
|
|
129
129
|
prop: 'prop2',
|
|
130
|
-
multiple:true,
|
|
130
|
+
multiple: true,
|
|
131
131
|
range: [
|
|
132
132
|
{
|
|
133
133
|
label: 'select1',
|
|
@@ -145,7 +145,7 @@ const configOptions = ref([
|
|
|
145
145
|
label: 'select4',
|
|
146
146
|
value: 'select5'
|
|
147
147
|
}
|
|
148
|
-
]
|
|
148
|
+
]
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
label: 'prop3',
|
|
@@ -263,10 +263,10 @@ const changeValues = (params = '') => {
|
|
|
263
263
|
<div class="bsgoal-base-form-demo">
|
|
264
264
|
{{ values }}
|
|
265
265
|
<BsgoalBaseForm
|
|
266
|
+
compact
|
|
266
267
|
ref="BSGOAL_BASE_FORM_REF"
|
|
267
268
|
readonly
|
|
268
269
|
none="--"
|
|
269
|
-
:itemStyler="{ marginBottom: '8px' }"
|
|
270
270
|
:limits="10"
|
|
271
271
|
:config-options="configOptions"
|
|
272
272
|
:bind-model="values"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-17 11:44:29
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-30 14:
|
|
5
|
+
* @LastEditTime: 2023-06-30 16:14:07
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-form\index.vue
|
|
7
7
|
* @Description: 表单公共组件
|
|
8
8
|
*
|
|
@@ -110,6 +110,14 @@ const props = defineProps({
|
|
|
110
110
|
itemStyler: {
|
|
111
111
|
type: [Object],
|
|
112
112
|
default: () => ({})
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 紧凑型
|
|
117
|
+
*/
|
|
118
|
+
compact: {
|
|
119
|
+
type: [Boolean],
|
|
120
|
+
default: false
|
|
113
121
|
}
|
|
114
122
|
})
|
|
115
123
|
|
|
@@ -176,12 +184,6 @@ watchEffect(() => {
|
|
|
176
184
|
if (prop.startsWith('_')) {
|
|
177
185
|
model.value[prop] = `${prop}`
|
|
178
186
|
} else {
|
|
179
|
-
console.log('bindValue', bindValue)
|
|
180
|
-
console.log('valuesModel[prop]', valuesModel[prop])
|
|
181
|
-
console.log(
|
|
182
|
-
'bindValue || valuesModel[prop] || value',
|
|
183
|
-
bindValue || valuesModel[prop] || value
|
|
184
|
-
)
|
|
185
187
|
model.value[prop] = bindValue || valuesModel[prop] || value
|
|
186
188
|
}
|
|
187
189
|
|
|
@@ -417,6 +419,27 @@ const setActiveValueText = (range = [], type = '') => {
|
|
|
417
419
|
|
|
418
420
|
// ---> E switch active/inactive 的设置 <---
|
|
419
421
|
|
|
422
|
+
// ---> S styles <---
|
|
423
|
+
const colStyle = computed(() => {
|
|
424
|
+
const styler = {}
|
|
425
|
+
const { compact = false } = props
|
|
426
|
+
if (compact) {
|
|
427
|
+
styler.marginBottom = '0px'
|
|
428
|
+
}
|
|
429
|
+
return styler
|
|
430
|
+
})
|
|
431
|
+
const itemStyle = computed(() => {
|
|
432
|
+
const styler = {}
|
|
433
|
+
const { compact = false, itemStyler = {} } = props
|
|
434
|
+
if (compact) {
|
|
435
|
+
styler.marginBottom = '0px'
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return { ...styler ,...itemStyler }
|
|
439
|
+
})
|
|
440
|
+
|
|
441
|
+
// ---> E styles <---
|
|
442
|
+
|
|
420
443
|
defineExpose({
|
|
421
444
|
triggerOperationClear,
|
|
422
445
|
triggerOperationForm,
|
|
@@ -467,8 +490,14 @@ defineExpose({
|
|
|
467
490
|
) of configOptionsGet"
|
|
468
491
|
:key="key"
|
|
469
492
|
>
|
|
470
|
-
<el-col
|
|
471
|
-
|
|
493
|
+
<el-col
|
|
494
|
+
:class="{ 'base_form--visible': !visible }"
|
|
495
|
+
:xs="24"
|
|
496
|
+
:sm="24"
|
|
497
|
+
:md="medium"
|
|
498
|
+
:style="colStyle"
|
|
499
|
+
>
|
|
500
|
+
<el-form-item :style="itemStyle" :label="label" :prop="prop" :rules="rules">
|
|
472
501
|
<slot :name="[prop]" :option="{ readonly, value: model[prop], values: model }">
|
|
473
502
|
<!-- S 内容组件 -->
|
|
474
503
|
<template v-if="!readonly">
|