refactor: 视图样式优化

This commit is contained in:
junjie 2021-07-30 12:47:15 +08:00
parent 5da8de3332
commit 05ab2d576b
8 changed files with 146 additions and 114 deletions

View File

@ -148,6 +148,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) {
let customStyle = null
@ -160,13 +170,7 @@ export default {
this.legendForm = customStyle.legend
}
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 10; i <= 60; i = i + 2) {

View File

@ -122,6 +122,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) {
let customStyle = null
@ -136,13 +146,7 @@ export default {
this.splitForm = JSON.parse(JSON.stringify(DEFAULT_SPLIT))
}
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 6; i <= 40; i = i + 2) {

View File

@ -136,6 +136,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) {
let customStyle = null
@ -149,13 +159,7 @@ export default {
}
this.titleForm.title = this.chart.title
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 10; i <= 60; i = i + 2) {

View File

@ -178,6 +178,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) {
let customStyle = null
@ -196,13 +206,7 @@ export default {
}
}
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 6; i <= 40; i = i + 2) {

View File

@ -178,6 +178,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) {
let customStyle = null
@ -196,13 +206,7 @@ export default {
}
}
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 6; i <= 40; i = i + 2) {

View File

@ -177,6 +177,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) {
let customAttr = null
@ -192,13 +202,7 @@ export default {
}
}
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 10; i <= 20; i = i + 2) {

View File

@ -317,6 +317,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) {
let customAttr = null
@ -329,13 +339,7 @@ export default {
this.sizeForm = customAttr.size
}
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 10; i <= 60; i = i + 2) {

View File

@ -144,6 +144,16 @@ export default {
watch: {
'chart': {
handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) {
let customAttr = null
@ -156,13 +166,7 @@ export default {
this.tooltipForm = customAttr.tooltip
}
}
}
}
},
mounted() {
this.init()
},
methods: {
init() {
const arr = []
for (let i = 10; i <= 20; i = i + 2) {