const { createApp } = PetiteVue
const { log, dir, table, clear, warn, error } = console; clear();
createApp({
count: 0,
num: 0,
random() {
this.num = Math.random() * 10000
},
mounted() {
setInterval(()=>{
this.count++
}, 1500)
}
})
.mount()
<div id="app" @vue:mounted="mounted">
<p>{{count}}</p>
<button @click="count++">Plus</button>
<div style="width:fit-content;color:#fff;padding:50px;margin:10px;background:#08f;">
<span v-effect="random(count)">{{num}}</span>
</div>
</div>