@bsgoal/common 1.5.6 → 1.5.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/dist/index.mjs +94 -86
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-form/demo.vue +1 -1
- package/src/components/bsgoal-base-form/index.vue +3 -3
- package/src/components/bsgoal-base-tooltip/index.vue +10 -3
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
12
|
<div class="bsgoal-base-form-demo">
|
|
13
|
-
<BsgoalBaseForm readonly ref="BSGOAL_BASE_FORM_REF" :limits="10" :config-options="configOptions" :values="values" />
|
|
13
|
+
<BsgoalBaseForm readonly ref="BSGOAL_BASE_FORM_REF" :limits="10" :config-options="configOptions" :values="values" none="--" />
|
|
14
14
|
<el-button type="primary" @click="confirm">提交</el-button>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -103,7 +103,7 @@ const watchPropList = []
|
|
|
103
103
|
* @return {*} model
|
|
104
104
|
*/
|
|
105
105
|
watchEffect(() => {
|
|
106
|
-
const { configOptions, values
|
|
106
|
+
const { configOptions, values } = props
|
|
107
107
|
const options = unref(configOptions)
|
|
108
108
|
const valuesModel = unref(values)
|
|
109
109
|
options.forEach((fei) => {
|
|
@@ -111,7 +111,7 @@ watchEffect(() => {
|
|
|
111
111
|
if (![EnumType.INPUT, EnumType.INPUT_TEXT_AREA].includes(type)) {
|
|
112
112
|
watchPropList.push(prop)
|
|
113
113
|
}
|
|
114
|
-
model.value[prop] = valuesModel[prop] || value
|
|
114
|
+
model.value[prop] = valuesModel[prop] || value
|
|
115
115
|
})
|
|
116
116
|
})
|
|
117
117
|
|
|
@@ -487,7 +487,7 @@ defineExpose({
|
|
|
487
487
|
<!-- S 文本内容 -->
|
|
488
488
|
<template v-else>
|
|
489
489
|
<div>
|
|
490
|
-
<BsgoalBaseTooltip :content="model[prop]" :limit="limit" />
|
|
490
|
+
<BsgoalBaseTooltip :content="model[prop]" :limit="limit" :none="none" />
|
|
491
491
|
</div>
|
|
492
492
|
</template>
|
|
493
493
|
<!-- E 文本内容 -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-05-04 10:59:25
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-05-
|
|
5
|
+
* @LastEditTime: 2023-05-06 11:47:17
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tooltip\index.vue
|
|
7
7
|
* @Description: 文字提示公共组件
|
|
8
8
|
*
|
|
@@ -47,18 +47,25 @@ const props = defineProps({
|
|
|
47
47
|
max: {
|
|
48
48
|
type: [Number, String],
|
|
49
49
|
default: '10em'
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* 空字段 默认值
|
|
53
|
+
*/
|
|
54
|
+
none: {
|
|
55
|
+
type: [String],
|
|
56
|
+
default: '无'
|
|
50
57
|
}
|
|
51
58
|
})
|
|
52
59
|
|
|
53
60
|
// ---> S 字符数限制 <---
|
|
54
61
|
const contentGet = computed(() => {
|
|
55
|
-
const { content = '', limit = 0 } = props
|
|
62
|
+
const { content = '', limit = 0 , none =''} = props
|
|
56
63
|
let contentString = content
|
|
57
64
|
const contentLength = content.length
|
|
58
65
|
if ( limit && contentLength > limit) {
|
|
59
66
|
contentString = `${content.substring(0, limit)}...`
|
|
60
67
|
}
|
|
61
|
-
return contentString
|
|
68
|
+
return contentString || none
|
|
62
69
|
})
|
|
63
70
|
// ---> E 字符数限制 <---
|
|
64
71
|
|