Skip to content

Commit 1269162

Browse files
committed
feat(TabBar): 新增 TabBar 导航栏组件
1 parent 79edf3e commit 1269162

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+402
-27
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"Component": true,
2424
"Page": true,
2525
"wx": true,
26-
"App": true
26+
"App": true,
27+
"getCurrentPages":true
2728
},
2829
"ignorePatterns": [
2930
"dist/*",

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module.exports = {
7272
'CapsuleBar',
7373
'Circle',
7474
'ImageClipper',
75-
'CustomTabBar'
75+
'TabBar'
7676
]
7777
]
7878
}

examples/app.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"navigationBarTextStyle": "black"
1313
},
1414
"tabBar": {
15+
"custom":true,
1516
"color": "#bbbbbb",
1617
"selectedColor": "#3963BC",
1718
"backgroundColor": "#ffffff",
@@ -85,7 +86,8 @@
8586
"pages/tabbar/index",
8687
"pages/combined-tabs/index",
8788
"pages/segment/index",
88-
"pages/capsule-bar/index"
89+
"pages/capsule-bar/index",
90+
"pages/tab-bar/index"
8991
]
9092
},
9193
{

examples/components/content-card/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// components/cotent-title/index.js
22
Component({
3+
options:{
4+
multipleSlots:true
5+
},
36
externalClasses: ['l-content'],
47
/**
58
* 组件的属性列表

examples/components/content-card/index.wxml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<view class="content-card">
22
<view class="card-top">
3-
<view class="card-dot"></view>
4-
<view class="content-name">{{name}}</view>
3+
<view class="card-top-left">
4+
<view class="card-dot"></view>
5+
<view class="content-name">{{name}}</view>
6+
</view>
7+
<slot name="top-right" />
58
</view>
69
<view class="card-bottom l-content {{cardPadding?'card-padding':'padd'}}">
710
<slot />

examples/components/content-card/index.wxss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,20 @@
1616
margin-left: 26rpx;
1717
}
1818

19+
.card-top-left{
20+
display: flex;
21+
align-items: center;
22+
}
23+
1924
.card-top {
2025
display: flex;
2126
flex-direction: row;
2227
align-items: center;
28+
justify-content: space-between;
2329
width: 750rpx;
2430
height: 100rpx;
31+
padding-right: 26rpx;
32+
box-sizing: border-box;
2533
}
2634

2735
.content-name {

examples/pages/about/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// pages/about/index.js
2+
import tabbar from '../tabbar';
23
wx.cloud.init({
34
env: 'env-9eb476'
45
});
@@ -10,7 +11,8 @@ Page({
1011
* 页面的初始数据
1112
*/
1213
data: {
13-
version: '....'
14+
version: '....',
15+
list:tabbar
1416
},
1517

1618
/**

examples/pages/about/index.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"usingComponents": {}
2+
"usingComponents": {
3+
"l-tab-bar": "/dist/tab-bar/index"
4+
}
35
}

examples/pages/about/index.wxml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<!-- pages/about/index.wxml -->
1+
<l-tab-bar text-color="#bbbbbb" list="{{list}}" />
2+
23
<view class='container'>
34
<view class='logo-container'>
45
<image class='logo-img' src='cloud://env-9eb476.656e-env-9eb476-1258886794/images/other/logo.png'></image>
5.52 KB

0 commit comments

Comments
 (0)