types(CollapseItem): add CollapseItemInstance type (#9194)

This commit is contained in:
neverland
2021-08-06 18:25:26 +08:00
committed by GitHub
parent d3828f6ed5
commit 2cfb39ad35
5 changed files with 72 additions and 23 deletions
+18 -7
View File
@@ -1,4 +1,11 @@
import { ref, watch, computed, nextTick, defineComponent } from 'vue';
import {
ref,
watch,
computed,
nextTick,
defineComponent,
ExtractPropTypes,
} from 'vue';
// Utils
import { cellProps } from '../cell/Cell';
@@ -17,15 +24,19 @@ const [name, bem] = createNamespace('collapse-item');
const CELL_SLOTS = ['icon', 'title', 'value', 'label', 'right-icon'] as const;
const props = extend({}, cellProps, {
name: [Number, String],
isLink: truthProp,
disabled: Boolean,
readonly: Boolean,
});
export type CollapseItemProps = ExtractPropTypes<typeof props>;
export default defineComponent({
name,
props: extend({}, cellProps, {
name: [Number, String],
isLink: truthProp,
disabled: Boolean,
readonly: Boolean,
}),
props,
setup(props, { slots }) {
const wrapperRef = ref<HTMLElement>();