first commit
This commit is contained in:
38
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.acss
vendored
Normal file
38
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.acss
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
.tabbar_pages {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 750rpx;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(88, 140, 255, 0.1);
|
||||
border-radius: 15rpx 15rpx 0rpx 0rpx;
|
||||
z-index: 99;
|
||||
padding: 20rpx 115rpx;
|
||||
}
|
||||
.tabbar_pages_view {
|
||||
width: 100%;
|
||||
}
|
||||
.tabbar_pages_view view {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.tabbar_pages_view view image {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.tabbar_pages_view:nth-child(1) view {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.tabbar_pages_view:nth-child(3) view {
|
||||
align-items: flex-end;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="tabbar_pages p30"><view a:for="{{a}}" a:for-item="item" a:key="d" class="tabbar_pages_view" onTap="{{item.e}}"><view><view><image mode="widthFix" src="{{item.a}}"></image></view><view style="{{'color:' + item.c}}">{{item.b}}</view></view></view></view>
|
||||
59
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.js
vendored
Normal file
59
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
__name: "tabbar",
|
||||
props: {
|
||||
path: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const data = __props;
|
||||
let list = common_vendor.ref([
|
||||
{
|
||||
pagePath: "/pages/index/index",
|
||||
text: "首页",
|
||||
icon_select: "/static/tabbar/home.png",
|
||||
icon: "/static/tabbar/homes.png",
|
||||
type: 0
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/market/market",
|
||||
text: "公告",
|
||||
icon_select: "/static/tabbar/market.png",
|
||||
icon: "/static/tabbar/markets.png",
|
||||
type: 0
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/mine/mine",
|
||||
text: "我的",
|
||||
icon_select: "/static/tabbar/mine.png",
|
||||
icon: "/static/tabbar/mines.png",
|
||||
type: 0
|
||||
}
|
||||
]);
|
||||
const toLink = (e) => {
|
||||
common_vendor.index.vibrateShort();
|
||||
if (data.path == e)
|
||||
return true;
|
||||
common_vendor.index.switchTab({
|
||||
url: e
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(common_vendor.unref(list), (item, index, i0) => {
|
||||
return {
|
||||
a: __props.path == item.pagePath ? item.icon : item.icon_select,
|
||||
b: common_vendor.t(item.text),
|
||||
c: __props.path == item.pagePath ? "#4874E5" : "",
|
||||
d: index,
|
||||
e: common_vendor.o(($event) => toLink(item.pagePath))
|
||||
};
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
my.createComponent(_sfc_main);
|
||||
5
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/components/tabbar/tabbar.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
Reference in New Issue
Block a user