Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="zh-TW">
- <head>
- <meta charset="UTF-8" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Vue</title>
- </head>
- <body>
- <div id="app">
- <input type="text" name="value" v-model="c.value" />
- ${$root}
- </div>
- <script src="https://unpkg.com/vue@next"></script>
- <script>
- var $vue;
- var vue_data={a:{'value':'abc'}, b:{'value':''}, c:{'value':'123'}};
- const VM={
- data(){return vue_data;},
- compilerOptions:{delimiters:['${', '}']},
- mounted(){
- console.log('Vue mounted');
- },
- updated(){
- console.log('Vue updated');
- },
- methods:{},
- watch:{},
- computed:{},
- }
- window.onload=()=>{
- $vue=Vue.createApp(VM).mount('#app');
- $vue.b=$vue.a;
- $vue.c=$vue.a;
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement