fix: ts error
parent
44ae7f1b93
commit
3b08eee8c7
|
@ -29,7 +29,7 @@ const buttonProps = () => ({
|
|||
type: String as PropType<SizeType>,
|
||||
},
|
||||
loading: {
|
||||
type: [Boolean, Object],
|
||||
type: [Boolean, Object] as PropType<boolean | { delay?: number }>,
|
||||
default: (): boolean | { delay?: number } => false,
|
||||
},
|
||||
disabled: PropTypes.looseBool,
|
||||
|
|
|
@ -14,7 +14,7 @@ export default defineComponent({
|
|||
item: PropTypes.any,
|
||||
renderItem: Function as PropType<(item: any) => VueNode>,
|
||||
responsive: Boolean,
|
||||
itemKey: [String, Number],
|
||||
itemKey: { type: [String, Number] as PropType<string | number> },
|
||||
registerSize: Function as PropType<(key: Key, width: number | null) => void>,
|
||||
display: Boolean,
|
||||
order: Number,
|
||||
|
@ -29,7 +29,7 @@ export default defineComponent({
|
|||
|
||||
// ================================ Effect ================================
|
||||
function internalRegisterSize(width: number | null) {
|
||||
props.registerSize(props.itemKey!, width);
|
||||
props.registerSize(props.itemKey, width);
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
|
|
Loading…
Reference in New Issue