Commit 9a44378f authored by Jenny's avatar Jenny

feat: tabs组件默认值设置

parent 9a9926d4
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
return { return {
currentTabs: 0, currentTabs: 0,
show: false, show: false,
tabsValue: this.elementInfo.option.tabs.defaultValue, tabsValue: '',
defaultValue: [0] defaultValue: [0]
} }
}, },
...@@ -121,13 +121,16 @@ export default { ...@@ -121,13 +121,16 @@ export default {
} }
}, },
methods: { methods: {
initChart(index = 0) { initChart() {
this.tabsValue = this.elementInfo.option.tabs.defaultValue
},
setTabsValue(index = 0) {
this.currentTabs = index this.currentTabs = index
this.defaultValue = [0] this.defaultValue = [0]
this.tabsValue = this.elementData.dataList.series[this.currentTabs].value this.tabsValue = this.elementData.dataList.series[this.currentTabs].value
}, },
handleTabsChange(index) { handleTabsChange(index) {
this.initChart(index) this.setTabsValue(index)
this.tabsValueChange() this.tabsValueChange()
}, },
handleSelectChange(e) { handleSelectChange(e) {
......
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