mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 21:18:14 +08:00
00dc2add94
* feat: update prop type * feat: update ts type * feat: update ts type * feat: update ts type * feat: update ts type * test: update snap * feat: update ts type
24 lines
682 B
Vue
24 lines
682 B
Vue
import type { ExtractPropTypes, FunctionalComponent } from 'vue';
|
|
import omit from '../_util/omit';
|
|
import Base, { baseProps } from './Base';
|
|
|
|
export const paragraphProps = () => omit(baseProps(), ['component']);
|
|
|
|
export type ParagraphProps = Partial<ExtractPropTypes<ReturnType<typeof paragraphProps>>>;
|
|
|
|
const Paragraph: FunctionalComponent<ParagraphProps> = (props, { slots, attrs }) => {
|
|
const paragraphProps = {
|
|
...props,
|
|
component: 'div',
|
|
...attrs,
|
|
};
|
|
|
|
return <Base {...paragraphProps} v-slots={slots}></Base>;
|
|
};
|
|
|
|
Paragraph.displayName = 'ATypographyParagraph';
|
|
Paragraph.inheritAttrs = false;
|
|
Paragraph.props = paragraphProps();
|
|
|
|
export default Paragraph;
|