UNPKG

tdesign-vue-next

Version:
1 lines 2.13 kB
{"version":3,"file":"paragraph.mjs","sources":["../../../components/typography/paragraph.tsx"],"sourcesContent":["import { defineComponent, computed, PropType } from 'vue';\nimport { usePrefixClass, useContent } from '@tdesign/shared-hooks';\nimport props from './paragraph-props';\nimport Ellipsis from './components/ellipsis';\n\nexport default defineComponent({\n name: 'TTypographyParagraph',\n props: {\n style: {\n type: Object as PropType<Record<string, string | number>>,\n default: () => ({}),\n },\n ...props,\n },\n setup(props) {\n const COMPONENT_NAME = usePrefixClass('typography');\n const renderContent = useContent();\n const content = computed(() => {\n return renderContent('content', 'default');\n });\n\n return () => {\n return props.ellipsis ? (\n <Ellipsis {...props} class={COMPONENT_NAME.value}>\n {content.value}\n </Ellipsis>\n ) : (\n <p class={COMPONENT_NAME.value}>{content.value}</p>\n );\n };\n },\n});\n"],"names":["defineComponent","name","props","_objectSpread","style","type","Object","default","setup","COMPONENT_NAME","usePrefixClass","renderContent","useContent","content","computed","ellipsis","_createVNode","Ellipsis","_mergeProps","value","_default"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,iBAAeA,eAAgB,CAAA;AAC7BC,EAAAA,IAAM,EAAA,sBAAA;AACNC,EAAAA,KAAO,EAAAC,aAAA,CAAA;AACLC,IAAAA,KAAO,EAAA;AACLC,MAAAA,IAAM,EAAAC,MAAA;MACN,SAAS,EAAA,SAATC,QAAAA,GAAA;AAAA,QAAA,OAAgB,EAAC,CAAA;AAAA,OAAA;AACnB,KAAA;AAAA,GAAA,EACGL,KAAA,CACL;AACAM,EAAAA,OAAAA,SAAAA,MAAMN,MAAO,EAAA;AACL,IAAA,IAAAO,cAAA,GAAiBC,eAAe,YAAY,CAAA,CAAA;AAClD,IAAA,IAAMC,gBAAgBC,UAAW,EAAA,CAAA;AAC3B,IAAA,IAAAC,OAAA,GAAUC,SAAS,YAAM;AACtB,MAAA,OAAAH,aAAA,CAAc,WAAW,SAAS,CAAA,CAAA;AAC3C,KAAC,CAAA,CAAA;AAED,IAAA,OAAO,YAAM;MACX,OAAOT,OAAMa,QACX,GAAAC,WAAA,CAAAC,QAAA,EAAAC,UAAA,CAAchB,MAAO,EAAA;AAAA,QAAA,OAAA,EAAOO,eAAeU,KAAAA;AACxC,OAAA,CAAA,EAAA;AAAA,QAAA,SAAA,EAAA,SAAAC,QAAA,GAAA;UAAA,OAAAP,CAAAA,OAAA,CAAQM;;;iBAGDV,eAAeU,KAAAA;OAAQN,EAAAA,CAAAA,OAAA,CAAQM,MAAxC,CAAA,CAAA;KAEL,CAAA;AACF,GAAA;AACF,CAAC,CAAA;;;;"}