From 19a89d38d2536b4a1b4e68a1cbf6f1bbcb66acf9 Mon Sep 17 00:00:00 2001 From: tkggusraqk Date: Wed, 19 Sep 2018 15:50:55 +0800 Subject: [PATCH] [new feature] Tab: add border prop (#595) --- .gitignore | 1 + packages/tab/README.md | 3 ++- packages/tabs/index.js | 4 ++++ packages/tabs/index.wxml | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 87ec6754..f35ccde8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ node_modules project.config.json docs/dist example/dist +.history diff --git a/packages/tab/README.md b/packages/tab/README.md index abd1441e..87f05b1b 100644 --- a/packages/tab/README.md +++ b/packages/tab/README.md @@ -117,7 +117,8 @@ Page({ |-----------|-----------|-----------|-------------| | active | 当前激活标签的索引 | `String` `Number` | `0` | | color | 标签颜色 | `String` | `#f44` | -| type | 样式风格,可选值为 `card` | `String` | `line` | +| type | 样式风格,可选值为`card` | `String` | `line` | +| border | 是否展示外边框,仅在`line`风格下生效 | `Boolean` | `true` | | duration | 动画时间 (单位秒) | `Number` | `0.2` | | line-width | 底部条宽度 (px) | `Number` | 与当前标签等宽 | | swipe-threshold | 滚动阈值,设置标签数量超过多少个可滚动 | `Number` | `4` | diff --git a/packages/tabs/index.js b/packages/tabs/index.js index 91cb829d..9443ae58 100644 --- a/packages/tabs/index.js +++ b/packages/tabs/index.js @@ -42,6 +42,10 @@ create({ type: String, value: 'line' }, + border: { + type: Boolean, + value: true + }, duration: { type: Number, value: 0.2 diff --git a/packages/tabs/index.wxml b/packages/tabs/index.wxml index ba43a656..4b55d7c9 100644 --- a/packages/tabs/index.wxml +++ b/packages/tabs/index.wxml @@ -1,5 +1,5 @@ - +