From fb9e2f0827cf600e1e7504d2ece5ec95cc0309f8 Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 15:56:05 +0800 Subject: [PATCH 1/8] fix(empty): actions add support for events --- src/packages/empty/demo.taro.tsx | 6 ++++++ src/packages/empty/demo.tsx | 6 ++++++ src/packages/empty/demos/h5/demo7.tsx | 22 ++++++++++++++++++++++ src/packages/empty/demos/taro/demo7.tsx | 22 ++++++++++++++++++++++ src/packages/empty/doc.en-US.md | 23 ++++++++++++++++++++++- src/packages/empty/doc.md | 23 ++++++++++++++++++++++- src/packages/empty/doc.taro.md | 23 ++++++++++++++++++++++- src/packages/empty/doc.zh-TW.md | 23 ++++++++++++++++++++++- src/packages/empty/empty.taro.tsx | 12 +++++++----- src/packages/empty/empty.tsx | 15 +++++++++------ src/packages/empty/types.ts | 12 +++++++++++- src/packages/empty/utils.ts | 6 ++++++ 12 files changed, 177 insertions(+), 16 deletions(-) create mode 100644 src/packages/empty/demos/h5/demo7.tsx create mode 100644 src/packages/empty/demos/taro/demo7.tsx create mode 100644 src/packages/empty/utils.ts diff --git a/src/packages/empty/demo.taro.tsx b/src/packages/empty/demo.taro.tsx index b450fda6d8..b4503a962f 100644 --- a/src/packages/empty/demo.taro.tsx +++ b/src/packages/empty/demo.taro.tsx @@ -8,6 +8,7 @@ import Demo3 from './demos/taro/demo3' import Demo4 from './demos/taro/demo4' import Demo5 from './demos/taro/demo5' import Demo6 from './demos/taro/demo6' +import Demo7 from './demos/taro/demo7' const EmptyDemo = () => { const [translated] = useTranslate({ @@ -18,6 +19,7 @@ const EmptyDemo = () => { b840c88f: '图片类型,内置3个', a74a1fd4: '自定义图片', '8dab2f66': '底部内容', + actions: 'Actions', }, 'zh-TW': { ce5c5446: '基礎用法', @@ -26,6 +28,7 @@ const EmptyDemo = () => { b840c88f: '圖片類型,內置3個', a74a1fd4: '自定義圖片', '8dab2f66': '底部內容', + actions: 'Actions', }, 'en-US': { ce5c5446: 'Basic usage', @@ -34,6 +37,7 @@ const EmptyDemo = () => { b840c88f: 'Picture type, built-in 3', a74a1fd4: 'Custom image', '8dab2f66': 'Bottom content', + actions: 'Actions', }, }) @@ -53,6 +57,8 @@ const EmptyDemo = () => {

{translated['8dab2f66']}

+

{translated.actions}

+ ) diff --git a/src/packages/empty/demo.tsx b/src/packages/empty/demo.tsx index ef49b69847..f501032e19 100644 --- a/src/packages/empty/demo.tsx +++ b/src/packages/empty/demo.tsx @@ -6,6 +6,7 @@ import Demo3 from './demos/h5/demo3' import Demo4 from './demos/h5/demo4' import Demo5 from './demos/h5/demo5' import Demo6 from './demos/h5/demo6' +import Demo7 from './demos/h5/demo7' const EmptyDemo = () => { const [translated] = useTranslate({ @@ -16,6 +17,7 @@ const EmptyDemo = () => { b840c88f: '图片类型,内置3个', a74a1fd4: '自定义图片', '8dab2f66': '底部内容', + actions: 'Actions', }, 'zh-TW': { ce5c5446: '基礎用法', @@ -24,6 +26,7 @@ const EmptyDemo = () => { b840c88f: '圖片類型,內置3個', a74a1fd4: '自定義圖片', '8dab2f66': '底部內容', + actions: 'Actions', }, 'en-US': { ce5c5446: 'Basic usage', @@ -32,6 +35,7 @@ const EmptyDemo = () => { b840c88f: 'Picture type, built-in 3', a74a1fd4: 'Custom image', '8dab2f66': 'Bottom content', + actions: 'Actions', }, }) @@ -49,6 +53,8 @@ const EmptyDemo = () => {

{translated['8dab2f66']}

+

{translated.actions}

+ ) } diff --git a/src/packages/empty/demos/h5/demo7.tsx b/src/packages/empty/demos/h5/demo7.tsx new file mode 100644 index 0000000000..3d34af9ca1 --- /dev/null +++ b/src/packages/empty/demos/h5/demo7.tsx @@ -0,0 +1,22 @@ +import React from 'react' +import { Empty, Toast } from '@nutui/nutui-react' + +const Demo7 = () => { + return ( + { + Toast.show({ title: 'Action Click!' }) + }, + }, + ]} + /> + ) +} +export default Demo7 diff --git a/src/packages/empty/demos/taro/demo7.tsx b/src/packages/empty/demos/taro/demo7.tsx new file mode 100644 index 0000000000..3d34af9ca1 --- /dev/null +++ b/src/packages/empty/demos/taro/demo7.tsx @@ -0,0 +1,22 @@ +import React from 'react' +import { Empty, Toast } from '@nutui/nutui-react' + +const Demo7 = () => { + return ( + { + Toast.show({ title: 'Action Click!' }) + }, + }, + ]} + /> + ) +} +export default Demo7 diff --git a/src/packages/empty/doc.en-US.md b/src/packages/empty/doc.en-US.md index a5aa921d6a..598c22e849 100644 --- a/src/packages/empty/doc.en-US.md +++ b/src/packages/empty/doc.en-US.md @@ -60,6 +60,14 @@ import { Empty } from '@nutui/nutui-react' ::: +### Actions + +:::demo + + + +::: + ## Empty ### Props @@ -72,7 +80,20 @@ import { Empty } from '@nutui/nutui-react' | description | Description below the image | `ReactNode` | `-` | | size | Size of component,used by full screen or half screen | `small` \| `base` | `base` | | status | The Default error type | `empty` \| `error` \| `network` | `empty` | -| actions | Actions of operation | `Array` | `[]` | +| actions | Actions of operation | `Array` | `[]` | + +### EmptyAction + +| Property | Description | Type | Default | +| --- | --- | --- | --- | +| text | The text | ReactNode | - | +| className | Class name of the action button | string | - | +| style | Style of the action button | CSSProperties | - | +| type | Type of the action button | ButtonType | - | +| size | Size of the action button | ButtonSize | - | +| fill | Fill of the action button | ButtonFill | - | +| disabled | Whether disabled state or not | boolean | false | +| onClick | Triggered on click | () =\> void | - | ## Theming diff --git a/src/packages/empty/doc.md b/src/packages/empty/doc.md index 48ba74e437..f82e786c30 100644 --- a/src/packages/empty/doc.md +++ b/src/packages/empty/doc.md @@ -60,6 +60,14 @@ import { Empty } from '@nutui/nutui-react' ::: +### Actions + +:::demo + + + +::: + ## Empty ### Props @@ -72,7 +80,20 @@ import { Empty } from '@nutui/nutui-react' | description | 图片下方的描述文字 | `ReactNode` | `-` | | size | 组件整体大小,适配于全屏或半屏 | `small` \| `base` | `base` | | status | 默认图片错误类型 | `empty` \| `error` \| `network` | `empty` | -| actions | 可用于处理操作的一组数据 | `Array` | `[]` | +| actions | 可用于处理操作的一组数据 | `Array` | `[]` | + +### EmptyAction + +| 属性 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| text | 文本 | ReactNode | - | +| className | Button 组件的类名 | string | - | +| style | Button 组件的 style | CSSProperties | - | +| type | Button 组件的 type | ButtonType | - | +| size | Button 组件的 size | ButtonSize | - | +| fill | Button 组件的 fill 属性 | ButtonFill | - | +| disabled | 是否禁用 | boolean | false | +| onClick | Button 组件的 onClick | () =\> void | - | ## 主题定制 diff --git a/src/packages/empty/doc.taro.md b/src/packages/empty/doc.taro.md index 838bb5124b..61ef072c26 100644 --- a/src/packages/empty/doc.taro.md +++ b/src/packages/empty/doc.taro.md @@ -60,6 +60,14 @@ import { Empty } from '@nutui/nutui-react-taro' ::: +### Actions + +:::demo + + + +::: + ## Empty ### Props @@ -72,7 +80,20 @@ import { Empty } from '@nutui/nutui-react-taro' | description | 图片下方的描述文字 | `ReactNode` | `-` | | size | 组件整体大小,适配于全屏或半屏 | `small` \| `base` | `base` | | status | 默认图片错误类型 | `empty` \| `error` \| `network` | `empty` | -| actions | 可用于处理操作的一组数据 | `Array` | `[]` | +| actions | 可用于处理操作的一组数据 | `Array` | `[]` | + +### EmptyAction + +| 属性 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| text | 文本 | ReactNode | - | +| className | Button 组件的类名 | string | - | +| style | Button 组件的 style | CSSProperties | - | +| type | Button 组件的 type | ButtonType | - | +| size | Button 组件的 size | ButtonSize | - | +| fill | Button 组件的 fill 属性 | ButtonFill | - | +| disabled | 是否禁用 | boolean | false | +| onClick | Button 组件的 onClick | () =\> void | - | ## 主题定制 diff --git a/src/packages/empty/doc.zh-TW.md b/src/packages/empty/doc.zh-TW.md index e80c5f9f76..37e0fc3441 100644 --- a/src/packages/empty/doc.zh-TW.md +++ b/src/packages/empty/doc.zh-TW.md @@ -60,6 +60,14 @@ import { Empty } from '@nutui/nutui-react' ::: +### Actions + +:::demo + + + +::: + ## Empty ### Props @@ -72,7 +80,20 @@ import { Empty } from '@nutui/nutui-react' | description | 圖片下方的描述文字 | `ReactNode` | `-` | | size | 組件整體大小,適配於全屏或半屏 | `small` \| `base` | `base` | | status | 默認圖片錯誤類型 | `empty` \| `error` \| `network` | `empty` | -| actions | 可用於處理操作的一組數據 | `Array` | `[]` | +| actions | 可用於處理操作的一組數據 | `Array` | `[]` | + +### EmptyAction + +| 屬性 | 說明 | 類型 | 默認值 | +| --- | --- | --- | --- | +| text | 文本 | `ReactNode` | `-` | +| className | Button 組件的類名 | `string` | `-` | +| style | Button 組件的 style | `CSSProperties` | `-` | +| type | Button 組件的 type | `ButtonType` | `-` | +| size | Button 組件的 size | `ButtonSize` | `-` | +| fill | Button 組件的 fill 屬性 | `ButtonFill` | `-` | +| disabled | 是否禁用 | `boolean` | `false` | +| onClick | Button 組件的 onClick | `() =\> void` | `-` | ## 主題定製 diff --git a/src/packages/empty/empty.taro.tsx b/src/packages/empty/empty.taro.tsx index fc7d63d680..f37cdc1075 100644 --- a/src/packages/empty/empty.taro.tsx +++ b/src/packages/empty/empty.taro.tsx @@ -3,6 +3,7 @@ import classNames from 'classnames' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import type { EmptyAction } from './types' import { Button } from '@/packages/button/button.taro' +import { getButtonType } from '@/packages/empty/utils' type statusOptions = { [key: string]: string @@ -113,12 +114,13 @@ export const Empty: FunctionComponent< [`${classPrefix}-actions-left`]: actions.length > 1 && index === 0, })} - type={`${ - actions.length > 1 && index === 0 ? 'default' : 'primary' - }`} - size="small" - fill="outline" + style={item.style} + type={getButtonType(actions, index)} + size={item.size || 'small'} + fill={item.fill || 'outline'} + disabled={item.disabled || false} key={`action-${index}`} + onClick={item.onClick || (() => undefined)} > {item?.text} diff --git a/src/packages/empty/empty.tsx b/src/packages/empty/empty.tsx index ea95ce36f1..6117a84344 100644 --- a/src/packages/empty/empty.tsx +++ b/src/packages/empty/empty.tsx @@ -1,9 +1,10 @@ -import React, { FunctionComponent, useEffect, useState, ReactNode } from 'react' +import React, { FunctionComponent, ReactNode, useEffect, useState } from 'react' import classNames from 'classnames' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import { EmptyAction } from '@/packages/empty/index' import Button from '../button' +import { getButtonType } from '@/packages/empty/utils' type statusOptions = { [key: string]: string @@ -17,6 +18,7 @@ const defaultStatus: statusOptions = { network: 'https://storage.360buyimg.com/imgtools/43c30f7e29-0d483d10-c0ac-11ee-bec4-eb4d2a09a51d.png', } + export interface EmptyProps extends BasicComponent { image?: ReactNode imageSize: number | string @@ -114,12 +116,13 @@ export const Empty: FunctionComponent< [`${classPrefix}-actions-left`]: actions.length > 1 && index === 0, })} - type={`${ - actions.length > 1 && index === 0 ? 'default' : 'primary' - }`} - size="small" - fill="outline" + style={item.style} + type={getButtonType(actions, index)} + size={item.size || 'small'} + fill={item.fill || 'outline'} + disabled={item.disabled || false} key={`action-${index}`} + onClick={item.onClick || (() => undefined)} > {item?.text} diff --git a/src/packages/empty/types.ts b/src/packages/empty/types.ts index e80b7b34ac..e9fb72be2d 100644 --- a/src/packages/empty/types.ts +++ b/src/packages/empty/types.ts @@ -1,3 +1,13 @@ +import React from 'react' +import { ButtonFill, ButtonSize, ButtonType } from '@/packages/button' + export interface EmptyAction { - text: string + text: React.ReactNode + className?: string + style?: React.CSSProperties + type?: ButtonType + size?: ButtonSize + fill?: ButtonFill + disabled?: boolean + onClick?: () => void } diff --git a/src/packages/empty/utils.ts b/src/packages/empty/utils.ts new file mode 100644 index 0000000000..6826eb97c2 --- /dev/null +++ b/src/packages/empty/utils.ts @@ -0,0 +1,6 @@ +export const getButtonType = (actions, index) => { + const action = actions[index] + if (!actions || actions.length === 0) return 'default' + if (action.type) return action.type + actions.length > 1 && index === 0 ? 'default' : 'primary' +} From 87dff85d39a6d0c19f16642d30502681ec166611 Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 16:01:43 +0800 Subject: [PATCH 2/8] fix: toast in taro environment --- src/packages/empty/demos/taro/demo7.tsx | 31 ++++++++++++++----------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/packages/empty/demos/taro/demo7.tsx b/src/packages/empty/demos/taro/demo7.tsx index 3d34af9ca1..a70f945726 100644 --- a/src/packages/empty/demos/taro/demo7.tsx +++ b/src/packages/empty/demos/taro/demo7.tsx @@ -1,22 +1,25 @@ import React from 'react' -import { Empty, Toast } from '@nutui/nutui-react' +import { Empty, Toast } from '@nutui/nutui-react-taro' const Demo7 = () => { return ( - { - Toast.show({ title: 'Action Click!' }) + <> + + { + Toast.show('toast-empty', { title: 'Action Click!' }) + }, }, - }, - ]} - /> + ]} + /> + ) } export default Demo7 From 1d7077cdc25ea4f13d2fe437f14f702a7c212c37 Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 16:06:21 +0800 Subject: [PATCH 3/8] fix: types --- src/packages/empty/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/packages/empty/utils.ts b/src/packages/empty/utils.ts index 6826eb97c2..5cf1c2079f 100644 --- a/src/packages/empty/utils.ts +++ b/src/packages/empty/utils.ts @@ -1,4 +1,6 @@ -export const getButtonType = (actions, index) => { +import { EmptyAction } from './types' + +export const getButtonType = (actions: Array, index: number) => { const action = actions[index] if (!actions || actions.length === 0) return 'default' if (action.type) return action.type From d1f496bd27b4cc2423bbebe3e89da729564e9121 Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 16:22:09 +0800 Subject: [PATCH 4/8] fix: actions type --- src/packages/empty/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/empty/utils.ts b/src/packages/empty/utils.ts index 5cf1c2079f..ebf741a98c 100644 --- a/src/packages/empty/utils.ts +++ b/src/packages/empty/utils.ts @@ -1,8 +1,8 @@ import { EmptyAction } from './types' export const getButtonType = (actions: Array, index: number) => { - const action = actions[index] if (!actions || actions.length === 0) return 'default' + const action = actions[index] if (action.type) return action.type actions.length > 1 && index === 0 ? 'default' : 'primary' } From 3a76df7146b81d9cc1c1efc1b106c3ec01459993 Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 17:25:38 +0800 Subject: [PATCH 5/8] fix: actions type --- src/packages/empty/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/empty/utils.ts b/src/packages/empty/utils.ts index ebf741a98c..a2b69687f1 100644 --- a/src/packages/empty/utils.ts +++ b/src/packages/empty/utils.ts @@ -4,5 +4,5 @@ export const getButtonType = (actions: Array, index: number) => { if (!actions || actions.length === 0) return 'default' const action = actions[index] if (action.type) return action.type - actions.length > 1 && index === 0 ? 'default' : 'primary' + return actions.length > 1 && index === 0 ? 'default' : 'primary' } From 8ad602cf09faaeebd80afd3c5e8f5485e061ad4a Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 17:28:48 +0800 Subject: [PATCH 6/8] fix: docs type --- src/packages/empty/demo.taro.tsx | 4 ++-- src/packages/empty/demo.tsx | 4 ++-- src/packages/empty/doc.md | 2 +- src/packages/empty/doc.taro.md | 2 +- src/packages/empty/doc.zh-TW.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/packages/empty/demo.taro.tsx b/src/packages/empty/demo.taro.tsx index b4503a962f..dc2d0ecdc6 100644 --- a/src/packages/empty/demo.taro.tsx +++ b/src/packages/empty/demo.taro.tsx @@ -19,7 +19,7 @@ const EmptyDemo = () => { b840c88f: '图片类型,内置3个', a74a1fd4: '自定义图片', '8dab2f66': '底部内容', - actions: 'Actions', + actions: '自定义操作', }, 'zh-TW': { ce5c5446: '基礎用法', @@ -28,7 +28,7 @@ const EmptyDemo = () => { b840c88f: '圖片類型,內置3個', a74a1fd4: '自定義圖片', '8dab2f66': '底部內容', - actions: 'Actions', + actions: '自定義操作', }, 'en-US': { ce5c5446: 'Basic usage', diff --git a/src/packages/empty/demo.tsx b/src/packages/empty/demo.tsx index f501032e19..3041eb9c6b 100644 --- a/src/packages/empty/demo.tsx +++ b/src/packages/empty/demo.tsx @@ -17,7 +17,7 @@ const EmptyDemo = () => { b840c88f: '图片类型,内置3个', a74a1fd4: '自定义图片', '8dab2f66': '底部内容', - actions: 'Actions', + actions: '自定义操作', }, 'zh-TW': { ce5c5446: '基礎用法', @@ -26,7 +26,7 @@ const EmptyDemo = () => { b840c88f: '圖片類型,內置3個', a74a1fd4: '自定義圖片', '8dab2f66': '底部內容', - actions: 'Actions', + actions: '自定義操作', }, 'en-US': { ce5c5446: 'Basic usage', diff --git a/src/packages/empty/doc.md b/src/packages/empty/doc.md index f82e786c30..0c5d172440 100644 --- a/src/packages/empty/doc.md +++ b/src/packages/empty/doc.md @@ -60,7 +60,7 @@ import { Empty } from '@nutui/nutui-react' ::: -### Actions +### 自定义操作 :::demo diff --git a/src/packages/empty/doc.taro.md b/src/packages/empty/doc.taro.md index 61ef072c26..2bd2740c1c 100644 --- a/src/packages/empty/doc.taro.md +++ b/src/packages/empty/doc.taro.md @@ -60,7 +60,7 @@ import { Empty } from '@nutui/nutui-react-taro' ::: -### Actions +### 自定义操作 :::demo diff --git a/src/packages/empty/doc.zh-TW.md b/src/packages/empty/doc.zh-TW.md index 37e0fc3441..32aa48b0aa 100644 --- a/src/packages/empty/doc.zh-TW.md +++ b/src/packages/empty/doc.zh-TW.md @@ -60,7 +60,7 @@ import { Empty } from '@nutui/nutui-react' ::: -### Actions +### 自定義操作 :::demo From 995ca6bd88ac1b726ee86827ab91fe4bdb9ef5ed Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 17:33:15 +0800 Subject: [PATCH 7/8] fix: docs type --- src/packages/empty/doc.en-US.md | 2 +- src/packages/empty/doc.md | 2 +- src/packages/empty/doc.taro.md | 2 +- src/packages/empty/doc.zh-TW.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packages/empty/doc.en-US.md b/src/packages/empty/doc.en-US.md index 598c22e849..27bc7b8bfe 100644 --- a/src/packages/empty/doc.en-US.md +++ b/src/packages/empty/doc.en-US.md @@ -93,7 +93,7 @@ import { Empty } from '@nutui/nutui-react' | size | Size of the action button | ButtonSize | - | | fill | Fill of the action button | ButtonFill | - | | disabled | Whether disabled state or not | boolean | false | -| onClick | Triggered on click | () =\> void | - | +| onClick | Triggered on click | `() => void` | - | ## Theming diff --git a/src/packages/empty/doc.md b/src/packages/empty/doc.md index 0c5d172440..7b013320c0 100644 --- a/src/packages/empty/doc.md +++ b/src/packages/empty/doc.md @@ -93,7 +93,7 @@ import { Empty } from '@nutui/nutui-react' | size | Button 组件的 size | ButtonSize | - | | fill | Button 组件的 fill 属性 | ButtonFill | - | | disabled | 是否禁用 | boolean | false | -| onClick | Button 组件的 onClick | () =\> void | - | +| onClick | Button 组件的 onClick | `() => void` | - | ## 主题定制 diff --git a/src/packages/empty/doc.taro.md b/src/packages/empty/doc.taro.md index 2bd2740c1c..64b9b688c4 100644 --- a/src/packages/empty/doc.taro.md +++ b/src/packages/empty/doc.taro.md @@ -93,7 +93,7 @@ import { Empty } from '@nutui/nutui-react-taro' | size | Button 组件的 size | ButtonSize | - | | fill | Button 组件的 fill 属性 | ButtonFill | - | | disabled | 是否禁用 | boolean | false | -| onClick | Button 组件的 onClick | () =\> void | - | +| onClick | Button 组件的 onClick | `() => void` | - | ## 主题定制 diff --git a/src/packages/empty/doc.zh-TW.md b/src/packages/empty/doc.zh-TW.md index 32aa48b0aa..8a3fe7466c 100644 --- a/src/packages/empty/doc.zh-TW.md +++ b/src/packages/empty/doc.zh-TW.md @@ -93,7 +93,7 @@ import { Empty } from '@nutui/nutui-react' | size | Button 組件的 size | `ButtonSize` | `-` | | fill | Button 組件的 fill 屬性 | `ButtonFill` | `-` | | disabled | 是否禁用 | `boolean` | `false` | -| onClick | Button 組件的 onClick | `() =\> void` | `-` | +| onClick | Button 組件的 onClick | `() => void` | `-` | ## 主題定製 From b5ffcdf01238c6c02157843a3269c785a72150c7 Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Wed, 11 Dec 2024 17:37:31 +0800 Subject: [PATCH 8/8] fix: docs type --- src/packages/empty/doc.en-US.md | 16 ++++++++-------- src/packages/empty/doc.md | 16 ++++++++-------- src/packages/empty/doc.taro.md | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/packages/empty/doc.en-US.md b/src/packages/empty/doc.en-US.md index 27bc7b8bfe..1ea024f151 100644 --- a/src/packages/empty/doc.en-US.md +++ b/src/packages/empty/doc.en-US.md @@ -86,14 +86,14 @@ import { Empty } from '@nutui/nutui-react' | Property | Description | Type | Default | | --- | --- | --- | --- | -| text | The text | ReactNode | - | -| className | Class name of the action button | string | - | -| style | Style of the action button | CSSProperties | - | -| type | Type of the action button | ButtonType | - | -| size | Size of the action button | ButtonSize | - | -| fill | Fill of the action button | ButtonFill | - | -| disabled | Whether disabled state or not | boolean | false | -| onClick | Triggered on click | `() => void` | - | +| text | text | `ReactNode` | `-` | +| className | The class name of the Button component | `string` | `-` | +| style | style of Button component | `CSSProperties` | `-` | +| type | type of Button component | `ButtonType` | `-` | +| size | The size of the Button component | `ButtonSize` | `-` | +| fill | fill property of Button component | `ButtonFill` | `-` | +| disabled | Whether to disable | `boolean` | `false` | +| onClick | onClick of Button component | `() => void` | `-` | ## Theming diff --git a/src/packages/empty/doc.md b/src/packages/empty/doc.md index 7b013320c0..7987476e21 100644 --- a/src/packages/empty/doc.md +++ b/src/packages/empty/doc.md @@ -86,14 +86,14 @@ import { Empty } from '@nutui/nutui-react' | 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| text | 文本 | ReactNode | - | -| className | Button 组件的类名 | string | - | -| style | Button 组件的 style | CSSProperties | - | -| type | Button 组件的 type | ButtonType | - | -| size | Button 组件的 size | ButtonSize | - | -| fill | Button 组件的 fill 属性 | ButtonFill | - | -| disabled | 是否禁用 | boolean | false | -| onClick | Button 组件的 onClick | `() => void` | - | +| text | 文本 | `ReactNode` | `-` | +| className | Button 组件的类名 | `string` | `-` | +| style | Button 组件的 style | `CSSProperties` | `-` | +| type | Button 组件的 type | `ButtonType` | `-` | +| size | Button 组件的 size | `ButtonSize` | `-` | +| fill | Button 组件的 fill 属性 | `ButtonFill` | `-` | +| disabled | 是否禁用 | `boolean` | `false` | +| onClick | Button 组件的 onClick | `() => void` | `-` | ## 主题定制 diff --git a/src/packages/empty/doc.taro.md b/src/packages/empty/doc.taro.md index 64b9b688c4..f472d3f085 100644 --- a/src/packages/empty/doc.taro.md +++ b/src/packages/empty/doc.taro.md @@ -86,14 +86,14 @@ import { Empty } from '@nutui/nutui-react-taro' | 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| text | 文本 | ReactNode | - | -| className | Button 组件的类名 | string | - | -| style | Button 组件的 style | CSSProperties | - | -| type | Button 组件的 type | ButtonType | - | -| size | Button 组件的 size | ButtonSize | - | -| fill | Button 组件的 fill 属性 | ButtonFill | - | -| disabled | 是否禁用 | boolean | false | -| onClick | Button 组件的 onClick | `() => void` | - | +| text | 文本 | `ReactNode` | `-` | +| className | Button 组件的类名 | `string` | `-` | +| style | Button 组件的 style | `CSSProperties` | `-` | +| type | Button 组件的 type | `ButtonType` | `-` | +| size | Button 组件的 size | `ButtonSize` | `-` | +| fill | Button 组件的 fill 属性 | `ButtonFill` | `-` | +| disabled | 是否禁用 | `boolean` | `false` | +| onClick | Button 组件的 onClick | `() => void` | `-` | ## 主题定制