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: '暂无数据',
......
{
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": true,
"autoAudits": true,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": false,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": false,
"useStaticServer": true,
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.14.4",
"appid": "wx220b5d2dbb82ce64",
"projectname": "miniProject",
"cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
},
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/accountHome/index",
"pathName": "pages/accountHome/index",
"query": "",
"scene": null
}
]
}
}
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": true,
"autoAudits": true,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": false,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": false,
"useStaticServer": true,
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.14.4",
"appid": "wx220b5d2dbb82ce64",
"projectname": "miniProject",
"cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
},
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/accountHome/index",
"pathName": "pages/accountHome/index",
"query": "",
"scene": null
}
]
}
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!