Skip to content

Commit

Permalink
docs: swiper 可通过 css 的 touch-action 设置用户操作行为 (#2630)
Browse files Browse the repository at this point in the history
* docs: swiper 可通过 css 的 touch-action 设置用户操作行为

* Update doc.md

* Update doc.zh-TW.md

---------

Co-authored-by: xiaoyatong <[email protected]>
  • Loading branch information
oasis-cloud and xiaoyatong authored Oct 10, 2024
1 parent 3ccc3ef commit 962902b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/packages/swiper/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Swiper } from '@nutui/nutui-react'

### Basic Usage

`Swiper` sets the user's operation behavior through the CSS `touch-action` attribute. If you need to slide the page vertically when sliding horizontally, you can set it through the `style` attribute of `Swiper`. For the CSS `touch-action` attribute, please refer to [https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action](https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action)
:::demo

```tsx
Expand Down
2 changes: 2 additions & 0 deletions src/packages/swiper/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { Swiper } from '@nutui/nutui-react'

### 基础用法

`Swiper` 通过 CSS 的 `touch-action` 属性设置用户的操作行为,如果需要在水平滑动时也可垂直滑动页面,可通过 `Swiper``style` 属性进行设置。CSS 的 `touch-action` 属性可参考 [https://developer.mozilla.org/zh-CN/docs/Web/CSS/touch-action](https://developer.mozilla.org/zh-CN/docs/Web/CSS/touch-action)

:::demo

```tsx
Expand Down
2 changes: 2 additions & 0 deletions src/packages/swiper/doc.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { Swiper } from '@nutui/nutui-react'

### 基礎用法

`Swiper` 透過 CSS 的 `touch-action` 屬性設定使用者的操作行為,如果需要在水平滑動時也可垂直滑動頁面,可透過 `Swiper``style` 屬性進行設定。 CSS 的`touch-action` 屬性可參考[https://developer.mozilla.org/zh-CN/docs/Web/CSS/touch-action](https://developer.mozilla.org/zh-CN/ docs/Web/CSS/touch-action)

:::demo

```tsx
Expand Down

0 comments on commit 962902b

Please sign in to comment.