first add files
This commit is contained in:
19
ProjectLiaisonForm/pages/tab-bar/icon-only/index.js
Normal file
19
ProjectLiaisonForm/pages/tab-bar/icon-only/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
Component({
|
||||
data: {
|
||||
value: 'label_1',
|
||||
list: [
|
||||
{ value: 'label_1', icon: 'home', ariaLabel: '首页' },
|
||||
{ value: 'label_2', icon: 'app', ariaLabel: '软件' },
|
||||
{ value: 'label_3', icon: 'chat', ariaLabel: '聊天' },
|
||||
{ value: 'label_4', icon: 'user', ariaLabel: '我的' },
|
||||
],
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.setData({
|
||||
value: e.detail.value,
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
8
ProjectLiaisonForm/pages/tab-bar/icon-only/index.json
Normal file
8
ProjectLiaisonForm/pages/tab-bar/icon-only/index.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar",
|
||||
"t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item"
|
||||
}
|
||||
}
|
||||
9
ProjectLiaisonForm/pages/tab-bar/icon-only/index.wxml
Normal file
9
ProjectLiaisonForm/pages/tab-bar/icon-only/index.wxml
Normal file
@@ -0,0 +1,9 @@
|
||||
<t-tab-bar t-class="t-tab-bar" value="{{value}}" bindchange="onChange" theme="tag" split="{{false}}">
|
||||
<t-tab-bar-item
|
||||
wx:for="{{list}}"
|
||||
wx:key="value"
|
||||
value="{{item.value}}"
|
||||
icon="{{item.icon}}"
|
||||
ariaLabel="{{item.ariaLabel}}"
|
||||
></t-tab-bar-item>
|
||||
</t-tab-bar>
|
||||
Reference in New Issue
Block a user