2018-12-20 18:25:49 +08:00
|
|
|
import defaultColors from '../config/color.js'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
defaultColors,
|
|
|
|
|
2018-12-20 22:36:34 +08:00
|
|
|
drawColors: '',
|
|
|
|
|
|
|
|
drawColorsMul: false
|
2018-12-20 18:25:49 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
initColors () {
|
|
|
|
const { colors, defaultColors } = this
|
|
|
|
|
2018-12-20 22:36:34 +08:00
|
|
|
const trueDrawColors = this.drawColors = colors || defaultColors
|
|
|
|
|
|
|
|
this.drawColorsMul = trueDrawColors instanceof Array
|
2018-12-20 18:25:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|