|
@ -2,7 +2,7 @@ |
|
|
<div> |
|
|
<div> |
|
|
<div class="chartNum"> |
|
|
<div class="chartNum"> |
|
|
<div :id="tnum" class="box-items"> |
|
|
<div :id="tnum" class="box-items"> |
|
|
<li v-for="index in flipNum" :key="index" class="number-item"><span><i :ref="tnum" :class="tnum">0123456789</i></span></li> |
|
|
|
|
|
|
|
|
<li v-for="item in ikey" :key="tnum+item" class="number-item"><span><i :ref="tnum" :class="tnum">0123456789</i></span></li> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -13,10 +13,11 @@ export default { |
|
|
props: { |
|
|
props: { |
|
|
tnum: { |
|
|
tnum: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: null |
|
|
|
|
|
|
|
|
default: null, |
|
|
|
|
|
timer: null |
|
|
}, |
|
|
}, |
|
|
chartnum: { |
|
|
chartnum: { |
|
|
type: Array, |
|
|
|
|
|
|
|
|
type: Number, |
|
|
default: function() { |
|
|
default: function() { |
|
|
return 0 |
|
|
return 0 |
|
|
} |
|
|
} |
|
@ -25,7 +26,8 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
echartnum: this.chartnum, |
|
|
echartnum: this.chartnum, |
|
|
flipNum: [0, 0, 0, 0, 0, 0, 0, 0] |
|
|
|
|
|
|
|
|
flipNum: [0, 0, 0, 0, 0, 0, 0, 0], |
|
|
|
|
|
ikey: [1, 2, 3, 4, 5, 6, 7, 8] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
@ -44,7 +46,8 @@ export default { |
|
|
// document.getElementById(this.tnum).innerHTML = strHtml |
|
|
// document.getElementById(this.tnum).innerHTML = strHtml |
|
|
// 定时改变数字 |
|
|
// 定时改变数字 |
|
|
const _this = this |
|
|
const _this = this |
|
|
setInterval(() => { |
|
|
|
|
|
|
|
|
this.timer = null |
|
|
|
|
|
this.timer = setInterval(() => { |
|
|
// _this.toOrderNum('123456') |
|
|
// _this.toOrderNum('123456') |
|
|
_this.toOrderNum(this.chartnum) |
|
|
_this.toOrderNum(this.chartnum) |
|
|
_this.setNumberTransform() |
|
|
_this.setNumberTransform() |
|
|