@bsgoal/common 2.15.13 → 2.15.16
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
|
@@ -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:54:25
|
|
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',
|
|
@@ -266,7 +266,6 @@ const changeValues = (params = '') => {
|
|
|
266
266
|
ref="BSGOAL_BASE_FORM_REF"
|
|
267
267
|
readonly
|
|
268
268
|
none="--"
|
|
269
|
-
:itemStyler="{ marginBottom: '8px' }"
|
|
270
269
|
:limits="10"
|
|
271
270
|
:config-options="configOptions"
|
|
272
271
|
: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
|
|
5
|
+
* @LastEditTime: 2023-06-30 17:32:31
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-form\index.vue
|
|
7
7
|
* @Description: 表单公共组件
|
|
8
8
|
*
|
|
@@ -356,7 +356,7 @@ const filterSlotProps = (model = {}) => {
|
|
|
356
356
|
if (!prop.startsWith('_')) {
|
|
357
357
|
const value = model[prop]
|
|
358
358
|
const valueInt = Number.parseInt(value)
|
|
359
|
-
rebuildModel[prop] = valueInt || ['0', 0].includes(value) ? valueInt : value
|
|
359
|
+
rebuildModel[prop] = ( valueInt || ['0', 0].includes(value) ) && !(/^0.+/i).test(`${value}`) ? valueInt : value
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
return rebuildModel
|
|
@@ -420,22 +420,23 @@ const setActiveValueText = (range = [], type = '') => {
|
|
|
420
420
|
// ---> E switch active/inactive 的设置 <---
|
|
421
421
|
|
|
422
422
|
// ---> S styles <---
|
|
423
|
-
const colStyle = () => {
|
|
423
|
+
const colStyle = computed(() => {
|
|
424
424
|
const styler = {}
|
|
425
425
|
const { compact = false } = props
|
|
426
426
|
if (compact) {
|
|
427
427
|
styler.marginBottom = '0px'
|
|
428
428
|
}
|
|
429
429
|
return styler
|
|
430
|
-
}
|
|
431
|
-
const itemStyle = () => {
|
|
430
|
+
})
|
|
431
|
+
const itemStyle = computed(() => {
|
|
432
432
|
const styler = {}
|
|
433
433
|
const { compact = false, itemStyler = {} } = props
|
|
434
434
|
if (compact) {
|
|
435
435
|
styler.marginBottom = '0px'
|
|
436
436
|
}
|
|
437
|
-
|
|
438
|
-
}
|
|
437
|
+
|
|
438
|
+
return { ...styler ,...itemStyler }
|
|
439
|
+
})
|
|
439
440
|
|
|
440
441
|
// ---> E styles <---
|
|
441
442
|
|
|
@@ -490,11 +491,11 @@ defineExpose({
|
|
|
490
491
|
:key="key"
|
|
491
492
|
>
|
|
492
493
|
<el-col
|
|
493
|
-
:style="colStyle"
|
|
494
494
|
:class="{ 'base_form--visible': !visible }"
|
|
495
495
|
:xs="24"
|
|
496
496
|
:sm="24"
|
|
497
497
|
:md="medium"
|
|
498
|
+
:style="colStyle"
|
|
498
499
|
>
|
|
499
500
|
<el-form-item :style="itemStyle" :label="label" :prop="prop" :rules="rules">
|
|
500
501
|
<slot :name="[prop]" :option="{ readonly, value: model[prop], values: model }">
|