摘要: 插件引入(main.js里引用) import Plugin from './plugins.js'; Vue.use(Plugin); main.js import Vue from 'vue' import App from './App.vue' Vue.config.productionTi 阅读全文
posted @ 2021-08-30 23:21 幻影之舞 阅读(50) 评论(0) 推荐(0)
摘要: student.vue <template> <div class="student"> <h2>{{name}}</h2> <h2>{{age}}</h2> <button @click="showName">点我显示名字</button> </div> </template> <script>/ 阅读全文
posted @ 2021-08-30 22:47 幻影之舞 阅读(45) 评论(0) 推荐(0)
摘要: <template> <div id="app"> <h2 v-text="appname" ref="title"></h2> <button ref = 'btn' @click="show">点我显示</button> </div> </template> <script> export de 阅读全文
posted @ 2021-08-30 22:23 幻影之舞 阅读(201) 评论(0) 推荐(0)
摘要: 1.简单声明接受 props:['name','age'] 2.接受的同时对数据进行限制 props:{ name:String, age:Number } 3.接受的同时对数据进行限制+默认值的指定+必要性的限制 props:{ name:{ type:String, required:true/ 阅读全文
posted @ 2021-08-30 21:57 幻影之舞 阅读(280) 评论(0) 推荐(0)