Commit 03bb838b by 李伟康

修复BUG

1 parent 6e96394b
<template>
<div class="number-box flex">
<template v-if="numList.length">
<template v-for="(i,index) in numList">
<div :key="index">
......@@ -30,21 +29,21 @@ export default {
},
data () {
return {
numList: []
numList: [],
upData: Date.now()
}
},
watch: {
num (n) {
if (n > 0) {
document.querySelector(`#${this.idKey}`).style = `--step:${n}`
setTimeout(() => {
this.numList = this.setPrice(n)
}, 1000)
}else{
this.numList = []
document.querySelector(`#${this.idKey}`).style = `--step:0`
}
this.numList = []
setTimeout(() => {
if (n > 0) {
document.querySelector(`#${this.idKey}`).style = `--step:${n}`
setTimeout(() => {
this.numList = this.setPrice(n)
}, 1000)
} else document.querySelector(`#${this.idKey}`).style = `--step:0`
}, 200)
}
},
mounted () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!