el和data的两种写法 一、el的两种写法 1、创建Vue实例的时候配置el属性。 <body> <div id="root"> <h1>你好,{ {name}}</h1> </div> </body> <script> new Vue({ el:'#root',