mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-29 18:48:32 +08:00
a2f7d6d062
closes vueComponent/ant-design-vue#5765 Add `compatConfig: { MODE: 3 }` to all component definitions to signal to `@vue/compat` not to use any Vue 2 compatibility features.
25 lines
716 B
Vue
25 lines
716 B
Vue
import type { ExtractPropTypes, PropType } from 'vue';
|
|
import { defineComponent } from 'vue';
|
|
|
|
export const skeletonTitleProps = () => ({
|
|
prefixCls: String,
|
|
width: { type: [Number, String] as PropType<string | number> },
|
|
});
|
|
|
|
export type SkeletonTitleProps = Partial<ExtractPropTypes<ReturnType<typeof skeletonTitleProps>>>;
|
|
|
|
const SkeletonTitle = defineComponent({
|
|
compatConfig: { MODE: 3 },
|
|
name: 'SkeletonTitle',
|
|
props: skeletonTitleProps(),
|
|
setup(props) {
|
|
return () => {
|
|
const { prefixCls, width } = props;
|
|
const zWidth = typeof width === 'number' ? `${width}px` : width;
|
|
return <h3 class={prefixCls} style={{ width: zWidth }} />;
|
|
};
|
|
},
|
|
});
|
|
|
|
export default SkeletonTitle;
|