sard-uniapp 1.1.6 → 1.1.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/changelog.md +9 -0
- package/components/button/button.vue +1 -1
- package/components/checkbox/checkbox.d.ts +0 -6
- package/components/checkbox/checkbox.vue +2 -2
- package/components/checkbox/common.d.ts +0 -2
- package/components/checkbox/common.js +1 -5
- package/components/config/index.d.ts +6 -0
- package/components/config/index.js +3 -0
- package/components/form/common.d.ts +4 -3
- package/components/form/common.js +1 -2
- package/components/form/form.vue +2 -0
- package/components/form-item/form-item.d.ts +2 -5
- package/components/form-item/form-item.vue +3 -3
- package/components/input/input.vue +2 -2
- package/components/password-input/password-input.vue +2 -2
- package/components/popout-input/popout-input.vue +2 -2
- package/components/radio/common.d.ts +0 -4
- package/components/radio/common.js +0 -4
- package/components/radio/radio.d.ts +3 -12
- package/components/radio/radio.vue +6 -7
- package/components/rate/rate.vue +2 -2
- package/components/slider/slider.vue +2 -2
- package/components/stepper/stepper.vue +2 -2
- package/components/switch/switch.vue +2 -2
- package/components/upload/upload.vue +2 -2
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [1.1.7](https://github.com/sutras/sard-uniapp/compare/v1.1.6...v1.1.7) (2024-05-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 修复表单内组件的禁用和只读问题 close [#27](https://github.com/sutras/sard-uniapp/issues/27) ([eee674c](https://github.com/sutras/sard-uniapp/commit/eee674c156687b25893cd0456b7050440ea1ad4d))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## [1.1.6](https://github.com/sutras/sard-uniapp/compare/v1.1.5...v1.1.6) (2024-05-19)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -59,7 +59,7 @@ export default _defineComponent({
|
|
|
59
59
|
const bem = createBem("button");
|
|
60
60
|
const formContext = useFormContext();
|
|
61
61
|
const isDisabled = computed(() => {
|
|
62
|
-
return formContext?.disabled
|
|
62
|
+
return formContext?.disabled || props.disabled;
|
|
63
63
|
});
|
|
64
64
|
const onClick = (event) => {
|
|
65
65
|
emit("click", event);
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { type CheckboxProps, type CheckboxSlots } from './common';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<CheckboxProps>, {
|
|
3
|
-
disabled: undefined;
|
|
4
|
-
readonly: undefined;
|
|
5
3
|
validateEvent: boolean;
|
|
6
4
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
5
|
click: (event: any) => void;
|
|
8
6
|
"update:checked": (checked: boolean) => void;
|
|
9
7
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<CheckboxProps>, {
|
|
10
|
-
disabled: undefined;
|
|
11
|
-
readonly: undefined;
|
|
12
8
|
validateEvent: boolean;
|
|
13
9
|
}>>> & {
|
|
14
10
|
onClick?: ((event: any) => any) | undefined;
|
|
15
11
|
"onUpdate:checked"?: ((checked: boolean) => any) | undefined;
|
|
16
12
|
}, {
|
|
17
|
-
readonly: boolean;
|
|
18
13
|
validateEvent: boolean;
|
|
19
|
-
disabled: boolean;
|
|
20
14
|
}, {}>, Readonly<CheckboxSlots> & CheckboxSlots>;
|
|
21
15
|
export default _default;
|
|
22
16
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -53,10 +53,10 @@ export default _defineComponent({
|
|
|
53
53
|
const formContext = useFormContext();
|
|
54
54
|
const formItemContext = useFormItemContext();
|
|
55
55
|
const isDisabled = computed(() => {
|
|
56
|
-
return formContext?.disabled
|
|
56
|
+
return formContext?.disabled || groupContext?.disabled || props.disabled;
|
|
57
57
|
});
|
|
58
58
|
const isReadonly = computed(() => {
|
|
59
|
-
return formContext?.readonly
|
|
59
|
+
return formContext?.readonly || groupContext?.readonly || props.readonly;
|
|
60
60
|
});
|
|
61
61
|
const innerChecked = ref(
|
|
62
62
|
groupContext ? groupContext.value.includes(props.value) : props.checked
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { defaultConfig } from '../config';
|
|
2
|
-
export const checkboxPropsDefaults =
|
|
3
|
-
...defaultConfig.checkbox,
|
|
4
|
-
disabled: undefined,
|
|
5
|
-
readonly: undefined,
|
|
6
|
-
};
|
|
2
|
+
export const checkboxPropsDefaults = defaultConfig.checkbox;
|
|
7
3
|
export const checkboxGroupPropsDefaults = defaultConfig.checkboxGroup;
|
|
8
4
|
export const checkboxContextSymbol = Symbol('checkbox-context');
|
|
9
5
|
export const mapTypeIcon = {
|
|
@@ -78,6 +78,9 @@ export declare const defaultConfig: {
|
|
|
78
78
|
showError: boolean;
|
|
79
79
|
scrollDuration: number;
|
|
80
80
|
};
|
|
81
|
+
formItem: {
|
|
82
|
+
showError: boolean;
|
|
83
|
+
};
|
|
81
84
|
grid: {
|
|
82
85
|
columns: number;
|
|
83
86
|
direction: "vertical";
|
|
@@ -391,6 +394,9 @@ export declare function useConfigContext(): DeepPartial<{
|
|
|
391
394
|
showError: boolean;
|
|
392
395
|
scrollDuration: number;
|
|
393
396
|
};
|
|
397
|
+
formItem: {
|
|
398
|
+
showError: boolean;
|
|
399
|
+
};
|
|
394
400
|
grid: {
|
|
395
401
|
columns: number;
|
|
396
402
|
direction: "vertical";
|
|
@@ -24,6 +24,7 @@ export interface FormProps {
|
|
|
24
24
|
labelAlign?: 'start' | 'center' | 'end';
|
|
25
25
|
labelValign?: 'start' | 'center' | 'end';
|
|
26
26
|
starPosition?: 'left' | 'right';
|
|
27
|
+
hideStar?: boolean;
|
|
27
28
|
showError?: boolean;
|
|
28
29
|
scrollToFirstError?: boolean;
|
|
29
30
|
scrollIntoViewOptions?: ScrollIntoViewOptions;
|
|
@@ -58,8 +59,8 @@ export interface FormItemProps {
|
|
|
58
59
|
labelAlign?: 'start' | 'center' | 'end';
|
|
59
60
|
labelValign?: 'start' | 'center' | 'end';
|
|
60
61
|
starPosition?: 'left' | 'right';
|
|
61
|
-
showStar?: boolean;
|
|
62
62
|
label?: string;
|
|
63
|
+
hideStar?: boolean;
|
|
63
64
|
required?: boolean | undefined;
|
|
64
65
|
name?: FieldName;
|
|
65
66
|
rules?: Rule | Rule[];
|
|
@@ -70,8 +71,7 @@ export interface FormItemProps {
|
|
|
70
71
|
}
|
|
71
72
|
export declare const formItemPropsDefaults: {
|
|
72
73
|
required: undefined;
|
|
73
|
-
showError:
|
|
74
|
-
showStar: undefined;
|
|
74
|
+
showError: boolean;
|
|
75
75
|
};
|
|
76
76
|
export interface FormItemSlots {
|
|
77
77
|
default?(props: Record<string, never>): any;
|
|
@@ -97,6 +97,7 @@ export interface FormContext {
|
|
|
97
97
|
labelAlign: FormProps['labelAlign'];
|
|
98
98
|
labelValign: FormProps['labelValign'];
|
|
99
99
|
starPosition: FormProps['starPosition'];
|
|
100
|
+
hideStar: FormProps['hideStar'];
|
|
100
101
|
showError: FormProps['showError'];
|
|
101
102
|
scrollIntoViewOptions: FormProps['scrollIntoViewOptions'];
|
|
102
103
|
disabled: FormProps['disabled'];
|
|
@@ -2,9 +2,8 @@ import { inject } from 'vue';
|
|
|
2
2
|
import { defaultConfig } from '../config';
|
|
3
3
|
export const formPropsDefaults = defaultConfig.form;
|
|
4
4
|
export const formItemPropsDefaults = {
|
|
5
|
+
...defaultConfig.formItem,
|
|
5
6
|
required: undefined,
|
|
6
|
-
showError: undefined,
|
|
7
|
-
showStar: undefined,
|
|
8
7
|
};
|
|
9
8
|
export const formContextSymbol = Symbol('form-context');
|
|
10
9
|
export const formItemContextSymbol = Symbol('form-item-context');
|
package/components/form/form.vue
CHANGED
|
@@ -41,6 +41,7 @@ export default _defineComponent({
|
|
|
41
41
|
labelAlign: { type: String, required: false },
|
|
42
42
|
labelValign: { type: String, required: false },
|
|
43
43
|
starPosition: { type: String, required: false },
|
|
44
|
+
hideStar: { type: Boolean, required: false },
|
|
44
45
|
showError: { type: Boolean, required: false },
|
|
45
46
|
scrollToFirstError: { type: Boolean, required: false },
|
|
46
47
|
scrollIntoViewOptions: { type: Object, required: false },
|
|
@@ -141,6 +142,7 @@ export default _defineComponent({
|
|
|
141
142
|
labelAlign: toRef(props, "labelAlign"),
|
|
142
143
|
labelValign: toRef(props, "labelValign"),
|
|
143
144
|
starPosition: toRef(props, "starPosition"),
|
|
145
|
+
hideStar: toRef(props, "hideStar"),
|
|
144
146
|
showError: toRef(props, "showError"),
|
|
145
147
|
scrollIntoViewOptions: toRef(props, "scrollIntoViewOptions"),
|
|
146
148
|
disabled: toRef(props, "disabled"),
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type FormItemProps, type FormItemSlots, type ValidateState } from '../form/common';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<FormItemProps>, {
|
|
3
3
|
required: undefined;
|
|
4
|
-
showError:
|
|
5
|
-
showStar: undefined;
|
|
4
|
+
showError: boolean;
|
|
6
5
|
}>, {
|
|
7
6
|
validate: (trigger?: string | string[] | undefined) => Promise<void>;
|
|
8
7
|
reset: () => Promise<void>;
|
|
@@ -12,12 +11,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
12
11
|
validateState: import("vue").Ref<ValidateState>;
|
|
13
12
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<FormItemProps>, {
|
|
14
13
|
required: undefined;
|
|
15
|
-
showError:
|
|
16
|
-
showStar: undefined;
|
|
14
|
+
showError: boolean;
|
|
17
15
|
}>>>, {
|
|
18
16
|
showError: boolean;
|
|
19
17
|
required: boolean;
|
|
20
|
-
showStar: boolean;
|
|
21
18
|
}, {}>, Readonly<FormItemSlots> & FormItemSlots>;
|
|
22
19
|
export default _default;
|
|
23
20
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -70,8 +70,8 @@ export default _defineComponent({
|
|
|
70
70
|
labelAlign: { type: String, required: false },
|
|
71
71
|
labelValign: { type: String, required: false },
|
|
72
72
|
starPosition: { type: String, required: false },
|
|
73
|
-
showStar: { type: Boolean, required: false },
|
|
74
73
|
label: { type: String, required: false },
|
|
74
|
+
hideStar: { type: Boolean, required: false },
|
|
75
75
|
required: { type: Boolean, required: false, skipCheck: true },
|
|
76
76
|
name: { type: [String, Number, Array], required: false },
|
|
77
77
|
rules: { type: [Object, Array], required: false },
|
|
@@ -114,7 +114,7 @@ export default _defineComponent({
|
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
116
|
const shouldShowError = computed(() => {
|
|
117
|
-
return
|
|
117
|
+
return props.showError && formContext.showError && validateMessage.value;
|
|
118
118
|
});
|
|
119
119
|
const validateState = ref("");
|
|
120
120
|
const mergedValidateTrigger = computed(() => {
|
|
@@ -163,7 +163,7 @@ export default _defineComponent({
|
|
|
163
163
|
return mergedRules.value.some((rule) => rule.required);
|
|
164
164
|
});
|
|
165
165
|
const shouldShowStar = computed(() => {
|
|
166
|
-
return
|
|
166
|
+
return !formContext.hideStar && !props.hideStar && isRequired.value;
|
|
167
167
|
});
|
|
168
168
|
const validate = async (trigger) => {
|
|
169
169
|
if (isResetting || !props.name) {
|
|
@@ -172,10 +172,10 @@ export default _defineComponent({
|
|
|
172
172
|
const formContext = useFormContext();
|
|
173
173
|
const formItemContext = useFormItemContext();
|
|
174
174
|
const isDisabled = computed(() => {
|
|
175
|
-
return formContext?.disabled
|
|
175
|
+
return formContext?.disabled || props.disabled;
|
|
176
176
|
});
|
|
177
177
|
const isReadonly = computed(() => {
|
|
178
|
-
return formContext?.readonly
|
|
178
|
+
return formContext?.readonly || props.readonly;
|
|
179
179
|
});
|
|
180
180
|
const innerValue = ref(String(props.modelValue ?? ""));
|
|
181
181
|
const setInnerValue = (value) => {
|
|
@@ -71,10 +71,10 @@ export default _defineComponent({
|
|
|
71
71
|
const formContext = useFormContext();
|
|
72
72
|
const formItemContext = useFormItemContext();
|
|
73
73
|
const isDisabled = computed(() => {
|
|
74
|
-
return formContext?.disabled
|
|
74
|
+
return formContext?.disabled || props.disabled;
|
|
75
75
|
});
|
|
76
76
|
const isReadonly = computed(() => {
|
|
77
|
-
return formContext?.readonly
|
|
77
|
+
return formContext?.readonly || props.readonly;
|
|
78
78
|
});
|
|
79
79
|
const innerValue = ref(props.modelValue ?? "");
|
|
80
80
|
watch(
|
|
@@ -69,10 +69,10 @@ export default _defineComponent({
|
|
|
69
69
|
const bem = createBem("popout-input");
|
|
70
70
|
const formContext = useFormContext();
|
|
71
71
|
const isDisabled = computed(() => {
|
|
72
|
-
return formContext?.disabled
|
|
72
|
+
return formContext?.disabled || props.disabled;
|
|
73
73
|
});
|
|
74
74
|
const isReadonly = computed(() => {
|
|
75
|
-
return formContext?.readonly
|
|
75
|
+
return formContext?.readonly || props.readonly;
|
|
76
76
|
});
|
|
77
77
|
const innerValue = ref(props.modelValue);
|
|
78
78
|
const setInnerValue = (value) => {
|
|
@@ -11,10 +11,6 @@ export interface RadioProps {
|
|
|
11
11
|
type?: IconType;
|
|
12
12
|
checkedColor?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const radioPropsDefaults: {
|
|
15
|
-
disabled: undefined;
|
|
16
|
-
readonly: undefined;
|
|
17
|
-
};
|
|
18
14
|
export interface RadioSlots {
|
|
19
15
|
default?(props: Record<string, never>): any;
|
|
20
16
|
icon?(props: {
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { defaultConfig } from '../config';
|
|
2
|
-
export const radioPropsDefaults = {
|
|
3
|
-
disabled: undefined,
|
|
4
|
-
readonly: undefined,
|
|
5
|
-
};
|
|
6
2
|
export const radioGroupPropsDefaults = defaultConfig.radioGroup;
|
|
7
3
|
export const radioContextSymbol = Symbol('radio-context');
|
|
8
4
|
export const mapTypeIcon = {
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { type RadioProps, type RadioSlots } from './common';
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<RadioProps>, {
|
|
3
|
-
disabled: undefined;
|
|
4
|
-
readonly: undefined;
|
|
5
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<RadioProps>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
3
|
click: (event: any) => void;
|
|
7
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<RadioProps>, {
|
|
8
|
-
disabled: undefined;
|
|
9
|
-
readonly: undefined;
|
|
10
|
-
}>>> & {
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<RadioProps>, {}>>> & {
|
|
11
5
|
onClick?: ((event: any) => any) | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
readonly: boolean;
|
|
14
|
-
disabled: boolean;
|
|
15
|
-
}, {}>, Readonly<RadioSlots> & RadioSlots>;
|
|
6
|
+
}, {}, {}>, Readonly<RadioSlots> & RadioSlots>;
|
|
16
7
|
export default _default;
|
|
17
8
|
type __VLS_WithDefaults<P, D> = {
|
|
18
9
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
@@ -12,13 +12,12 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
-
import {
|
|
15
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
16
16
|
import { computed, provide, inject } from "vue";
|
|
17
17
|
import { classNames, createBem, stringifyStyle } from "../../utils";
|
|
18
18
|
import {
|
|
19
19
|
radioContextSymbol,
|
|
20
|
-
mapTypeIcon
|
|
21
|
-
radioPropsDefaults
|
|
20
|
+
mapTypeIcon
|
|
22
21
|
} from "./common";
|
|
23
22
|
import SarIcon from "../icon/icon.vue";
|
|
24
23
|
import { useFormContext } from "../form/common";
|
|
@@ -30,7 +29,7 @@ export default _defineComponent({
|
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
__name: "radio",
|
|
33
|
-
props:
|
|
32
|
+
props: {
|
|
34
33
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
35
34
|
rootClass: { type: String, required: false },
|
|
36
35
|
value: { type: null, required: false },
|
|
@@ -40,7 +39,7 @@ export default _defineComponent({
|
|
|
40
39
|
size: { type: String, required: false },
|
|
41
40
|
type: { type: String, required: false },
|
|
42
41
|
checkedColor: { type: String, required: false }
|
|
43
|
-
},
|
|
42
|
+
},
|
|
44
43
|
emits: ["click"],
|
|
45
44
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
46
45
|
__expose();
|
|
@@ -53,10 +52,10 @@ export default _defineComponent({
|
|
|
53
52
|
return !!groupContext && groupContext.value === props.value;
|
|
54
53
|
});
|
|
55
54
|
const isDisabled = computed(() => {
|
|
56
|
-
return formContext?.disabled
|
|
55
|
+
return formContext?.disabled || groupContext?.disabled || props.disabled;
|
|
57
56
|
});
|
|
58
57
|
const isReadonly = computed(() => {
|
|
59
|
-
return formContext?.readonly
|
|
58
|
+
return formContext?.readonly || groupContext?.readonly || props.readonly;
|
|
60
59
|
});
|
|
61
60
|
const onClick = (event) => {
|
|
62
61
|
if (!isDisabled.value && !isReadonly.value) {
|
package/components/rate/rate.vue
CHANGED
|
@@ -103,10 +103,10 @@ export default _defineComponent({
|
|
|
103
103
|
const formContext = useFormContext();
|
|
104
104
|
const formItemContext = useFormItemContext();
|
|
105
105
|
const isDisabled = computed(() => {
|
|
106
|
-
return formContext?.disabled
|
|
106
|
+
return formContext?.disabled || props.disabled;
|
|
107
107
|
});
|
|
108
108
|
const isReadonly = computed(() => {
|
|
109
|
-
return formContext?.readonly
|
|
109
|
+
return formContext?.readonly || props.readonly;
|
|
110
110
|
});
|
|
111
111
|
const innerValue = ref(props.modelValue ?? 0);
|
|
112
112
|
watch(
|
|
@@ -139,10 +139,10 @@ export default _defineComponent({
|
|
|
139
139
|
const formContext = useFormContext();
|
|
140
140
|
const formItemContext = useFormItemContext();
|
|
141
141
|
const isDisabled = computed(() => {
|
|
142
|
-
return formContext?.disabled
|
|
142
|
+
return formContext?.disabled || props.disabled;
|
|
143
143
|
});
|
|
144
144
|
const isReadonly = computed(() => {
|
|
145
|
-
return formContext?.readonly
|
|
145
|
+
return formContext?.readonly || props.readonly;
|
|
146
146
|
});
|
|
147
147
|
const innerValue = ref(
|
|
148
148
|
props.modelValue ?? (props.range ? [props.min, props.min] : props.min)
|
|
@@ -101,10 +101,10 @@ export default _defineComponent({
|
|
|
101
101
|
const formContext = useFormContext();
|
|
102
102
|
const formItemContext = useFormItemContext();
|
|
103
103
|
const isDisabled = computed(() => {
|
|
104
|
-
return formContext?.disabled
|
|
104
|
+
return formContext?.disabled || props.disabled;
|
|
105
105
|
});
|
|
106
106
|
const isReadonly = computed(() => {
|
|
107
|
-
return formContext?.readonly
|
|
107
|
+
return formContext?.readonly || props.readonly;
|
|
108
108
|
});
|
|
109
109
|
const innerValue = ref(props.modelValue);
|
|
110
110
|
const inputValue = ref(props.modelValue);
|
|
@@ -47,10 +47,10 @@ export default _defineComponent({
|
|
|
47
47
|
const formContext = useFormContext();
|
|
48
48
|
const formItemContext = useFormItemContext();
|
|
49
49
|
const isDisabled = computed(() => {
|
|
50
|
-
return formContext?.disabled
|
|
50
|
+
return formContext?.disabled || props.disabled;
|
|
51
51
|
});
|
|
52
52
|
const isReadonly = computed(() => {
|
|
53
|
-
return formContext?.readonly
|
|
53
|
+
return formContext?.readonly || props.readonly;
|
|
54
54
|
});
|
|
55
55
|
const innerValue = ref(props.modelValue);
|
|
56
56
|
watch(
|
|
@@ -91,10 +91,10 @@ export default _defineComponent({
|
|
|
91
91
|
const formContext = useFormContext();
|
|
92
92
|
const formItemContext = useFormItemContext();
|
|
93
93
|
const isDisabled = computed(() => {
|
|
94
|
-
return formContext?.disabled
|
|
94
|
+
return formContext?.disabled || props.disabled;
|
|
95
95
|
});
|
|
96
96
|
const isReadonly = computed(() => {
|
|
97
|
-
return formContext?.readonly
|
|
97
|
+
return formContext?.readonly || props.readonly;
|
|
98
98
|
});
|
|
99
99
|
const innerValue = ref(props.modelValue || []);
|
|
100
100
|
watch(
|