Replies: 1 comment 2 replies
-
There is a demo: Play GRound <script setup>
import { ref, onMounted } from 'vue'
const flag = ref(true)
const demo = ref()
const domStr = ref('')
onMounted(() => {
domStr.value = demo.value.outerHTML
})
</script>
<template>
<div ref="demo" :class="{ someClass: flag }">demo</div>
<div>
{{ domStr }}
</div>
</template>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It is possible to add a option in
vue.config.js
?Then if you typing in
<template>
:It will automatically convert to
Especially in
It will automatically convert to
This can omit quotation marks and be more convenient.
Beta Was this translation helpful? Give feedback.
All reactions