diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/auto-height.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/auto-height.vue new file mode 100644 index 0000000000..76c9c5e158 --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/auto-height.vue @@ -0,0 +1,16 @@ + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/basic.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/basic.vue new file mode 100644 index 0000000000..08e2d023bd --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/basic.vue @@ -0,0 +1,11 @@ + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/custom.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/custom.vue new file mode 100644 index 0000000000..92bfa0a322 --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/custom.vue @@ -0,0 +1,50 @@ + + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/index.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/index.vue index a918301487..392ab94654 100644 --- a/packages/nutui-taro-demo/src/nav/pages/tabs/index.vue +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/index.vue @@ -1,142 +1,68 @@ diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/scroll.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/scroll.vue new file mode 100644 index 0000000000..403cc6182c --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/scroll.vue @@ -0,0 +1,12 @@ + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/size.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/size.vue new file mode 100644 index 0000000000..1f66c2b0ad --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/size.vue @@ -0,0 +1,21 @@ + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/smile.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/smile.vue new file mode 100644 index 0000000000..b2044a7897 --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/smile.vue @@ -0,0 +1,11 @@ + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/swipeable.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/swipeable.vue new file mode 100644 index 0000000000..507dfccd4e --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/swipeable.vue @@ -0,0 +1,11 @@ + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/vertical-smile.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/vertical-smile.vue new file mode 100644 index 0000000000..b13706cf6d --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/vertical-smile.vue @@ -0,0 +1,11 @@ + + diff --git a/packages/nutui-taro-demo/src/nav/pages/tabs/vertical.vue b/packages/nutui-taro-demo/src/nav/pages/tabs/vertical.vue new file mode 100644 index 0000000000..336cd2aab8 --- /dev/null +++ b/packages/nutui-taro-demo/src/nav/pages/tabs/vertical.vue @@ -0,0 +1,12 @@ + + diff --git a/src/packages/__VUE/tabs/demo.vue b/src/packages/__VUE/tabs/demo.vue deleted file mode 100644 index 8306e19640..0000000000 --- a/src/packages/__VUE/tabs/demo.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - diff --git a/src/packages/__VUE/tabs/demo/auto-height.vue b/src/packages/__VUE/tabs/demo/auto-height.vue new file mode 100644 index 0000000000..76c9c5e158 --- /dev/null +++ b/src/packages/__VUE/tabs/demo/auto-height.vue @@ -0,0 +1,16 @@ + + diff --git a/src/packages/__VUE/tabs/demo/basic.vue b/src/packages/__VUE/tabs/demo/basic.vue new file mode 100644 index 0000000000..08e2d023bd --- /dev/null +++ b/src/packages/__VUE/tabs/demo/basic.vue @@ -0,0 +1,11 @@ + + diff --git a/src/packages/__VUE/tabs/demo/custom.vue b/src/packages/__VUE/tabs/demo/custom.vue new file mode 100644 index 0000000000..92bfa0a322 --- /dev/null +++ b/src/packages/__VUE/tabs/demo/custom.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/packages/__VUE/tabs/demo/index.vue b/src/packages/__VUE/tabs/demo/index.vue new file mode 100644 index 0000000000..105980f942 --- /dev/null +++ b/src/packages/__VUE/tabs/demo/index.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/packages/__VUE/tabs/demo/scroll.vue b/src/packages/__VUE/tabs/demo/scroll.vue new file mode 100644 index 0000000000..403cc6182c --- /dev/null +++ b/src/packages/__VUE/tabs/demo/scroll.vue @@ -0,0 +1,12 @@ + + diff --git a/src/packages/__VUE/tabs/demo/size.vue b/src/packages/__VUE/tabs/demo/size.vue new file mode 100644 index 0000000000..1f66c2b0ad --- /dev/null +++ b/src/packages/__VUE/tabs/demo/size.vue @@ -0,0 +1,21 @@ + + diff --git a/src/packages/__VUE/tabs/demo/smile.vue b/src/packages/__VUE/tabs/demo/smile.vue new file mode 100644 index 0000000000..b2044a7897 --- /dev/null +++ b/src/packages/__VUE/tabs/demo/smile.vue @@ -0,0 +1,11 @@ + + diff --git a/src/packages/__VUE/tabs/demo/swipeable.vue b/src/packages/__VUE/tabs/demo/swipeable.vue new file mode 100644 index 0000000000..507dfccd4e --- /dev/null +++ b/src/packages/__VUE/tabs/demo/swipeable.vue @@ -0,0 +1,11 @@ + + diff --git a/src/packages/__VUE/tabs/demo/vertical-smile.vue b/src/packages/__VUE/tabs/demo/vertical-smile.vue new file mode 100644 index 0000000000..b13706cf6d --- /dev/null +++ b/src/packages/__VUE/tabs/demo/vertical-smile.vue @@ -0,0 +1,11 @@ + + diff --git a/src/packages/__VUE/tabs/demo/vertical.vue b/src/packages/__VUE/tabs/demo/vertical.vue new file mode 100644 index 0000000000..3f78252ef5 --- /dev/null +++ b/src/packages/__VUE/tabs/demo/vertical.vue @@ -0,0 +1,12 @@ + + diff --git a/src/packages/__VUE/tabs/doc.en-US.md b/src/packages/__VUE/tabs/doc.en-US.md index dc0d0f329b..b8ceb34b21 100644 --- a/src/packages/__VUE/tabs/doc.en-US.md +++ b/src/packages/__VUE/tabs/doc.en-US.md @@ -17,249 +17,39 @@ app.use(TabPane); ### Basic Usage -:::demo - -```vue - - -``` - -::: +> demo: tabs basic -### Basic Usage - Smile Curve +### Smile Type -:::demo +> demo: tabs smile -```vue - - -``` +### Auto Height -::: +> demo: tabs auto-height -### Match by pane-key +### Swipeable -:::demo +> demo: tabs swipeable -```vue - - -``` +### Title Scroll (horizontal) -::: - -### TabPane height auto - -Automatic height. When set to `true`, `nut-tabs` and `nut-tabs__content` will change with the height of the current `nut-tab-pane`. - -:::demo - -```vue - - -``` +> demo: tabs scroll -::: - -### Data is rendered asynchronously for 3s - -:::demo - -```vue - - -``` +### Title Scroll (vertical) -::: +> demo: tabs vertical -### A large number of scrolling operations - -The automatic scrolling direction of the title bar can be modified through the `direction` property. - -In the `taro` environment, `name` must be set to enable the automatic scrolling function of the title bar. - -:::demo - -```vue - - -``` +### vertical + Smile Type -::: +> demo: tabs vertical-smile -### Left and right layout +### FontSize -:::demo +> demo: tabs size -```vue - - -``` - -::: - -### Left and Right Layout - Smile Curve - -:::demo - -```vue - - -``` - -::: - -### tab bar font size large normal small - -:::demo - -```vue - - -``` - -::: - -### custom tab bar - -:::demo - -```vue - - -``` +### Custom Tab -::: +> demo: tabs custom ## API diff --git a/src/packages/__VUE/tabs/doc.md b/src/packages/__VUE/tabs/doc.md index 25819f175d..ff8da5286d 100644 --- a/src/packages/__VUE/tabs/doc.md +++ b/src/packages/__VUE/tabs/doc.md @@ -17,249 +17,39 @@ app.use(TabPane); ### 基础用法 -:::demo - -```vue - - -``` - -::: - -### 手势滑动切换 - -:::demo - -```vue - - -``` - -::: - -### 基础用法-微笑曲线 - -:::demo - -```vue - - -``` - -::: - -### TabPane 自动高度 - -自动高度。设置为 true 时,nut-tabs 和 nut-tabs\_\_content 会随着当前 nut-tab-pane 的高度而发生变化。 - -:::demo - -```vue - - -``` - -::: - -### 数据异步渲染 3s - -:::demo - -```vue - - -``` +> demo: tabs basic -::: +### Smile 类型 -### 数量多,滚动操作 +> demo: tabs smile -可通过`direction`属性修改标题栏自动滚动方向。 +### 自动高度 -在`taro`环境下,必须设置`name`以开启标题栏自动滚动功能。 - -:::demo - -```vue - - -``` +> demo: tabs auto-height -::: +### 手势滑动切换 -### 左右布局 +> demo: tabs swipeable -:::demo +### 标题滚动(上下布局) -```vue - - -``` +> demo: tabs scroll -::: +### 标题滚动(左右布局) -### 左右布局-微笑曲线 +> demo: tabs vertical -:::demo +### 左右布局 + Smile 类型 -```vue - - -``` +> demo: tabs vertical-smile -::: - -### 标签栏字体尺寸 large normal small - -:::demo - -```vue - - -``` +### 字体尺寸 -::: +> demo: tabs size ### 自定义标签栏 -:::demo - -```vue - - -``` - -::: +> demo: tabs custom ## API diff --git a/src/packages/__VUE/tabs/doc.taro.md b/src/packages/__VUE/tabs/doc.taro.md index c7e26e9cb8..af4aac0066 100644 --- a/src/packages/__VUE/tabs/doc.taro.md +++ b/src/packages/__VUE/tabs/doc.taro.md @@ -17,249 +17,39 @@ app.use(TabPane); ### 基础用法 -:::demo - -```vue - - -``` - -::: - -### 手势滑动切换 - -:::demo - -```vue - - -``` - -::: - -### 基础用法-微笑曲线 - -:::demo - -```vue - - -``` - -::: - -### TabPane 自动高度 - -自动高度。设置为 true 时,nut-tabs 和 nut-tabs\_\_content 会随着当前 nut-tab-pane 的高度而发生变化。 - -:::demo - -```vue - - -``` - -::: - -### 数据异步渲染 3s - -:::demo - -```vue - - -``` +> demo: tabs basic nav -::: +### Smile 类型 -### 数量多,滚动操作 +> demo: tabs smile nav -可通过`direction`属性修改标题栏自动滚动方向。 +### 自动高度 -在`taro`环境下,必须设置`name`以开启标题栏自动滚动功能。 - -:::demo - -```vue - - -``` +> demo: tabs auto-height nav -::: +### 手势滑动切换 -### 左右布局 +> demo: tabs swipeable nav -:::demo +### 标题滚动(上下布局) -```vue - - -``` +> demo: tabs scroll nav -::: +### 标题滚动(左右布局) -### 左右布局-微笑曲线 +> demo: tabs vertical nav -:::demo +### 左右布局 + Smile 类型 -```vue - - -``` +> demo: tabs vertical-smile nav -::: - -### 标签栏字体尺寸 large normal small - -:::demo - -```vue - - -``` +### 字体尺寸 -::: +> demo: tabs size nav ### 自定义标签栏 -:::demo - -```vue - - -``` - -::: +> demo: tabs custom nav ## API @@ -268,7 +58,7 @@ const list = ref([ | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | v-model | 绑定当前选中标签的标识符 | number \| string | `0` | -| color | 标签选中色 | string | `#1a1a1a ` | +| color | 标签选中色 | string | `#1a1a1a` | | background | 标签栏背景颜色 | string | `#f5f5f5` | | direction | 使用横纵方向 可选值 horizontal、vertical | string | `horizontal` | | type | 选中底部展示样式 可选值 line、smile | string | `line` |