创建项目 本地创建一个目录&执行初始化命令: mkdir vue-component cd vue-component npm init 安装依赖: npm i rollup npm i rollup-plugin-commonjs
const parseVueComponentData2 = (data) => { let htmlStr = `
当引入路径为图片时,可以预览当前图片 GitLens 功能:增强了git功能,支持在VSCode查看作者、修改时间等等 open in browser 功能:在浏览器打开当前文件 Vue 开发推荐 vue-component 插件名:vue-component 功能:输入组件名称自动导入找到的组件,自动导入路径和组件 选中后自动输入组件名(包含必填属性)、import语句、components属性 Vetur
:当引入路径为图片时,可以预览当前图片 GitLens 功能:增强了git功能,支持在VSCode查看作者、修改时间等等 open in browser 功能:在浏览器打开当前文件 Vue 开发推荐 vue-component 插件名:vue-component 功能:输入组件名称自动导入找到的组件,自动导入路径和组件 选中后自动输入组件名(包含必填属性)、import语句、components属性 Vetur 插件名
全局组件注册语法糖 ---- https://cn.vuejs.org/v2/api/#Vue-component 全局组件注册语法糖写法: 将 Vue.extend() 的参数作为 Vue.component
注册还会自动使用给定的 id 设置组件的名称 // https://v2.cn.vuejs.org/v2/api/#Vue-component component: ( id: string
assertNodeMatch(node, vnode, inVPre) { if (isDef(vnode.tag)) { return ( vnode.tag.indexOf('vue-component assertNodeMatch(node, vnode, inVPre) { if (isDef(vnode.tag)) { return ( vnode.tag.indexOf('vue-component
function assertNodeMatch (node, vnode, inVPre) { if (isDef(vnode.tag)) { return vnode.tag.indexOf('vue-component
function assertNodeMatch (node, vnode, inVPre) { if (isDef(vnode.tag)) { return vnode.tag.indexOf('vue-component