Commit c38f6c6c authored by Jenny's avatar Jenny

feat: 修改tab组件下拉刷新状态不变问题

parent fee85e7f
......@@ -59,6 +59,14 @@
tabsValue: ''
};
},
mounted() {
uni.$on('handlePullDownRefresh', () => {
this.initChart()
})
},
destroy() {
uni.$off('handlePullDownRefresh')
},
computed: {
tabsGroup() {
const { type, count} = this.elementInfo.option.tabs
......@@ -83,12 +91,12 @@
}
},
methods: {
initChart() {
initChart(index = 0) {
this.currentTabs = index
this.tabsValue = this.elementData.dataList.series[this.currentTabs].value
},
handleTabsChange(index) {
this.currentTabs = index
this.initChart()
this.initChart(index)
this.tabsValueChange()
},
handleSelectChange(e) {
......
......@@ -212,6 +212,7 @@
const that = this
let res = await that.$u.api.getReportCharts({id: '6274f095460633568801a709'})
uni.stopPullDownRefresh()
uni.$emit('handlePullDownRefresh')
const { Status, Result: { info, list } } = res.data
if (Status === 'true') {
if(info.dataUrl) {
......
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