@bsgoal/common 2.15.12 → 2.15.13
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 +2209 -2198
- 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/index.vue +37 -9
package/package.json
CHANGED
|
@@ -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 15:58:56
|
|
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,26 @@ const setActiveValueText = (range = [], type = '') => {
|
|
|
417
419
|
|
|
418
420
|
// ---> E switch active/inactive 的设置 <---
|
|
419
421
|
|
|
422
|
+
// ---> S styles <---
|
|
423
|
+
const colStyle = () => {
|
|
424
|
+
const styler = {}
|
|
425
|
+
const { compact = false } = props
|
|
426
|
+
if (compact) {
|
|
427
|
+
styler.marginBottom = '0px'
|
|
428
|
+
}
|
|
429
|
+
return styler
|
|
430
|
+
}
|
|
431
|
+
const itemStyle = () => {
|
|
432
|
+
const styler = {}
|
|
433
|
+
const { compact = false, itemStyler = {} } = props
|
|
434
|
+
if (compact) {
|
|
435
|
+
styler.marginBottom = '0px'
|
|
436
|
+
}
|
|
437
|
+
return { ...itemStyler, ...styler }
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// ---> E styles <---
|
|
441
|
+
|
|
420
442
|
defineExpose({
|
|
421
443
|
triggerOperationClear,
|
|
422
444
|
triggerOperationForm,
|
|
@@ -467,8 +489,14 @@ defineExpose({
|
|
|
467
489
|
) of configOptionsGet"
|
|
468
490
|
:key="key"
|
|
469
491
|
>
|
|
470
|
-
<el-col
|
|
471
|
-
|
|
492
|
+
<el-col
|
|
493
|
+
:style="colStyle"
|
|
494
|
+
:class="{ 'base_form--visible': !visible }"
|
|
495
|
+
:xs="24"
|
|
496
|
+
:sm="24"
|
|
497
|
+
:md="medium"
|
|
498
|
+
>
|
|
499
|
+
<el-form-item :style="itemStyle" :label="label" :prop="prop" :rules="rules">
|
|
472
500
|
<slot :name="[prop]" :option="{ readonly, value: model[prop], values: model }">
|
|
473
501
|
<!-- S 内容组件 -->
|
|
474
502
|
<template v-if="!readonly">
|