diff --git a/src/config.json b/src/config.json index 82701af660..e2756f3c3d 100644 --- a/src/config.json +++ b/src/config.json @@ -781,6 +781,7 @@ "cType": "展示组件", "cName": "趋势箭头", "desc": "带有箭头指示的百分比数字,用以展示指标趋势", + "setup": true, "author": "liukun" }, { diff --git a/src/packages/__VUE/trendarrow/doc.en-US.md b/src/packages/__VUE/trendarrow/doc.en-US.md index bed5c3aabb..e8e3615d99 100644 --- a/src/packages/__VUE/trendarrow/doc.en-US.md +++ b/src/packages/__VUE/trendarrow/doc.en-US.md @@ -65,6 +65,14 @@ app.use(TrendArrow); | up-icon | custom up icon | | down-icon | custom down icon | +### Types version + +The component exports the following type definitions: + +```ts +import type { TrendArrowProps, TrendArrowInstance } from '@nutui/nutui'; +``` + ## Theming ### CSS Variables diff --git a/src/packages/__VUE/trendarrow/doc.md b/src/packages/__VUE/trendarrow/doc.md index 278a5249c2..bff9faa42e 100644 --- a/src/packages/__VUE/trendarrow/doc.md +++ b/src/packages/__VUE/trendarrow/doc.md @@ -65,6 +65,14 @@ app.use(TrendArrow); | up-icon | 自定义向上箭头图标,默认使用 `TriangleUp` | | down-icon | 自定义向下箭头图标,默认使用 `TriangleDown` | +### 类型定义 version + +组件导出以下类型定义: + +```ts +import type { TrendArrowProps, TrendArrowInstance } from '@nutui/nutui'; +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/trendarrow/doc.taro.md b/src/packages/__VUE/trendarrow/doc.taro.md index 12e85635c0..f534d501f2 100644 --- a/src/packages/__VUE/trendarrow/doc.taro.md +++ b/src/packages/__VUE/trendarrow/doc.taro.md @@ -65,6 +65,14 @@ app.use(TrendArrow); | up-icon | 自定义向上箭头图标,默认使用 `TriangleUp` | | down-icon | 自定义向下箭头图标,默认使用 `TriangleDown` | +### 类型定义 version + +组件导出以下类型定义: + +```ts +import type { TrendArrowProps, TrendArrowInstance } from '@nutui/nutui-taro'; +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/trendarrow/index.taro.ts b/src/packages/__VUE/trendarrow/index.taro.ts new file mode 100644 index 0000000000..9a7f29397e --- /dev/null +++ b/src/packages/__VUE/trendarrow/index.taro.ts @@ -0,0 +1,11 @@ +import TrendArrow from './trend-arrow.taro.vue'; +import type { ComponentPublicInstance } from 'vue'; +import { withInstall } from '@/packages/utils'; + +withInstall(TrendArrow); + +export type { TrendArrowProps } from './trend-arrow.taro.vue'; + +export type TrendArrowInstance = ComponentPublicInstance & InstanceType; + +export { TrendArrow, TrendArrow as default }; diff --git a/src/packages/__VUE/trendarrow/index.taro.vue b/src/packages/__VUE/trendarrow/index.taro.vue deleted file mode 100644 index 0843a4b242..0000000000 --- a/src/packages/__VUE/trendarrow/index.taro.vue +++ /dev/null @@ -1,92 +0,0 @@ - - diff --git a/src/packages/__VUE/trendarrow/index.ts b/src/packages/__VUE/trendarrow/index.ts new file mode 100644 index 0000000000..20bee596f3 --- /dev/null +++ b/src/packages/__VUE/trendarrow/index.ts @@ -0,0 +1,11 @@ +import TrendArrow from './trend-arrow.vue'; +import type { ComponentPublicInstance } from 'vue'; +import { withInstall } from '@/packages/utils'; + +withInstall(TrendArrow); + +export type { TrendArrowProps } from './trend-arrow.vue'; + +export type TrendArrowInstance = ComponentPublicInstance & InstanceType; + +export { TrendArrow, TrendArrow as default }; diff --git a/src/packages/__VUE/trendarrow/index.vue b/src/packages/__VUE/trendarrow/index.vue deleted file mode 100644 index b5197df2cc..0000000000 --- a/src/packages/__VUE/trendarrow/index.vue +++ /dev/null @@ -1,92 +0,0 @@ - - diff --git a/src/packages/__VUE/trendarrow/trend-arrow.taro.vue b/src/packages/__VUE/trendarrow/trend-arrow.taro.vue new file mode 100644 index 0000000000..c2e0663188 --- /dev/null +++ b/src/packages/__VUE/trendarrow/trend-arrow.taro.vue @@ -0,0 +1,77 @@ + + diff --git a/src/packages/__VUE/trendarrow/trend-arrow.vue b/src/packages/__VUE/trendarrow/trend-arrow.vue new file mode 100644 index 0000000000..f8c0e57164 --- /dev/null +++ b/src/packages/__VUE/trendarrow/trend-arrow.vue @@ -0,0 +1,77 @@ + +