diff --git a/examples/router/routes.js b/examples/router/routes.js index 6ebbc3c..7e8d7be 100644 --- a/examples/router/routes.js +++ b/examples/router/routes.js @@ -60,6 +60,12 @@ const _components = [ meta: { title: 'NavBar 导航栏' }, component: () => import('@/views/docs/component/nav-bar.md'), }, + { + path: 'tab-bar', + name: 'tab-bar', + meta: { title: 'TabBar 标签栏' }, + component: () => import('@/views/docs/component/tab-bar.md'), + }, ] }, { diff --git a/examples/views/docs/component/tab-bar.md b/examples/views/docs/component/tab-bar.md new file mode 100644 index 0000000..a6ae7d2 --- /dev/null +++ b/examples/views/docs/component/tab-bar.md @@ -0,0 +1,36 @@ +# TabBar 标签栏 + +说明 + +## 基础用法 + +说明 + +::: snippet 示例 + +```html + + + + + +``` + +::: \ No newline at end of file diff --git a/examples/views/docs/component/tag.md b/examples/views/docs/component/tag.md index 1ebc7c6..48ab0e6 100644 --- a/examples/views/docs/component/tag.md +++ b/examples/views/docs/component/tag.md @@ -22,8 +22,9 @@ font-color="#fff" >续保3折起 - 发布3条 - + 发布3条 + + 可选 diff --git a/packages/tabBar/index.css b/packages/tabBar/index.css new file mode 100644 index 0000000..d6a9896 --- /dev/null +++ b/packages/tabBar/index.css @@ -0,0 +1,54 @@ +.zui-tab-bar { + position: relative; + padding-left: 16px; + padding-right: 16px; + background-color: #fff; +} +.zui-tab-bar-inner { + position: relative; + width: 100%; +} +.zui-tab-bar-list { + display: flex; + justify-content: space-between; + min-width: 100%; +} +.zui-tab-bar-item { + flex: auto; + flex-shrink: 0; + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + color: #aaa; + font-size: 14px; + font-weight: 600; + min-height: 50px; + padding: 0 16px; + margin: 0 auto; + box-sizing: border-box; + -webkit-user-select: none; + -webkit-tap-highlight-color: transparent; +} +.zui-tab-bar-item::after { + position: absolute; + display: block; + content: ''; + border-color: transparent; + border-width: 1px; + border-style: solid; + width: 100%; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +.zui-tab-bar-item.is-active { + color: #FCD404; + font-weight: bold; +} +.is-active.zui-tab-bar-item::after { + border-color: #FCD404; +} +.zui-tab-bar-item.is-disabled { + color: #ccc; +} diff --git a/packages/tabBar/index.vue b/packages/tabBar/index.vue new file mode 100644 index 0000000..e66f3eb --- /dev/null +++ b/packages/tabBar/index.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file -- libgit2 0.21.0