摘要: 1. 安装homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” 安装完毕之后执行(更新brew) brew update Brew 是Ma 阅读全文
posted @ 2019-11-21 09:09 xiaxuening 阅读(1454) 评论(0) 推荐(0) 编辑
摘要: const router = new Router({ mode: 'history', routes: [ { path: '/', redirect: '/login' }, { path: '/login', name: 'login', component: Login }, { path: 阅读全文
posted @ 2019-10-18 19:57 xiaxuening 阅读(1782) 评论(0) 推荐(1) 编辑
摘要: 1.去官网下载最新的安装包 在安装管理工具之前一定要把电脑中的node卸载干净,不然会有坑! 下载傻瓜式一键安装,要注意安装路径,不能有空格! 2.安装检测 新打开cmd 输入 nvm 如何出现错误,建议重新安装,或者根据错误自行Google 3.操作nvm 每个命令的用法和说明 4.安装node 阅读全文
posted @ 2019-10-10 17:07 xiaxuening 阅读(845) 评论(0) 推荐(0) 编辑
摘要: 1.webpack可以做哪些事儿 代码的转换,文件的优化,代码的分割,模块的合并,代码的校验,自动更新,自动发布,等等。 2.安装webpack npm init 新建项目 npm install webpack webpack-cli -D 3.简单配置,运行webpack,查看打包是否正确 pa 阅读全文
posted @ 2019-07-04 20:58 xiaxuening 阅读(447) 评论(0) 推荐(0) 编辑
摘要: function isURL(url) { const strRegex = '^((https|http|ftp)://)?'//(https或http或ftp):// 可有可无 + '(([\\w_!~*\'()\\.&=+$%-]+: )?[\\w_!~*\'()\\.&=+$%-]+@)?' 阅读全文
posted @ 2019-06-10 19:03 xiaxuening 阅读(2921) 评论(0) 推荐(0) 编辑
摘要: // const clickoutside = { // bind(el, binding,) { // function documentHandler(e) { // // 这里判断点击的元素是否是本身,是本身,则返回 // if (el.contains(e.target)) { // ret 阅读全文
posted @ 2019-06-04 17:19 xiaxuening 阅读(674) 评论(1) 推荐(0) 编辑
摘要: 此代码是在vue的基础上写的,要注意this的指向! 阅读全文
posted @ 2019-06-04 10:20 xiaxuening 阅读(7398) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 1.let or const 有块级作用域,let 声明变量,const声明常量 2.箭头函数 不绑定this 隐式返回 简单明了 不宜使用箭头函数 构造函数,一个方法需要绑定到对象 (new) 需要使用到this的时候 需要使用到arguments 3.函数默认值 conat A = 阅读全文
posted @ 2019-05-22 10:29 xiaxuening 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1. 安装brew 2. 查看brew 安装列表 (我已经安装过了,会有) 3. 安装MongoDB (安装路径) 4. 创建保存数据的文件夹 会出现没有权限 设置权限 给刚才新建的目录创建权限 5.更改mongod.conf 文件的设置 在finder中打开的方法 shift+commond+g 阅读全文
posted @ 2019-03-28 14:14 xiaxuening 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 写在前面: 给自己看,日常写业务有点儿繁琐,尝试着用vue+webpack 从零开始构建一个项目! 1.新建项目文件夹 运行命令 npm init (一路回车或者-y) 2.打开项目,新建src 文件夹,新建main.js,写一句js语句 3.安装webpack cnpm install webpa 阅读全文
posted @ 2019-03-21 11:15 xiaxuening 阅读(167) 评论(0) 推荐(0) 编辑