diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/async.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/async.vue new file mode 100644 index 0000000000..8708a94ebf --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/async.vue @@ -0,0 +1,23 @@ + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/basic.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/basic.vue new file mode 100644 index 0000000000..0902de2ab6 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/basic.vue @@ -0,0 +1,22 @@ + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/dynamic.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/dynamic.vue new file mode 100644 index 0000000000..70c30505d5 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/dynamic.vue @@ -0,0 +1,23 @@ + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/index.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/index.vue index f2d53f5131..cde348a94a 100644 --- a/packages/nutui-taro-demo/src/exhibition/pages/swiper/index.vue +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/index.vue @@ -1,203 +1,56 @@ +import { useTranslate } from '../../../utils'; +import Basic from './basic.vue'; +import Async from './async.vue'; +import Dynamic from './dynamic.vue'; +import Width from './width.vue'; +import Page from './page.vue'; +import Methods from './methods.vue'; +import Vertical from './vertical.vue'; - +}); + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/methods.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/methods.vue new file mode 100644 index 0000000000..47f5c60172 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/methods.vue @@ -0,0 +1,57 @@ + + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/page.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/page.vue new file mode 100644 index 0000000000..285d41b93b --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/page.vue @@ -0,0 +1,37 @@ + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/vertical.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/vertical.vue new file mode 100644 index 0000000000..c54ec96bb1 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/vertical.vue @@ -0,0 +1,16 @@ + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/swiper/width.vue b/packages/nutui-taro-demo/src/exhibition/pages/swiper/width.vue new file mode 100644 index 0000000000..9aae741efb --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/swiper/width.vue @@ -0,0 +1,16 @@ + + diff --git a/src/packages/__VUE/swiper/demo.vue b/src/packages/__VUE/swiper/demo.vue deleted file mode 100644 index c90ae3087e..0000000000 --- a/src/packages/__VUE/swiper/demo.vue +++ /dev/null @@ -1,237 +0,0 @@ - - - - - diff --git a/src/packages/__VUE/swiper/demo/async.vue b/src/packages/__VUE/swiper/demo/async.vue new file mode 100644 index 0000000000..8708a94ebf --- /dev/null +++ b/src/packages/__VUE/swiper/demo/async.vue @@ -0,0 +1,23 @@ + + diff --git a/src/packages/__VUE/swiper/demo/basic.vue b/src/packages/__VUE/swiper/demo/basic.vue new file mode 100644 index 0000000000..0902de2ab6 --- /dev/null +++ b/src/packages/__VUE/swiper/demo/basic.vue @@ -0,0 +1,22 @@ + + diff --git a/src/packages/__VUE/swiper/demo/dynamic.vue b/src/packages/__VUE/swiper/demo/dynamic.vue new file mode 100644 index 0000000000..70c30505d5 --- /dev/null +++ b/src/packages/__VUE/swiper/demo/dynamic.vue @@ -0,0 +1,23 @@ + + diff --git a/src/packages/__VUE/swiper/demo/index.vue b/src/packages/__VUE/swiper/demo/index.vue new file mode 100644 index 0000000000..01859d265e --- /dev/null +++ b/src/packages/__VUE/swiper/demo/index.vue @@ -0,0 +1,56 @@ + + + diff --git a/src/packages/__VUE/swiper/demo/methods.vue b/src/packages/__VUE/swiper/demo/methods.vue new file mode 100644 index 0000000000..3643860e5f --- /dev/null +++ b/src/packages/__VUE/swiper/demo/methods.vue @@ -0,0 +1,57 @@ + + + + diff --git a/src/packages/__VUE/swiper/demo/page.vue b/src/packages/__VUE/swiper/demo/page.vue new file mode 100644 index 0000000000..285d41b93b --- /dev/null +++ b/src/packages/__VUE/swiper/demo/page.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/packages/__VUE/swiper/demo/vertical.vue b/src/packages/__VUE/swiper/demo/vertical.vue new file mode 100644 index 0000000000..c54ec96bb1 --- /dev/null +++ b/src/packages/__VUE/swiper/demo/vertical.vue @@ -0,0 +1,16 @@ + + diff --git a/src/packages/__VUE/swiper/demo/width.vue b/src/packages/__VUE/swiper/demo/width.vue new file mode 100644 index 0000000000..9aae741efb --- /dev/null +++ b/src/packages/__VUE/swiper/demo/width.vue @@ -0,0 +1,16 @@ + + diff --git a/src/packages/__VUE/swiper/doc.en-US.md b/src/packages/__VUE/swiper/doc.en-US.md index 60effdfed2..7ec6f21a92 100644 --- a/src/packages/__VUE/swiper/doc.en-US.md +++ b/src/packages/__VUE/swiper/doc.en-US.md @@ -22,427 +22,33 @@ app.use(SwiperItem); `pagination-visible` Show paging indicator `pagination-color` Indicator color customization -:::demo - -```vue - - - -``` +> demo: swiper basic -::: - -### Asynchronous loading - -:::demo - -```vue - - - -``` +### Asynchronous Loading -::: +> demo: swiper async -### Dynamic loading +### Dynamic Loading Support dynamic addition / deletion of pictures -:::demo - -```vue - - - -``` +> demo: swiper dynamic -::: - -### Custom size - -`width` Custom rotation size - -:::demo - -```vue - - - -``` +### Custom Width -::: - -### Custom paging indicator - -`#page` Represents a custom indicator - -:::demo - -```vue - - - -``` +> demo: swiper width -::: - -### 自定义指示器(异步 3s) - -:::demo - -```vue - - - -``` +### Page Slot -::: - -### Manual switching - -You can manually switch through `api` (`prev`, `next`) - -:::demo - -```vue - - - -``` +> demo: swiper page -::: - -### Vertical direction - -`direction` Custom rotation direction - -:::demo - -```vue - - - -``` +### Ref Methods + +> demo: swiper methods + +### Vertical Direction -::: +> demo: swiper vertical ## API diff --git a/src/packages/__VUE/swiper/doc.md b/src/packages/__VUE/swiper/doc.md index 763770d76f..51076f89da 100644 --- a/src/packages/__VUE/swiper/doc.md +++ b/src/packages/__VUE/swiper/doc.md @@ -22,427 +22,35 @@ app.use(SwiperItem); `pagination-visible` 是否显示分页指示器 `pagination-color` 指示器颜色自定义 -:::demo - -```vue - - - -``` - -::: +> demo: swiper basic ### 异步加载 -:::demo - -```vue - - - -``` - -::: +> demo: swiper async ### 动态加载 支持动态增加/删除图片 -:::demo - -```vue - - - -``` - -::: +> demo: swiper dynamic ### 自定义大小 `width` 自定义轮播大小 -:::demo - -```vue - - - -``` - -::: +> demo: swiper width ### 自定义分页指示器 -`#page` 表示自定义指示器 - -:::demo - -```vue - - - -``` - -::: - -### 自定义指示器(异步 3s) - -:::demo - -```vue - - - -``` - -::: +> demo: swiper page ### 手动切换 -可通过 `API`(`prev`,`next`)进行手动切换 - -:::demo - -```vue - - - -``` - -::: +> demo: swiper methods ### 垂直方向 -`direction` 自定义轮播方向 - -:::demo - -```vue - - - -``` - -::: +> demo: swiper vertical ## API diff --git a/src/packages/__VUE/swiper/doc.taro.md b/src/packages/__VUE/swiper/doc.taro.md index 3616d44948..7043b1e4b2 100644 --- a/src/packages/__VUE/swiper/doc.taro.md +++ b/src/packages/__VUE/swiper/doc.taro.md @@ -22,418 +22,35 @@ app.use(SwiperItem); `pagination-visible` 是否显示分页指示器 `pagination-color` 指示器颜色自定义 -:::demo - -```vue - - - -``` - -::: +> demo: swiper basic exhibition ### 异步加载 -:::demo - -```vue - - - -``` - -::: +> demo: swiper async exhibition ### 动态加载 支持动态增加/删除图片 -:::demo - -```vue - - - -``` - -::: +> demo: swiper dynamic exhibition ### 自定义大小 `width` 自定义轮播大小 -:::demo - -```vue - - - -``` - -::: +> demo: swiper width exhibition ### 自定义分页指示器 -`#page` 表示自定义指示器 - -:::demo - -```vue - - - -``` - -::: - -### 自定义指示器(异步 3s) - -:::demo - -```vue - - - -``` - -::: +> demo: swiper page exhibition ### 手动切换 -可通过 `API`(`prev`,`next`)进行手动切换 - -:::demo - -```vue - - - -``` - -::: +> demo: swiper methods exhibition ### 垂直方向 -`direction` 自定义轮播方向 - -:::demo - -```vue - - - -``` - -::: +> demo: swiper vertical exhibition ## API @@ -473,7 +90,7 @@ const page = ref(2); | --- | --- | --- | | prev | 切换到上一页 | - | | next | 切换到下一页 | - | -| to | 切换到指定轮播 | index:number | +| to | 切换到指定轮播 | `index:number` | ## 主题定制