fix: select diabled not work
parent
f6953dc9a7
commit
59440f9207
|
@ -74,7 +74,7 @@ export default defineComponent({
|
|||
size={fullscreen ? undefined : 'small'}
|
||||
class={`${prefixCls}-year-select`}
|
||||
onChange={this.onYearChange}
|
||||
value={String(year)}
|
||||
value={year}
|
||||
options={options}
|
||||
getPopupContainer={() => this.calendarHeaderNode}
|
||||
></Select>
|
||||
|
|
|
@ -6,12 +6,18 @@ function convertNodeToOption(node: VNode): OptionData {
|
|||
const {
|
||||
key,
|
||||
children,
|
||||
props: { value, ...restProps },
|
||||
props: { value, disabled, ...restProps },
|
||||
} = node as VNode & {
|
||||
children: { default?: () => any };
|
||||
};
|
||||
const child = children.default ? children.default() : undefined;
|
||||
return { key, value: value !== undefined ? value : key, children: child, ...restProps };
|
||||
return {
|
||||
key,
|
||||
value: value !== undefined ? value : key,
|
||||
children: child,
|
||||
disabled: disabled || disabled === '', // support <a-select-option disabled />
|
||||
...restProps,
|
||||
};
|
||||
}
|
||||
|
||||
export function convertChildrenToData(
|
||||
|
|
Loading…
Reference in New Issue