@bsgoal/common 2.16.4 → 2.16.6
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 +812 -798
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-form/demo.vue +2 -1
- package/src/components/bsgoal-base-form/index.vue +12 -3
- package/src/components/bsgoal-base-input/index.vue +26 -2
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-07-
|
|
5
|
+
* @LastEditTime: 2023-07-12 14:33:25
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-form\demo.vue
|
|
7
7
|
* @Description: 表单公共组件演示组件
|
|
8
8
|
*
|
|
@@ -267,6 +267,7 @@ const changeValues = (params = '') => {
|
|
|
267
267
|
ref="BSGOAL_BASE_FORM_REF"
|
|
268
268
|
readonly
|
|
269
269
|
none="--"
|
|
270
|
+
disabled
|
|
270
271
|
:medium="6"
|
|
271
272
|
:limits="10"
|
|
272
273
|
:config-options="configOptions"
|
|
@@ -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-07-
|
|
5
|
+
* @LastEditTime: 2023-07-12 14:33:02
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-form\index.vue
|
|
7
7
|
* @Description: 表单公共组件
|
|
8
8
|
*
|
|
@@ -118,6 +118,13 @@ const props = defineProps({
|
|
|
118
118
|
compact: {
|
|
119
119
|
type: [Boolean],
|
|
120
120
|
default: false
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* 失效
|
|
124
|
+
*/
|
|
125
|
+
disabled: {
|
|
126
|
+
type: [Boolean],
|
|
127
|
+
default: false
|
|
121
128
|
}
|
|
122
129
|
})
|
|
123
130
|
|
|
@@ -356,7 +363,8 @@ const filterSlotProps = (model = {}) => {
|
|
|
356
363
|
if (!prop.startsWith('_')) {
|
|
357
364
|
const value = model[prop]
|
|
358
365
|
const valueInt = Number.parseFloat(value)
|
|
359
|
-
rebuildModel[prop] =
|
|
366
|
+
rebuildModel[prop] =
|
|
367
|
+
(valueInt || ['0', 0].includes(value)) && !/^0.+/i.test(`${value}`) ? valueInt : value
|
|
360
368
|
}
|
|
361
369
|
}
|
|
362
370
|
return rebuildModel
|
|
@@ -435,7 +443,7 @@ const itemStyle = computed(() => {
|
|
|
435
443
|
styler.marginBottom = '0px'
|
|
436
444
|
}
|
|
437
445
|
|
|
438
|
-
return {
|
|
446
|
+
return { ...styler, ...itemStyler }
|
|
439
447
|
})
|
|
440
448
|
|
|
441
449
|
// ---> E styles <---
|
|
@@ -455,6 +463,7 @@ defineExpose({
|
|
|
455
463
|
ref="EL_FORM_REF"
|
|
456
464
|
label-suffix=":"
|
|
457
465
|
style="padding: 0px"
|
|
466
|
+
:disabled="disabled"
|
|
458
467
|
:label-position="labelPosition"
|
|
459
468
|
:model="model"
|
|
460
469
|
v-align
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-05-29 09:38:52
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-07-
|
|
5
|
+
* @LastEditTime: 2023-07-12 09:25:21
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-input\index.vue
|
|
7
7
|
* @Description: Input 输入框
|
|
8
8
|
*
|
|
@@ -66,7 +66,7 @@ const props = defineProps({
|
|
|
66
66
|
}
|
|
67
67
|
})
|
|
68
68
|
|
|
69
|
-
const emits = defineEmits(['update:modelValue', 'change'])
|
|
69
|
+
const emits = defineEmits(['update:modelValue', 'change' , 'blur' ,'focus'])
|
|
70
70
|
|
|
71
71
|
// ---> S 值绑定 <---
|
|
72
72
|
|
|
@@ -111,6 +111,28 @@ const input = (value = '') => {
|
|
|
111
111
|
emits('update:modelValue', value)
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
/**
|
|
115
|
+
* @Author: canlong.shen
|
|
116
|
+
* @description: 当选择器的输入框失去焦点时触发
|
|
117
|
+
* @param {*} value
|
|
118
|
+
* @default:
|
|
119
|
+
* @return {*}
|
|
120
|
+
*/
|
|
121
|
+
const blur = (value = '') => {
|
|
122
|
+
emits('input', value)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @Author: canlong.shen
|
|
127
|
+
* @description: 当选择器的输入框失去焦点时触发
|
|
128
|
+
* @param {*} value
|
|
129
|
+
* @default:
|
|
130
|
+
* @return {*}
|
|
131
|
+
*/
|
|
132
|
+
const focus = (value = '') => {
|
|
133
|
+
emits('focus', value)
|
|
134
|
+
}
|
|
135
|
+
|
|
114
136
|
// ---> E 事件 <---
|
|
115
137
|
|
|
116
138
|
// ---> S 插槽 <---
|
|
@@ -132,6 +154,8 @@ const slotNames = ref(Object.keys(slots))
|
|
|
132
154
|
@change="change"
|
|
133
155
|
@clear="clear"
|
|
134
156
|
@input="input"
|
|
157
|
+
@blur="blur"
|
|
158
|
+
@focus="focus"
|
|
135
159
|
>
|
|
136
160
|
<!-- S 输入框头部内容 -->
|
|
137
161
|
<template #[slotName] v-for="slotName of slotNames">
|