Skip to content

Commit 93ad98a

Browse files
committed
docs: use npm install in README
1 parent 0470f73 commit 93ad98a

2 files changed

Lines changed: 45 additions & 47 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
<p align="center">English | <a href="./README.zh-CN.md">简体中文</a></p>
1717

18-
1918
## Highlights
2019

2120
- Tracks step targets and renders guided panels through a trigger-backed popup.
@@ -59,7 +58,7 @@ Online preview: https://tour.react-component.vercel.app/
5958
Run the local dumi site:
6059

6160
```bash
62-
ut install
61+
npm install
6362
npm start
6463
```
6564

@@ -120,7 +119,7 @@ Then open `http://localhost:8000`.
120119
## Development
121120

122121
```bash
123-
ut install
122+
npm install
124123
npm start
125124
npm test
126125
npm run tsc

README.zh-CN.md

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
<p align="center"><a href="./README.md">English</a> | 简体中文</p>
1717

18-
1918
## 特性
2019

2120
- 跟踪步骤目标并通过触发器支持的弹层窗口渲染引导面板。
@@ -59,7 +58,7 @@ export default () => (
5958
运行本地 dumi 站点:
6059

6160
```bash
62-
ut install
61+
npm install
6362
npm start
6463
```
6564

@@ -69,58 +68,58 @@ npm start
6968

7069
### Tour
7170

72-
| 名称 | 类型 | 默认值 | 说明 |
73-
| ----------------------- | ------------------------------------------------------------ | -------------- | ---------------------------------------------------- |
74-
| `animated` | boolean \| `{ placeholder: boolean }` | false | 启用目标占位动画。 |
75-
| `arrow` | boolean \| `{ pointAtCenter: boolean }` | true | 显示箭头,并可选择指向目标中心。 |
76-
| `builtinPlacements` | TriggerProps['builtinPlacements'] \| function | - | 自定义位置映射。 |
77-
| `className` | string | - | 面板 className。 |
78-
| `classNames` | `Partial<Record<SemanticName, string>>` | - | 语义 className。 |
79-
| `closable` | boolean \| object | - | 关闭按钮配置。 |
80-
| `closeIcon` | React.ReactNode | - | 自定义关闭图标。 |
81-
| `current` | number | - | 受控当前步骤。 |
82-
| `defaultCurrent` | number | 0 | 初始当前步骤。 |
83-
| `defaultOpen` | boolean | - | 初始打开状态。 |
84-
| `disabledInteraction` | boolean | - | 禁用与目标区域的交互。 |
85-
| `gap` | Gap | - | 目标周围的间隙偏移和半径。 |
86-
| `getPopupContainer` | TriggerProps['getPopupContainer'] \| false | - | 弹层容器解析函数。使用 false 表示内联模式。 |
87-
| `keyboard` | boolean | true | 启用 Escape 和箭头键导航。 |
88-
| `mask` | boolean \| `{ style?: React.CSSProperties; color?: string }` | true | 遮罩配置。 |
89-
| `onChange` | `(current: number) => void` | - | 当前步骤更改时调用。 |
90-
| `onClose` | `(current: number) => void` | - | 引导关闭时调用。 |
91-
| `onFinish` | `() => void` | - | 引导完成后调用。 |
92-
| `onPopupAlign` | TriggerProps['onPopupAlign'] | - | 弹层对齐后调用。 |
93-
| `open` | boolean | - | 受控打开状态。 |
94-
| `placement` | PlacementType | - | 默认面板位置。 |
95-
| `prefixCls` | string | `'rc-tour'` | className 前缀。 |
96-
| `renderPanel` | `(props, current) => ReactNode` | - | 自定义面板渲染器。 |
97-
| `rootClassName` | string | - | 根 className。 |
98-
| `scrollIntoViewOptions` | boolean \| ScrollIntoViewOptions | 中心选项 | 目标滚动行为。 |
99-
| `steps` | TourStepInfo[] | [] | 漫游步骤。 |
100-
| `style` | React.CSSProperties | - | 面板风格。 |
101-
| `styles` | `Partial<Record<SemanticName, React.CSSProperties>>` | - | 语义化样式。 |
102-
| `zIndex` | number | 1001 | 弹层 z 索引。 |
71+
| 名称 | 类型 | 默认值 | 说明 |
72+
| ----------------------- | ------------------------------------------------------------ | ----------- | ------------------------------------------- |
73+
| `animated` | boolean \| `{ placeholder: boolean }` | false | 启用目标占位动画。 |
74+
| `arrow` | boolean \| `{ pointAtCenter: boolean }` | true | 显示箭头,并可选择指向目标中心。 |
75+
| `builtinPlacements` | TriggerProps['builtinPlacements'] \| function | - | 自定义位置映射。 |
76+
| `className` | string | - | 面板 className。 |
77+
| `classNames` | `Partial<Record<SemanticName, string>>` | - | 语义 className。 |
78+
| `closable` | boolean \| object | - | 关闭按钮配置。 |
79+
| `closeIcon` | React.ReactNode | - | 自定义关闭图标。 |
80+
| `current` | number | - | 受控当前步骤。 |
81+
| `defaultCurrent` | number | 0 | 初始当前步骤。 |
82+
| `defaultOpen` | boolean | - | 初始打开状态。 |
83+
| `disabledInteraction` | boolean | - | 禁用与目标区域的交互。 |
84+
| `gap` | Gap | - | 目标周围的间隙偏移和半径。 |
85+
| `getPopupContainer` | TriggerProps['getPopupContainer'] \| false | - | 弹层容器解析函数。使用 false 表示内联模式。 |
86+
| `keyboard` | boolean | true | 启用 Escape 和箭头键导航。 |
87+
| `mask` | boolean \| `{ style?: React.CSSProperties; color?: string }` | true | 遮罩配置。 |
88+
| `onChange` | `(current: number) => void` | - | 当前步骤更改时调用。 |
89+
| `onClose` | `(current: number) => void` | - | 引导关闭时调用。 |
90+
| `onFinish` | `() => void` | - | 引导完成后调用。 |
91+
| `onPopupAlign` | TriggerProps['onPopupAlign'] | - | 弹层对齐后调用。 |
92+
| `open` | boolean | - | 受控打开状态。 |
93+
| `placement` | PlacementType | - | 默认面板位置。 |
94+
| `prefixCls` | string | `'rc-tour'` | className 前缀。 |
95+
| `renderPanel` | `(props, current) => ReactNode` | - | 自定义面板渲染器。 |
96+
| `rootClassName` | string | - | 根 className。 |
97+
| `scrollIntoViewOptions` | boolean \| ScrollIntoViewOptions | 中心选项 | 目标滚动行为。 |
98+
| `steps` | TourStepInfo[] | [] | 漫游步骤。 |
99+
| `style` | React.CSSProperties | - | 面板风格。 |
100+
| `styles` | `Partial<Record<SemanticName, React.CSSProperties>>` | - | 语义化样式。 |
101+
| `zIndex` | number | 1001 | 弹层 z 索引。 |
103102

104103
### TourStepInfo
105104

106-
| 名称 | 类型 | 默认值 | 说明 |
107-
| ----------------------- | ------------------------------------------ | --------- | --------------------------- |
108-
| `arrow` | boolean \| `{ pointAtCenter: boolean }` | inherited | 步骤箭头配置。 |
109-
| `className` | string | - | 步骤面板 className。 |
105+
| 名称 | 类型 | 默认值 | 说明 |
106+
| ----------------------- | ------------------------------------------ | --------- | -------------------- |
107+
| `arrow` | boolean \| `{ pointAtCenter: boolean }` | inherited | 步骤箭头配置。 |
108+
| `className` | string | - | 步骤面板 className。 |
110109
| `closable` | boolean \| object | inherited | 步骤关闭按钮配置。 |
111-
| `closeIcon` | React.ReactNode | inherited | 步骤关闭图标。 |
112-
| `description` | React.ReactNode | - | 步骤描述。 |
113-
| `mask` | boolean \| object | inherited | 步骤遮罩配置。 |
114-
| `placement` | PlacementType | inherited | 步骤位置。 |
110+
| `closeIcon` | React.ReactNode | inherited | 步骤关闭图标。 |
111+
| `description` | React.ReactNode | - | 步骤描述。 |
112+
| `mask` | boolean \| object | inherited | 步骤遮罩配置。 |
113+
| `placement` | PlacementType | inherited | 步骤位置。 |
115114
| `scrollIntoViewOptions` | boolean \| ScrollIntoViewOptions | inherited | 步骤滚动行为。 |
116115
| `style` | React.CSSProperties | - | 步骤面板样式。 |
117-
| `target` | HTMLElement \| `() => HTMLElement \| null` | - | 目标元素或解析器。 |
118-
| `title` | React.ReactNode | - | 步骤标题。 |
116+
| `target` | HTMLElement \| `() => HTMLElement \| null` | - | 目标元素或解析器。 |
117+
| `title` | React.ReactNode | - | 步骤标题。 |
119118

120119
## 本地开发
121120

122121
```bash
123-
ut install
122+
npm install
124123
npm start
125124
npm test
126125
npm run tsc

0 commit comments

Comments
 (0)