sse
This commit is contained in:
parent
b8509c593a
commit
492f652bab
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
||||||
<span :class="classes" @click="handleClick">time</span>
|
<span :class="classes" @click="handleClick">time</span>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import Vue from 'vue';
|
||||||
|
const isServer = Vue.prototype.$isServer;
|
||||||
import { oneOf } from '../../utils/assist';
|
import { oneOf } from '../../utils/assist';
|
||||||
|
|
||||||
const prefixCls = 'ivu-time';
|
const prefixCls = 'ivu-time';
|
||||||
|
@ -47,10 +49,14 @@
|
||||||
methods: {
|
methods: {
|
||||||
handleClick () {
|
handleClick () {
|
||||||
if (this.hash !== '') window.location.hash = this.hash;
|
if (this.hash !== '') window.location.hash = this.hash;
|
||||||
|
},
|
||||||
|
setTime () {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.setTime();
|
this.setTime();
|
||||||
|
if (isServer) return;
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
this.setTime();
|
this.setTime();
|
||||||
}, 1000 * this.interval);
|
}, 1000 * this.interval);
|
||||||
|
|
Loading…
Add table
Reference in a new issue