Skip to content

Commit

Permalink
chore: 文档未来规范 (#2373)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-huxiyang authored Jun 21, 2024
1 parent 96885db commit 5ee64bf
Show file tree
Hide file tree
Showing 323 changed files with 834 additions and 1,001 deletions.
4 changes: 2 additions & 2 deletions src/packages/actionsheet/doc.en-US.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ActionSheet

## Intro


Action menu panel that pops up from the bottom.

## Install
## Import

```tsx
import { ActionSheet } from '@nutui/nutui-react';
Expand Down
6 changes: 3 additions & 3 deletions src/packages/actionsheet/doc.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# ActionSheet 动作面板

## 介绍


从底部弹出的动作菜单面板。

## 安装
## 引入

```tsx
import { ActionSheet } from '@nutui/nutui-react';
```

## 代码演示
## 示例代码

### 基础用法

Expand Down
202 changes: 100 additions & 102 deletions src/packages/actionsheet/doc.taro.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,100 @@
# ActionSheet 动作面板

## 介绍

从底部弹出的动作菜单面板。

## 安装

```tsx
import { ActionSheet } from '@nutui/nutui-react-taro';
```

## 代码演示

### 基础用法

:::demo

<CodeBlock src='taro/demo1.tsx'></CodeBlock>

:::

### 展示取消按钮

:::demo

<CodeBlock src='taro/demo2.tsx'></CodeBlock>

:::

### 展示描述信息

:::demo

<CodeBlock src='taro/demo3.tsx'></CodeBlock>

:::

### 选项状态

:::demo

<CodeBlock src='taro/demo4.tsx'></CodeBlock>

:::

### 自定义内容

:::demo

<CodeBlock src='taro/demo5.tsx'></CodeBlock>

:::

### 自定义key

:::demo

<CodeBlock src='taro/demo6.tsx'></CodeBlock>

:::

## ActionSheet

### Props

| 属性 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| visible | 遮罩层可见 | `boolean` | `false` |
| title | 设置列表面板标题 | `string` | `-` |
| description | 设置列表面板副标题/描述 | `string` | `-` |
| options | 列表项 | `Array` | `[]` |
| optionKey | 列表项的自定义设置 | `{ [key: string]: string }` | `-` |
| cancelText | 取消文案 | `string` | `取消` |
| onSelect | 选择之后触发 | `(item: any, index: number) => void` | `-` |
| onCancel | 点击取消文案时触发 | `() => void` | `-` |

### options

| 属性 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| name | 列表项的标题key值 | `string` | `-` |
| description | 列表项的描述key值 | `string` | `-` |
| danger | 高亮颜色 | `string` | `$color-primary` |
| disabled | 禁用状态 | `string` | `$disabled-color` |

## 主题定制

### 样式变量

组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)

| 名称 | 说明 | 默认值 |
| --- | --- | --- |
| \--nutui-actionsheet-background-color | 背景色 | `$color-background-overlay` |
| \--nutui-actionsheet-border-radius | 列表和取消按钮圆角 | `0` |
| \--nutui-actionsheet-border-color | 标题和取消位置的border色值 | `#f6f6f6` |
| \--nutui-actionsheet-item-text-align | 列表项的文字对齐方式 | `center` |
| \--nutui-actionsheet-item-border-bottom | 列表项的底部border | `none` |
| \--nutui-actionsheet-item-line-height | 列表项行高 | `24px` |
| \--nutui-actionsheet-item-color | 列表项字色 | `$color-title` |
| \--nutui-actionsheet-item-danger | 列表项danger字色 | `$color-primary` |
# ActionSheet 动作面板

从底部弹出的动作菜单面板。

## 引入

```tsx
import { ActionSheet } from '@nutui/nutui-react-taro';
```

## 示例代码

### 基础用法

:::demo

<CodeBlock src='taro/demo1.tsx'></CodeBlock>

:::

### 展示取消按钮

:::demo

<CodeBlock src='taro/demo2.tsx'></CodeBlock>

:::

### 展示描述信息

:::demo

<CodeBlock src='taro/demo3.tsx'></CodeBlock>

:::

### 选项状态

:::demo

<CodeBlock src='taro/demo4.tsx'></CodeBlock>

:::

### 自定义内容

:::demo

<CodeBlock src='taro/demo5.tsx'></CodeBlock>

:::

### 自定义key

:::demo

<CodeBlock src='taro/demo6.tsx'></CodeBlock>

:::

## ActionSheet

### Props

| 属性 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| visible | 遮罩层可见 | `boolean` | `false` |
| title | 设置列表面板标题 | `string` | `-` |
| description | 设置列表面板副标题/描述 | `string` | `-` |
| options | 列表项 | `Array` | `[]` |
| optionKey | 列表项的自定义设置 | `{ [key: string]: string }` | `-` |
| cancelText | 取消文案 | `string` | `取消` |
| onSelect | 选择之后触发 | `(item: any, index: number) => void` | `-` |
| onCancel | 点击取消文案时触发 | `() => void` | `-` |

### options

| 属性 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| name | 列表项的标题key值 | `string` | `-` |
| description | 列表项的描述key值 | `string` | `-` |
| danger | 高亮颜色 | `string` | `$color-primary` |
| disabled | 禁用状态 | `string` | `$disabled-color` |

## 主题定制

### 样式变量

组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)

| 名称 | 说明 | 默认值 |
| --- | --- | --- |
| \--nutui-actionsheet-background-color | 背景色 | `$color-background-overlay` |
| \--nutui-actionsheet-border-radius | 列表和取消按钮圆角 | `0` |
| \--nutui-actionsheet-border-color | 标题和取消位置的border色值 | `#f6f6f6` |
| \--nutui-actionsheet-item-text-align | 列表项的文字对齐方式 | `center` |
| \--nutui-actionsheet-item-border-bottom | 列表项的底部border | `none` |
| \--nutui-actionsheet-item-line-height | 列表项行高 | `24px` |
| \--nutui-actionsheet-item-color | 列表项字色 | `$color-title` |
| \--nutui-actionsheet-item-danger | 列表项danger字色 | `$color-primary` |
6 changes: 3 additions & 3 deletions src/packages/actionsheet/doc.zh-TW.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# ActionSheet 動作面闆

## 介紹


從底部彈出的動作菜單面闆。

## 安裝
## 引入

```tsx
import { ActionSheet } from '@nutui/nutui-react';
```

## 代碼演示
## 示例代碼

### 基礎用法

Expand Down
4 changes: 2 additions & 2 deletions src/packages/address/doc.en-US.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Address

## Intro


Load on demand Load the Icon、Popup、Elevator dependent component

## Install
## Import

```tsx
import { Address } from '@nutui/nutui-react';
Expand Down
5 changes: 2 additions & 3 deletions src/packages/address/doc.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Address 地址

## 介绍

地址选择,在2.0中,地址改用级联组件实现。截止当前版本,只支持级联,不支持级联+电梯模式,开发中。

## 安装
## 引入

```tsx
import { Address } from '@nutui/nutui-react';
```

## 代码演示
## 示例代码

### 选择自定义地址

Expand Down
5 changes: 2 additions & 3 deletions src/packages/address/doc.taro.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Address 地址

## 介绍

地址选择

## 安装
## 引入

```tsx
import { Address } from '@nutui/nutui-react-taro';
```

## 代码演示
## 示例代码

### 选择自定义地址

Expand Down
6 changes: 3 additions & 3 deletions src/packages/address/doc.zh-TW.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Address 地址

## 介紹


地址選擇,在2.0中,地址改用級聯組件實現。截止當前版本,只支持級聯,不支持級聯+電梯模式,開發中。

## 安裝
## 引入

```tsx
import { Address } from '@nutui/nutui-react';
```

## 代碼演示
## 示例代碼

### 選擇自定義地址

Expand Down
4 changes: 2 additions & 2 deletions src/packages/animate/doc.en-US.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Animate

## Intro


Add animation effects to child elements

## Install
## Import

```tsx
import { Animate } from '@nutui/nutui-react';
Expand Down
5 changes: 2 additions & 3 deletions src/packages/animate/doc.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Animate 动画/动效

## 介绍

给子元素添加动画效果

## 安装
## 引入

```tsx
import { Animate } from '@nutui/nutui-react';
```

## 代码演示
## 示例代码

### 点击触发

Expand Down
5 changes: 2 additions & 3 deletions src/packages/animate/doc.taro.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Animate 动画/动效

## 介绍

给子元素添加动画效果

## 安装
## 引入

```tsx
import { Animate } from '@nutui/nutui-react-taro';
```

## 代码演示
## 示例代码

### 点击触发

Expand Down
6 changes: 3 additions & 3 deletions src/packages/animate/doc.zh-TW.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Animate 動畫/動效

## 介紹


給子元素添加動畫效果

## 安裝
## 引入

```tsx
import { Animate } from '@nutui/nutui-react';
```

## 代碼演示
## 示例代碼

### 點擊觸發

Expand Down
Loading

0 comments on commit 5ee64bf

Please sign in to comment.