Commit 04ad1060 authored by leon's avatar leon

fix: realTime component add create

parent ecdd5c23
<template> <template>
<view> <view class="timer">
<div class="timer">
<NormalTitle :elementInfo="elementInfo"></NormalTitle> <NormalTitle :elementInfo="elementInfo"></NormalTitle>
<div :style="{ <div :style="{
'font-size':`${elementInfo.option.time.textStyle.fontSize}px`, 'font-size':`${elementInfo.option.time.textStyle.fontSize}px`,
...@@ -10,7 +9,6 @@ ...@@ -10,7 +9,6 @@
}"> }">
{{ realTime }} {{ realTime }}
</div> </div>
</div>
</view> </view>
</template> </template>
...@@ -26,8 +24,10 @@ ...@@ -26,8 +24,10 @@
timer: null timer: null
}; };
}, },
created() {
onUnLoad() { this.initChart()
},
destroyed() {
clearInterval(this.timer) clearInterval(this.timer)
}, },
methods: { methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment