2020
10-09
10-09
Vue 实现创建全局组件,并且使用Vue.use() 载入方式
自定义vue组件,一般是局部引用的方式载入,使用的时候,在应用的组件中使用importmoduleNamefrom‘module'导入,在components中注册<template><divclass="app-NewsInfo"><h3>{{info.title}}</h3><!--新闻评论子组件。--><comment:id="id"></comment></div></template><script>importcommentfrom"../sub/comment.vue";exportdefault{data(){return{info:{},id:this.$route.query.id};},methods:{...
继续阅读 >