<div id="app">
<div v-for="item in 3" :key="item" ref="box">{{ item }}</div>
</div>
const { createApp, onMounted, ref } = Vue;
const app = createApp({
setup() {
const box = ref([]);
onMounted(() => {
console.log('DOM Box:', box.value);
})
return {
box,
}
}
});
app.mount('#app');
This Pen doesn't use any external CSS resources.