optmization

This commit is contained in:
JM 2018-12-20 22:36:34 +08:00
parent aac549bc22
commit 2cf1fe437a
1 changed files with 6 additions and 2 deletions

View File

@ -5,14 +5,18 @@ export default {
return {
defaultColors,
drawColors: ''
drawColors: '',
drawColorsMul: false
}
},
methods: {
initColors () {
const { colors, defaultColors } = this
this.drawColors = colors || defaultColors
const trueDrawColors = this.drawColors = colors || defaultColors
this.drawColorsMul = trueDrawColors instanceof Array
}
}
}