摘要: shelljs:shell处理库depcheck:检测项目中未使用的依赖 阅读全文
posted @ 2020-01-03 09:57 yifamily 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 对于使用vue-router配置不同的路由,但使用相同的组件时,跳转后页面无反应,数据不会刷新。 解决办法:监听路由变化 watch: { //监听相同路由下参数变化的时候,从而实现异步刷新 $route(to, from) { //要处理的操作 } } 阅读全文
posted @ 2019-11-16 17:10 yifamily 阅读(668) 评论(0) 推荐(0) 编辑
摘要: 我安装的sass-loader默认是最新版本8.0.0,因该版本太高,导致报错,在package.json中设置sass-loader版本为7.3.1,重新运行npm install即可解决。 或者直接运行: npm update sass-loader@7.3.1 --save 阅读全文
posted @ 2019-11-13 21:47 yifamily 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 安装cnpm: npm install -g cnpm --registry=https://registry.npm.taobao.org 安装完成后报错:无法加载文件 C:\Users\yizon\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本 解决:管理员 阅读全文
posted @ 2019-11-13 21:16 yifamily 阅读(7123) 评论(0) 推荐(0) 编辑
摘要: let image = new Image(); image.src = src + '?v=' + Math.random(); image.crossOrigin = 'Anonymous'; // 支持跨域图片 image.onload = function() { let canvas = 阅读全文
posted @ 2019-11-09 14:04 yifamily 阅读(7074) 评论(0) 推荐(1) 编辑
摘要: 1、保存时根据eslint规则自动格式化: // #每次保存的时候将代码按eslint格式进行修复 "eslint.autoFixOnSave": true, "eslint.options": { "extensions": [ ".js", ".vue" ] }, // 添加vue支持 "esl 阅读全文
posted @ 2019-11-05 20:49 yifamily 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1、安装vue-cli: npm install -g vue-cli 2、创建基于webpack模板项目: vue init webpack 项目名 3、引入axios并在main.js文件中将axios挂载到vue原型上: npm install axios --save import axio 阅读全文
posted @ 2019-11-04 16:58 yifamily 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 1、安装express: npm install express --save 2、新建server/index.js启动文件: // 引入express const express = require('express') const app = express() // 引入路由 const r 阅读全文
posted @ 2019-11-04 16:58 yifamily 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1、官网下载mysql,解压; 2、打开刚刚解压的文件夹 C:\Users\yizl\Documents\Program Files\mysql-8.0.13-winx64 ,在该文件夹下创建 my.ini 配置文件,编辑 my.ini 配置以下基本信息: [client] # 设置mysql客户端 阅读全文
posted @ 2019-11-04 08:05 yifamily 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 官方文档上是用插件: optimization: { splitChunks: { cacheGroups: { commons: { name: "commons", chunks: "initial", minSize: 1 } } } } optimization: { splitChunks 阅读全文
posted @ 2019-10-14 08:58 yifamily 阅读(305) 评论(0) 推荐(0) 编辑