![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue-js
wkCaeser_
蹒跚学步,笨鸟先飞,但好像有点飞不动......
展开
-
vue.js环境安装及用wepack创建项目
vue.js环境安装及用wepack创建项目1、安装node及npm在官网下载node http://nodejs.cn/download/; 我选择的是windows的msi安装包,直接点击安装即可。 安装完成后自动配置了相应的环境变量,而npm则是集成在新版的node安装包中。2、npm配置淘宝源npm镜像比较慢,建议配置淘宝源: 临时使用:npm --registry https://原创 2018-01-05 15:42:02 · 620 阅读 · 0 评论 -
axios发送post请求springMVC接收不到参数
axios发送post请求时,出现了参数后台接收不到的情况,分析了下请求,发现是请求头content-type不对,是application/json,正常应该是application/x-www-form-urlencoded。 解决方法有以下三种: 1、设置axios的默认请求头//设置全局的 axios.defaults.headers.post['Content-Type'] = 'ap原创 2018-01-10 20:43:47 · 6930 阅读 · 0 评论 -
vue全局方法和属性的注册
根据JavaScript原型链的原理,我们可以将全局变量和方法挂在在Vue的父类上,即使用Vue.prototype来挂载。 例如我们想讲一个路由跳转方法toPath能够全局使用,但又不想每个组件去声明定义一遍,那我们就直接将其挂在Vue.prototype上。 我们在main.js声明Vue时将其挂载上: import Vue from 'vue' import App from '....原创 2018-05-13 20:46:44 · 7556 阅读 · 0 评论 -
vue-router路由使用
使用npm通过webpack模板创建vue工程后,会发现以下几个东西: 1、router目录下有个index.js文件 2、App.vue文件内容里面有个< router-view />标签 index.js里面Router具体路由的定义,如下格式: xport default new Router({ routes: [ { path: '/', ...原创 2018-05-13 21:13:49 · 237 阅读 · 0 评论 -
vue背景图片资源加载问题
主要问题: 通过img的src加载图片可以加载出来,但是通过css用图片做背景时发现加载不出来 问题代码: <template> <div id="app"> <!--无法加载--> <!--<div style="background:url('./assets/flower.jpg'); height:200px; ...原创 2018-05-07 18:31:38 · 9402 阅读 · 1 评论 -
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features
npm install 报错 npm WARN deprecated bfj-node4@5.3.1: Switch to the bfj package for fixes and new features! npm ERR! Unexpected end of JSON input while parsing near ‘…alse,“deprecated”:"Br’ npm ERR! A c...原创 2018-09-22 13:27:31 · 5413 阅读 · 0 评论