随笔分类 - vue
vue2.0
摘要:1.使用软链复制根目录的node_modues文件到项目:mklink /j E:\xxx\项目名称\node_modules E:\node_modules 2.运行时如果有报错 Error: No PostCSS Config found in... 可修改配置文件build目录下:webpac
阅读全文
摘要:<template> <div class="index"> <el-dialog class="dialog" :visible.sync="dialogStatus"> <div class="info"> <div class="fl"> <p class="p1">自动生成截图框 固定比例
阅读全文
摘要:在项目内添加一个 .npmrc 文件: phantomjs_cdnurl=http://cnpmjs.org/downloads sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ registry=https://registry.
阅读全文
摘要:网上的教程都是骗人的鬼,没有一个成功的,直接看代码: vue创建表单,添加参数,然后传到接口 koa要安装依赖才能获取form-data的参数 const multiparty = require("multiparty"); static async _form(ctx) { let form =
阅读全文
摘要:koa获取页面的数据操作数据库 vue在html页面添加第三方ip判断方法 接口传值的接口
阅读全文
摘要:插件: 1)ESlint 2)vetur 3)Prettier - Code formatter 4)Manta's Stylus Supremacy
阅读全文
摘要:let time = 10 let intervalFunc = window.setInterval(() => { time = time - 1 if (time < 1) { window.clearInterval(intervalFunc) } }, 1000)
阅读全文
摘要:1.安装 "babel-polyfill" npm install --save-dev babel-polyfill 2.在入口main.js文件引入:import 'babel-polyfill' 3.在build文件夹下找到webpack.base.conf.js.修改入口方式 4.最后,再依
阅读全文
摘要:A,vue生命周期 1.creat->beforeCreat(创建完成之前) 2.mounted->beforeMount (挂载之前) 3.updated->beforeUpdate(更新数据之前) 4.destroy->beforeDestroy(销毁之前) B,vue函数 1.data(初始化
阅读全文
摘要:安装依赖 sass-loader, sass-resources-loader, node-sass <style type="text/scss" lang="scss" scoped> .list{padding: 10px;font-size: 14px; p{border-bottom: 1
阅读全文
摘要:.babelrc 文件修改 { "presets": [ ["env", { "modules": false, "targets": { "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] } }], "stage-2" ], "plugi
阅读全文
摘要:process.env.devtools true是开发环境
阅读全文
摘要:/* eslint-disable no-new */let {VConsole} = require('./assets/js/vconsole.min.js')new VConsole()
阅读全文
摘要:watch: { orderData (val) { this.$nextTick(() => { // 数据变动 且渲染完成后 this.pageHeight = document.querySelector('html').scrollHeight this.viewHeight = document.querySelector('html...
阅读全文
摘要:npm install -g vue-cli //安装vue-cli架子 vue init nuxt-community/starter-template <project-name> //安装nuxt npm run dev //开发运行, http://localhost:3000 如果需要生产
阅读全文
摘要:一、安装 npm intall webpack-bundle-analyzer –save-dev 二、配置 在build/webpack.prod.config.js中的module.exports = webpackConfig这句话的上面增加 三、运行 使用命令npm run build --
阅读全文
摘要:1.先下载依赖 npm install vue-i18 -save 2.在main.js文件加入i18 3.编写需要变化的数据 4.在页面上调用 {{$t('message.hello')}} 5.点击改变数据 this.$i18n.locale='English'
阅读全文
摘要:vue知识点 生命周期: 过滤器filter 组件component 方法methods 监控变化watch axios请求 router路由 { path: '/', component: login, meta:{index:2,footer:true,header:true,title:'登录
阅读全文
摘要:this.$refs.audio.volume=1 //0-1
阅读全文

浙公网安备 33010602011771号