bge-ui 1.0.20 → 1.0.21
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/checkbox/index.vue.d.ts +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/checkbox/index.vue +3 -3
|
@@ -8,7 +8,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
8
8
|
default: string;
|
|
9
9
|
};
|
|
10
10
|
modelValue: {
|
|
11
|
-
type: (StringConstructor | ArrayConstructor | NumberConstructor)[];
|
|
11
|
+
type: (StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
14
|
trueValue: {
|
|
@@ -35,7 +35,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
35
35
|
default: string;
|
|
36
36
|
};
|
|
37
37
|
modelValue: {
|
|
38
|
-
type: (StringConstructor | ArrayConstructor | NumberConstructor)[];
|
|
38
|
+
type: (StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
|
|
39
39
|
default: () => never[];
|
|
40
40
|
};
|
|
41
41
|
trueValue: {
|
|
@@ -56,7 +56,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
56
56
|
size: string;
|
|
57
57
|
disabled: boolean;
|
|
58
58
|
inline: boolean;
|
|
59
|
-
modelValue: string | number | unknown[];
|
|
59
|
+
modelValue: string | number | boolean | unknown[];
|
|
60
60
|
trueValue: string | number | boolean;
|
|
61
61
|
falseValue: string | number | boolean;
|
|
62
62
|
}, {}>, {
|
package/dist/index.js
CHANGED
|
@@ -9287,7 +9287,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
9287
9287
|
default: "large"
|
|
9288
9288
|
},
|
|
9289
9289
|
modelValue: {
|
|
9290
|
-
type: [Array, String, Number],
|
|
9290
|
+
type: [Array, String, Number, Boolean],
|
|
9291
9291
|
default: () => []
|
|
9292
9292
|
},
|
|
9293
9293
|
trueValue: {
|
|
@@ -9320,7 +9320,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
9320
9320
|
const formItemContext = inject(formItemContextKey$1, void 0);
|
|
9321
9321
|
const input = ref(false);
|
|
9322
9322
|
watch(() => props.modelValue, (val) => {
|
|
9323
|
-
if (typeof val === "number" || typeof val === "string") {
|
|
9323
|
+
if (typeof val === "number" || typeof val === "string" || typeof val === "boolean") {
|
|
9324
9324
|
input.value = true;
|
|
9325
9325
|
if (val === props.trueValue) {
|
|
9326
9326
|
input.value = true;
|
|
@@ -9337,7 +9337,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
9337
9337
|
formItemContext && formItemContext.validate && formItemContext.validate().catch((err) => err);
|
|
9338
9338
|
});
|
|
9339
9339
|
function getLabeledValue(isChecked) {
|
|
9340
|
-
if (typeof props.modelValue === "number" || typeof props.modelValue === "string") {
|
|
9340
|
+
if (typeof props.modelValue === "number" || typeof props.modelValue === "string" || typeof props.modelValue === "boolean") {
|
|
9341
9341
|
if (isChecked) {
|
|
9342
9342
|
return props.trueValue;
|
|
9343
9343
|
} else {
|
package/package.json
CHANGED
package/src/checkbox/index.vue
CHANGED
|
@@ -53,7 +53,7 @@ const props = defineProps({
|
|
|
53
53
|
default: 'large'
|
|
54
54
|
},
|
|
55
55
|
modelValue: {
|
|
56
|
-
type: [Array, String, Number],
|
|
56
|
+
type: [Array, String, Number, Boolean],
|
|
57
57
|
default: () => []
|
|
58
58
|
},
|
|
59
59
|
trueValue: {
|
|
@@ -76,7 +76,7 @@ const formItemContext: any = inject(formItemContextKey, undefined)
|
|
|
76
76
|
const input = ref(false)
|
|
77
77
|
|
|
78
78
|
watch(() => props.modelValue, (val) => {
|
|
79
|
-
if (typeof val === 'number' || typeof val === 'string') {
|
|
79
|
+
if (typeof val === 'number' || typeof val === 'string' || typeof val === 'boolean') {
|
|
80
80
|
input.value = true
|
|
81
81
|
if (val === props.trueValue) {
|
|
82
82
|
input.value = true
|
|
@@ -94,7 +94,7 @@ watch(() => props.modelValue, (val) => {
|
|
|
94
94
|
})
|
|
95
95
|
|
|
96
96
|
function getLabeledValue(isChecked: boolean) {
|
|
97
|
-
if (typeof props.modelValue === 'number' || typeof props.modelValue === 'string') {
|
|
97
|
+
if (typeof props.modelValue === 'number' || typeof props.modelValue === 'string' || typeof props.modelValue === 'boolean') {
|
|
98
98
|
if (isChecked) {
|
|
99
99
|
return props.trueValue
|
|
100
100
|
} else {
|