![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue学习
倔强小李
这个作者很懒,什么都没留下…
展开
-
vue打包后清除控制台日志
vue打包后清除控制台日志 第一步 安装依赖 npm install babel-plugin-transform-remove-console --save-dev 第二步 1.在babel.config.js下添加如下配置: plugins:['transform-remove-console'] 2.只在生产环境下移除如下配置: const plugins = ["@vue/babel-plugin-transform-vue-jsx"] // 生产环境移除console if(process.e原创 2022-04-08 16:41:24 · 601 阅读 · 0 评论 -
Vue组件复用,自定义文本
Vue组件的使用,以及自定义文本 html代码 <tip-tab title="每日精选"></tip-tab> 组件代码 通过props定义 Vue.component('tip-tab',{ props:['title'], data:function () { return{ } }, template:'<div class="tip_tab"><img src="src/assets/wantBuy.png" alt=""原创 2020-11-06 11:24:35 · 193 阅读 · 0 评论