|
@@ -43,19 +43,23 @@
|
|
|
classList = classList.split('bg')
|
|
|
}
|
|
|
this.$refs.span[index].setAttribute('class',classList)
|
|
|
- console.log(this.$refs.span[index])
|
|
|
}else{
|
|
|
this.obj[index] = item
|
|
|
- console.log(this.$refs.span[index].getAttribute('class'))
|
|
|
let classList = this.$refs.span[index].getAttribute('class') + ' bg'
|
|
|
this.$refs.span[index].setAttribute('class',classList)
|
|
|
- console.log(this.$refs.span[index])
|
|
|
}
|
|
|
- console.log(this.obj,'this.obj')
|
|
|
},
|
|
|
clear() {
|
|
|
- this.stringArr = this.string.split("")
|
|
|
this.obj = {}
|
|
|
+ this.stringArr = this.string.split("")
|
|
|
+ for(let i = 0; i < this.stringArr.length; i++){
|
|
|
+ let classList = this.$refs.span[i].getAttribute('class')
|
|
|
+ console.log(classList,'classList')
|
|
|
+ if(classList.indexOf('bg') > -1){
|
|
|
+ classList = classList.split('bg')
|
|
|
+ }
|
|
|
+ this.$refs.span[i].setAttribute('class',classList)
|
|
|
+ }
|
|
|
},
|
|
|
getData() {
|
|
|
let string = ""
|