Commit 151be183 authored by jyx's avatar jyx

代码优化

parent 2b43b53b
......@@ -126,7 +126,17 @@
},
computed: {
showEmpty: function() {
return isEmpty(this.dataList);
console.log(this.dataList)
if (isEmpty(this.dataList)) {
return true
} else {
if (typeof this.dataList == 'object') {
if (this.dataList.list != undefined) {
return isEmpty(this.dataList.list)
}
}
}
return false
},
scrollStyle: function() {
return {
......
......@@ -20,9 +20,10 @@
},
methods: {
goWareHouse() {
uni.switchTab({
url: '/pages/warehouse/warehouse'
});
uni.$emit('goWareHouse')
// uni.switchTab({
// url: '/pages/warehouse/warehouse'
// });
}
},
}
......
......@@ -86,6 +86,11 @@
mounted() {
// 渲染完成 初始化首页数据
this.loadComponentData();
let that = this
uni.$on('goWareHouse', function(data) {
that.tabChange(1)
})
},
methods: {
tabChange(index) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment