Commit 20a85a50 by 李君

tabbar优化

1 parent beb0c7ea
Component({
data: {
show:true,
curClick: 1,
color: "#7A7E83",
selectedColor: "#3cc51f",
......
<!--miniprogram/custom-tab-bar/index.wxml-->
<view class="tab-bar">
<view class="tab-bar" wx:if="{{show}}">
<view class="tab-bar-border"></view>
<view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<image src="{{curClick === item.curr ? item.selectedIconPath : item.iconPath}}"></image>
......
......@@ -61,6 +61,9 @@ Component({
methods: {
// 关闭自定义日期选择
onClose() {
this.getTabBar().setData({
show: true
});
this.setData({
show: false
});
......@@ -75,6 +78,9 @@ Component({
},
// 点击自定义日期选择器的确定
onConfirm(event) {
this.getTabBar().setData({
show: true
});
const [start, end] = event.detail;
let startDate = moment(start).format("YYYY-MM-DD")
let endDate = moment(end).format("YYYY-MM-DD")
......@@ -108,6 +114,9 @@ Component({
show: true,
types: e.target.dataset.type,
})
this.getTabBar().setData({
show: false,
});
break;
}
if (dateType != 5) {
......@@ -214,8 +223,15 @@ Component({
// 返回趋势图配置项
getLineConfig(res) {
let xasix = res.xaxis.data || []
let seriesList = res.series || []
if (seriesList.length < 1) {
let seriesList = res.series || [];
let data = seriesList[0].data;
let isData = false;
for (let index = 0; index < data.length; index++) {
if(data[index] != null){
isData = true;
}
}
if (!isData) {
return {
title: {
text: '暂无数据',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!