随笔分类 - vue
摘要:devServer: { open: true, host: '0.0.0.0', port: 8000, proxy: { '/api': { target: '网址', changeOrigin: true, pathRewrite: { '^/api': '' }, headers: { ho
阅读全文
摘要:beforeCreate(创建前) created(创建后) beforeMount(挂载前) mounted(挂载后) beforeUpdate(更新前) updated(更新后) beforeDestroy(销毁前) destroyed(销毁后)
阅读全文
摘要:虽然在 Vue 中不推荐使用 jQuery ,但有时候要使用一个插件,这个插件又依赖于 jQuery ,则没有更好的办法 写在前面的话如果实在是因为无法避免的原因,需要在 Vue 项目中使用到 jQuery则建议使用局部引入的方式,就是哪个文件需要用到 jQuery ,就在哪个文件中引入在网上搜 “
阅读全文
摘要:错误提示: 解决办法: 1、安装less-loader npm install less less-loader --save-dev 安装后运行又会出现另外一次错误,找不到“less”模块,如下图: 2、只需安装less即可 npm install less --save-dev 推荐前端blog
阅读全文
摘要:computed: { // 控制显示的内容 computedTxt() { return function(value) { return this.methodGetByteLen(value, 20) } }, getdata(){ return:"1233" } }
阅读全文
摘要:<div style="width:100%;height:350px" rel="clientWidth"></div> var resize = { width:844, height:350 } this.chart.resize(resize); Vue获取div的宽度 在template
阅读全文