标签:app div one message .net back net vue ret
1 is="lili"
2 message传值
3 todo:父子属性传值
<!DOCTYPE html> <html> <title>vue中的条件渲染</title> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <body><div id="app" > <ul> <li is="lili"></li> </ul> </div> <script> Vue.component("lili",{ data:function(){ return { message:"message" } }, template:‘<li>{{message}}</li>‘ }) var vm = new Vue({ el:"#app", data:{ message:"hello world" } }) </script> </body> </html>
标签:app div one message .net back net vue ret
原文地址:https://www.cnblogs.com/stevenlii/p/9163425.html