运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <head> <title>Vue v-cloak Directive</title> <style> [v-cloak] { color: red; } #app { padding: 10px; font-size: x-large; background-color: lightgreen; } </style> </head> <body> <h1>Vue v-cloak Example</h1> <p>The v-cloak directive is used to make the text red until the compilation is complete. Refresh the page, or click the "Run" button, to see the pre-compilation phase better.</p> <div id="app" v-cloak> {{ message }} </div> <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> <script> const app = Vue.createApp({ data() { return { message: "Hello World!" } } }) app.mount('#app') </script> </body> </html>