diff --git a/src/config.json b/src/config.json index ee8732ea33..0239f9a46c 100644 --- a/src/config.json +++ b/src/config.json @@ -80,6 +80,7 @@ "name": "Cell", "cName": "单元格", "desc": "展示列表", + "setup": true, "author": "richard1015" }, { @@ -88,6 +89,7 @@ "cName": "单元格组件", "show": false, "desc": "展示分组列表", + "setup": true, "author": "richard1015" }, { diff --git a/src/packages/__VUE/cell/cell.taro.vue b/src/packages/__VUE/cell/cell.taro.vue new file mode 100644 index 0000000000..4346ecf143 --- /dev/null +++ b/src/packages/__VUE/cell/cell.taro.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/packages/__VUE/cell/cell.vue b/src/packages/__VUE/cell/cell.vue new file mode 100644 index 0000000000..5d130ac54c --- /dev/null +++ b/src/packages/__VUE/cell/cell.vue @@ -0,0 +1,118 @@ + + + diff --git a/src/packages/__VUE/cell/doc.en-US.md b/src/packages/__VUE/cell/doc.en-US.md index eefa2a8f87..828047226a 100644 --- a/src/packages/__VUE/cell/doc.en-US.md +++ b/src/packages/__VUE/cell/doc.en-US.md @@ -105,6 +105,18 @@ You can center the left and right contents of the cell vertically through the 'c | title | Custom `title` slot | | desc | Custom `desc` slot | +### Types version + +The component exports the following type definitions: + +```js +import type { + CellSize, + CellProps, + CellInstance +} from '@nutui/nutui'; +``` + ## Theming ### CSS Variables diff --git a/src/packages/__VUE/cell/doc.md b/src/packages/__VUE/cell/doc.md index 6645819e1c..893949e030 100644 --- a/src/packages/__VUE/cell/doc.md +++ b/src/packages/__VUE/cell/doc.md @@ -105,6 +105,18 @@ app.use(CellGroup) | title | 自定义 `title` 标题区域 | | desc | 自定义 `desc` 描述区域 | +### 类型定义 version + +组件导出以下类型定义: + +```js +import type { + CellSize, + CellProps, + CellInstance +} from '@nutui/nutui'; +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/cell/doc.taro.md b/src/packages/__VUE/cell/doc.taro.md index dc86c9ccf2..af467bc4d1 100644 --- a/src/packages/__VUE/cell/doc.taro.md +++ b/src/packages/__VUE/cell/doc.taro.md @@ -102,6 +102,18 @@ app.use(CellGroup) | title | 自定义 `title` 标题区域 | | desc | 自定义 `desc` 描述区域 | +### 类型定义 version + +组件导出以下类型定义: + +```js +import type { + CellSize, + CellProps, + CellInstance +} from '@nutui/nutui-taro'; +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/cell/index.taro.ts b/src/packages/__VUE/cell/index.taro.ts new file mode 100644 index 0000000000..d7bc83ac86 --- /dev/null +++ b/src/packages/__VUE/cell/index.taro.ts @@ -0,0 +1,13 @@ +import Cell from './cell.taro.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(Cell) + +export type { CellProps } from './cell.taro.vue' + +export type { CellSize } from './types' + +export type CellInstance = ComponentPublicInstance & InstanceType + +export { Cell, Cell as default } diff --git a/src/packages/__VUE/cell/index.taro.vue b/src/packages/__VUE/cell/index.taro.vue deleted file mode 100644 index 07b44de673..0000000000 --- a/src/packages/__VUE/cell/index.taro.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/packages/__VUE/cell/index.ts b/src/packages/__VUE/cell/index.ts new file mode 100644 index 0000000000..ad1b24b33d --- /dev/null +++ b/src/packages/__VUE/cell/index.ts @@ -0,0 +1,13 @@ +import Cell from './cell.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(Cell) + +export type { CellProps } from './cell.vue' + +export type { CellSize } from './types' + +export type CellInstance = ComponentPublicInstance & InstanceType + +export { Cell, Cell as default } diff --git a/src/packages/__VUE/cell/index.vue b/src/packages/__VUE/cell/index.vue deleted file mode 100644 index ccc812e65c..0000000000 --- a/src/packages/__VUE/cell/index.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - diff --git a/src/packages/__VUE/cellgroup/index.taro.vue b/src/packages/__VUE/cellgroup/cell-group.taro.vue similarity index 61% rename from src/packages/__VUE/cellgroup/index.taro.vue rename to src/packages/__VUE/cellgroup/cell-group.taro.vue index 94ddb73791..602d023e8e 100644 --- a/src/packages/__VUE/cellgroup/index.taro.vue +++ b/src/packages/__VUE/cellgroup/cell-group.taro.vue @@ -10,13 +10,18 @@ - diff --git a/src/packages/__VUE/cellgroup/index.vue b/src/packages/__VUE/cellgroup/cell-group.vue similarity index 61% rename from src/packages/__VUE/cellgroup/index.vue rename to src/packages/__VUE/cellgroup/cell-group.vue index 94ddb73791..602d023e8e 100644 --- a/src/packages/__VUE/cellgroup/index.vue +++ b/src/packages/__VUE/cellgroup/cell-group.vue @@ -10,13 +10,18 @@ - diff --git a/src/packages/__VUE/cellgroup/index.taro.ts b/src/packages/__VUE/cellgroup/index.taro.ts new file mode 100644 index 0000000000..b503cb6dd0 --- /dev/null +++ b/src/packages/__VUE/cellgroup/index.taro.ts @@ -0,0 +1,11 @@ +import CellGroup from './cell-group.taro.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(CellGroup) + +export type { CellGroupProps } from './cell-group.taro.vue' + +export type CellGroupInstance = ComponentPublicInstance & InstanceType + +export { CellGroup, CellGroup as default } diff --git a/src/packages/__VUE/cellgroup/index.ts b/src/packages/__VUE/cellgroup/index.ts new file mode 100644 index 0000000000..83850096ae --- /dev/null +++ b/src/packages/__VUE/cellgroup/index.ts @@ -0,0 +1,11 @@ +import CellGroup from './cell-group.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(CellGroup) + +export type { CellGroupProps } from './cell-group.vue' + +export type CellGroupInstance = ComponentPublicInstance & InstanceType + +export { CellGroup, CellGroup as default } diff --git a/src/packages/__VUE/form/form.taro.vue b/src/packages/__VUE/form/form.taro.vue index 0ef42731be..ac5ca568ed 100644 --- a/src/packages/__VUE/form/form.taro.vue +++ b/src/packages/__VUE/form/form.taro.vue @@ -8,7 +8,7 @@