Commit eaaf1aff authored by youjie's avatar youjie

no message

parent 81ca5b3b
...@@ -238,26 +238,28 @@ ...@@ -238,26 +238,28 @@
watch: { watch: {
dataAll: { dataAll: {
handler(val, oldVal) { handler(val, oldVal) {
this.backgroundColor = this.hexToRgb(val.tripColor, 0.2) if(val.tripColor){
let rgba = this.hexToRgb(val.tripColor, 1) this.backgroundColor = this.hexToRgb(val.tripColor, 0.2)
rgba = rgba.split(',') let rgba = this.hexToRgb(val.tripColor, 1)
let rgba0 = rgba[0].split('(') rgba = rgba.split(',')
let arr = [rgba0[1],rgba[1],rgba[2]] let rgba0 = rgba[0].split('(')
if(this.getRgbLevel(arr)>50){ let arr = [rgba0[1],rgba[1],rgba[2]]
this.textColor = "#fff" if(this.getRgbLevel(arr)>50){
}else{ this.textColor = "#fff"
this.textColor = "#333" }else{
this.textColor = "#333"
}
} }
}, },
deep: true, deep: true,
immediate: false immediate: true
}, },
tripList: { tripList: {
handler(val, oldVal) { handler(val, oldVal) {
console.log(val,'1111--------')
}, },
deep: true, deep: true,
immediate: false immediate: true
}, },
}, },
mounted() { mounted() {
......
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