fix: ts error

pull/4624/head
undefined 2021-09-06 22:47:56 +08:00
parent 44ae7f1b93
commit 3b08eee8c7
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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(() => {