diff --git a/src/config.json b/src/config.json index 77db6c635a..b30b2f58ca 100644 --- a/src/config.json +++ b/src/config.json @@ -286,6 +286,7 @@ "name": "Indicator", "cName": "指示器", "desc": "显示一个任务或流程的进度,常用语开通流程。", + "setup": true, "author": "senyawang" }, { diff --git a/src/packages/__VUE/indicator/doc.en-US.md b/src/packages/__VUE/indicator/doc.en-US.md index f3571fb68b..e5c9fb8286 100644 --- a/src/packages/__VUE/indicator/doc.en-US.md +++ b/src/packages/__VUE/indicator/doc.en-US.md @@ -38,6 +38,14 @@ app.use(Indicator) | align | Alignment, which takes effect only when `block` is `true`. optional value `left`, `right`, `center` | string | `left` | | fill-zero | Whether to add 0 before singular number | boolean | `true` | +### Types version + +The component exports the following type definitions: + +```ts +import type { IndicatorAlign, IndicatorProps, IndicatorInstance } from '@nutui/nutui' +``` + ## Theming ### CSS Variables diff --git a/src/packages/__VUE/indicator/doc.md b/src/packages/__VUE/indicator/doc.md index e1cd58fda4..6d609f8552 100644 --- a/src/packages/__VUE/indicator/doc.md +++ b/src/packages/__VUE/indicator/doc.md @@ -38,6 +38,14 @@ app.use(Indicator) | align | 对齐方式,仅在 `block` 为 `true` 时生效, 可选值 `left`, `right`, `center` | string | `left` | | fill-zero | 单数前面是否补 0 | boolean | `true` | +### 类型定义 version + +组件导出以下类型定义: + +```ts +import type { IndicatorAlign, IndicatorProps, IndicatorInstance } from '@nutui/nutui' +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/indicator/doc.taro.md b/src/packages/__VUE/indicator/doc.taro.md index 2c2e3a37ab..82b645d88a 100644 --- a/src/packages/__VUE/indicator/doc.taro.md +++ b/src/packages/__VUE/indicator/doc.taro.md @@ -38,6 +38,14 @@ app.use(Indicator) | align | 对齐方式,仅在 `block` 为 `true` 时生效, 可选值 `left`, `right`, `center` | string | `left` | | fill-zero | 单数前面是否补 0 | boolean | `true` | +### 类型定义 version + +组件导出以下类型定义: + +```ts +import type { IndicatorAlign, IndicatorProps, IndicatorInstance } from '@nutui/nutui-taro' +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/indicator/index.taro.ts b/src/packages/__VUE/indicator/index.taro.ts new file mode 100644 index 0000000000..2481513199 --- /dev/null +++ b/src/packages/__VUE/indicator/index.taro.ts @@ -0,0 +1,13 @@ +import Indicator from './indicator.taro.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(Indicator) + +export type { IndicatorProps } from './indicator.taro.vue' + +export type { IndicatorAlign } from './types' + +export type IndicatorInstance = ComponentPublicInstance & InstanceType + +export { Indicator, Indicator as default } diff --git a/src/packages/__VUE/indicator/index.taro.vue b/src/packages/__VUE/indicator/index.taro.vue deleted file mode 100644 index 135d63f8fc..0000000000 --- a/src/packages/__VUE/indicator/index.taro.vue +++ /dev/null @@ -1,53 +0,0 @@ - - diff --git a/src/packages/__VUE/indicator/index.ts b/src/packages/__VUE/indicator/index.ts new file mode 100644 index 0000000000..c801886943 --- /dev/null +++ b/src/packages/__VUE/indicator/index.ts @@ -0,0 +1,13 @@ +import Indicator from './indicator.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(Indicator) + +export type { IndicatorProps } from './indicator.vue' + +export type { IndicatorAlign } from './types' + +export type IndicatorInstance = ComponentPublicInstance & InstanceType + +export { Indicator, Indicator as default } diff --git a/src/packages/__VUE/indicator/index.vue b/src/packages/__VUE/indicator/index.vue deleted file mode 100644 index 135d63f8fc..0000000000 --- a/src/packages/__VUE/indicator/index.vue +++ /dev/null @@ -1,53 +0,0 @@ - - diff --git a/src/packages/__VUE/indicator/indicator.taro.vue b/src/packages/__VUE/indicator/indicator.taro.vue new file mode 100644 index 0000000000..ff28573738 --- /dev/null +++ b/src/packages/__VUE/indicator/indicator.taro.vue @@ -0,0 +1,44 @@ + + diff --git a/src/packages/__VUE/indicator/indicator.vue b/src/packages/__VUE/indicator/indicator.vue new file mode 100644 index 0000000000..ff28573738 --- /dev/null +++ b/src/packages/__VUE/indicator/indicator.vue @@ -0,0 +1,44 @@ + +