vuecssuiant-designantdreactantantd-vueenterprisefrontendui-designvue-antdvue-antd-uivue3vuecomponent
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
716 B
24 lines
716 B
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;
|
|
|