|
@@ -67,20 +67,21 @@ export default {
|
|
|
if (dataList && dataList.length > 0) {
|
|
if (dataList && dataList.length > 0) {
|
|
|
this.currentState = dataList[0]
|
|
this.currentState = dataList[0]
|
|
|
}
|
|
}
|
|
|
- this.states = states
|
|
|
|
|
|
|
+ this.states = dataList
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleNextFrame() {
|
|
handleNextFrame() {
|
|
|
|
|
+ console.log(this.states)
|
|
|
if (this.currentStateIndex < this.states.length - 1) {
|
|
if (this.currentStateIndex < this.states.length - 1) {
|
|
|
this.currentState = this.states[this.currentStateIndex + 1]
|
|
this.currentState = this.states[this.currentStateIndex + 1]
|
|
|
- this.currentStateIndex++
|
|
|
|
|
|
|
+ this.currentStateIndex += 1
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handlePreFrame() {
|
|
handlePreFrame() {
|
|
|
if (this.currentStateIndex > 0) {
|
|
if (this.currentStateIndex > 0) {
|
|
|
this.currentState = this.states[this.currentStateIndex - 1]
|
|
this.currentState = this.states[this.currentStateIndex - 1]
|
|
|
- this.currentStateIndex--
|
|
|
|
|
|
|
+ this.currentStateIndex -= 1
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|