标签:temp 任务 mount OLE section world val before efault
<template> <section> <h1>hello world~</h1> </section> </template> <script> export default { data() { return { timer: ‘‘, value: 0 }; }, methods: { get() { console.log(‘你好‘); } }, mounted() { // 每隔5s发送一次 this.timer = setInterval(this.get, 5000); }, beforeDestroy() { clearInterval(this.timer); } }; </script>
标签:temp 任务 mount OLE section world val before efault
原文地址:https://www.cnblogs.com/zhangshijiezsj/p/14180626.html