mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-10 07:58:26 +08:00
23 lines
679 B
TypeScript
23 lines
679 B
TypeScript
import { defineComponent, ExtractPropTypes } from 'vue';
|
|
import PropTypes from '../_util/vue-types';
|
|
|
|
const skeletonTitleProps = {
|
|
prefixCls: PropTypes.string,
|
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
};
|
|
|
|
export const SkeletonTitleProps = PropTypes.shape(skeletonTitleProps);
|
|
|
|
export type ISkeletonTitleProps = Partial<ExtractPropTypes<typeof skeletonTitleProps>>;
|
|
|
|
const Title = defineComponent({
|
|
props: skeletonTitleProps,
|
|
render() {
|
|
const { prefixCls, width } = this.$props;
|
|
const zWidth = typeof width === 'number' ? `${width}px` : width;
|
|
return <h3 class={prefixCls} style={{ width: zWidth }} />;
|
|
},
|
|
});
|
|
|
|
export default Title;
|