未验证 提交 07813831 编写于 作者: _ __Oasis__ 提交者: GitHub

Merge pull request #33 from irisSong/main

fix: 修改price、drag、cell、elevator、animatingNumber、signature组件doc文档
......@@ -8,7 +8,7 @@
```javascript
import { AnimatingNumbers } from '@nutui/nutui'
import { AnimatingNumbers } from '@nutui/nutui-react'
```
## 代码演示
......
# Cell 组件
# Cell 单元格
### 介绍
......@@ -6,7 +6,10 @@
### 安装
import { Cell,CellGroup } from '@nutui/nutui';
```javascript
import { Cell, CellGroup } from '@nutui/nutui-react'
```
## 代码演示
......@@ -19,9 +22,11 @@ const testClick = (event: React.MouseEvent<HTMLDivElement, globalThis.MouseEvent
<Cell title="我是标题" desc="描述文字"></Cell>
<Cell title="我是标题" subTitle="副标题描述" desc="描述文字"></Cell>
<Cell title="点击测试" click="{(event:" React.MouseEvent<HTMLDivElement, globalThis.MouseEvent
>) => testClick(event) } ></Cell
>
<Cell
title="点击测试"
click={(event: React.MouseEvent<HTMLDivElement, globalThis.MouseEvent>) =>
testClick(event)}
></Cell>
```
### 直接使用插槽
......
# Drag 组件
# Drag 拖拽
### 介绍
......@@ -6,6 +6,10 @@
### 安装
```javascript
import { Drag } from '@nutui/nutui-react'
```
## 代码演示
### 基础用法
......@@ -40,12 +44,12 @@
## 限制拖拽边界
```tsx
// const right = () => {
// return document.documentElement.clientWidth - 300 - 9
// }
// const bottom = () => {
// return document.documentElement.clientHeight - 559
// }
const right = () => {
return document.documentElement.clientWidth - 300 - 9
}
const bottom = () => {
return document.documentElement.clientHeight - 559
}
<Drag boundary={{ top: 361, left: 9, bottom: bottom(), right: right() }}>
<div class="touch-dom">拖动我</div>
</Drag>
......
# Elevator 组件
# Elevator 电梯楼层
### 介绍
......@@ -6,6 +6,10 @@
### 安装
```javascript
import { Elevator } from '@nutui/nutui-react'
```
## 代码演示
### 基础用法
......@@ -69,9 +73,7 @@ const clickItem = (key: string, item: any) => {
const clickIndex = (key: string) => {
console.log(key)
}
```
```tsx
<Elevator
indexList={dataList}
height="260"
......@@ -193,9 +195,7 @@ const clickItem = (key: string, item: any) => {
const clickIndex = (key: string) => {
console.log(key)
}
```
```tsx
<Elevator
indexList={dataList2}
height="220"
......
......@@ -17,7 +17,7 @@ const PriceDemo = () => {
<div className="demo">
<h2>基本用法</h2>
<Cell>
<Price price={0} needSymbol={false} thousands={true} />
<Price price={1010} needSymbol={false} thousands={true} />
</Cell>
<h2>有人民币符号,无千位分隔</h2>
<Cell>
......
# Price 组件
# Price 商品价格
### 介绍
基于 xxxxxxx
用来对商品价格数值的小数点前后部分应用不同样式,还支持人民币符号、千位分隔符、设置小数点位数等功能。
### 安装
```javascript
import { Price } from '@nutui/nutui-react'
```
## 代码演示
### 基本用法
```tsx
<Price price={0} needSymbol={false} thousands={true} />
<Price price={1010} needSymbol={false} thousands={true} />
```
### 有人民币符号,无千位分隔
......
......@@ -6,6 +6,10 @@
### 安装
```javascript
import { Signature } from '@nutui/nutui-react'
```
## 代码演示
### 基础用法
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册