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) {
if (n > 0) { this.numList = []
document.querySelector(`#${this.idKey}`).style = `--step:${n}` setTimeout(() => {
setTimeout(() => { if (n > 0) {
this.numList = this.setPrice(n) document.querySelector(`#${this.idKey}`).style = `--step:${n}`
}, 1000) setTimeout(() => {
}else{ this.numList = this.setPrice(n)
this.numList = [] }, 1000)
document.querySelector(`#${this.idKey}`).style = `--step:0` } else document.querySelector(`#${this.idKey}`).style = `--step:0`
} }, 200)
} }
}, },
mounted () { mounted () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!