Commit 03bb838b by 李伟康

修复BUG

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