axios.defaults.baseURL = 'http://192.168.1.118:808';
axios.defaults.withCredentials = true;
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
http://www.ituring.com.cn/article/200275html
.withCredentials()方法能够激活发送原始cookie的能力,不过只有在Access-Control-Allow-Origin不是一个通配符(*),而且Access-Control-Allow-Credentials为’true’的状况下才行.
http://m.blog.csdn.net/article/details?id=51322637vue
npm addusernode
若是长时间不登陆,可能会过时,使用 npm login 进行登陆就能够 publish 了。ios
npm publishgit
若是使用淘宝的源(http://cnodejs.org/topic/4f9904f9407edba21468f31e),则不能使用 npm publish。 须要切回 npmjs 源: es6
npm config set registry http://registry.npmjs.org/github
1. 下载源码:https://github.com/ElemeFE/elementexpress
2. 参考说明:https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.zh-CN.mdnpm
3. fockelement-ui
4. git pull
5. commit & push
以 element-ui 为基础,提交源码以后,不能立刻就加入新功能。 把 element-ui 下载一份, 全局替换: element-ui => element-ui-yxh
1. npm install
2. 修改源码,修改版本号,递增
3. npm build dist
4. npm adduser
5. npm publish
http://www.uedsc.com/296729.html
vue2自带的拦截器,已被 axios 替代: https://github.com/mzabriskie/axios
try { Vue.http.interceptors.push(function (request, next) { // ... // 请求发送前的处理逻辑 // ... var getFullUrl = function (url) { if (url.slice(0, 2) == "//") return url; if (url[0] != "/") { url = "/" + url; } return "//172.30.8.132:808" + url; } // request.method = "JSONP"; request.url = getFullUrl(request.url); next(function (response) { if (response.status == 200) { if (response.body && response.body.msg) { this.$message.error(response.body.msg); return new Promise(function (resolve, reject) { reject(response); }); } } else if (response.status == 500) { this.$message.error(response.body); // throw new Error("Error"); return new Promise(function (resolve, reject) { reject(response); }); } return; }) }); } catch (e) { //console.info("Vue.http.interceptors:" + e.message); }
Object.assign(this.$data,this.$options.data());
html: <input ref="name" /> //js:像这样: this.info.name = "OK" this.$refs["name"].$propData["value"].express = "info.name";
var d = VueComponent;
d.$vnode.data.model.expression
https://www.zhihu.com/question/41127712/answer/252388995
devtool: '#eval-source-map'
http://blog.csdn.net/u014628388/article/details/76099812
npm 组件版本真是害人啊。
https://majing.io/posts/10000022041170
No parser and no file path given, couldn't infer a parser.
升级 vue-loader 到 14.2.3+
https://www.cnblogs.com/sophie_wang/p/7879918.html
安装: es6-symbol