
vue.js
螺纹钢铁侠
这个作者很懒,什么都没留下…
展开
-
vue v-for 遍历对象时,不能响应对象的直接变动
<section class="todoList" v-for="item in groupObj" :key="index"></section>如果groupObj 是一个对象,而且是需要变动的对象groupObj['a']=12312313视图不会发生变动...原创 2019-10-19 15:25:07 · 891 阅读 · 0 评论 -
vue Cannot find module 'net'
浏览器报错Uncaught Error: Cannot find module 'net' at webpackEmptyContext (eval at ./node_modules/defaultable sync recursive (app.js:3718), <anonymous>:2:10) at Object.workaround_require (d...原创 2019-10-14 23:57:31 · 5290 阅读 · 7 评论 -
vue.js鼠标滑动事件
//template<div id="canvas" v-on:mousemove="mousemove"></div>//script methods: { mousemove: function (event) { this.x = event.offsetX this....原创 2019-09-19 21:11:32 · 4684 阅读 · 0 评论 -
vue router 路由匹配正确,但是不渲染组件
const router = new VueRouter({ mode: 'history', routers: [ { path: '/', component: FantasyLine, }, { path: '/chinaworld', ...原创 2019-09-20 15:41:33 · 1320 阅读 · 1 评论 -
vue failed to load resource err_connection_refused
路径写错了相对路径的地址不是相对.vue文件的地址,而是相对index.html文件的地址assets资源文件夹应该放在index.html同级目录下然后写../assets/XXX.jpg...原创 2019-09-22 14:12:07 · 1122 阅读 · 0 评论 -
vue django Access-Control-Allow-Origin 跨域问题
跨域问题说白了,就是一个主机向另一个主机请求数据时,另一个主机的防火墙机制,人家让不让你请求的问题除非你在别人的请帖名单上否则就算是自家人,也不让进门比如http://localhost:8080/ 向http://localhost:8081请求数据,不在请帖名单上照样不让进解决:给要返回是response加上Access-Control-Allow-Origin的字...原创 2019-09-25 22:07:44 · 747 阅读 · 0 评论 -
vue项目部署到Nginx,非index页面刷新,404
vue项目编译以后,只有一个index.html的入口文件,其他地址都是靠router导航过去的,比如www/XXXX.com/对应index.html文件,如果进入其它页面,比如www/XXXX.com/13,则需要router导航渲染一个新页面,那么问题来了,如果直接刷新www/XXXX.com/13,Nginx服务器会在location里面匹配这个页面,匹配不到返回404...原创 2019-09-26 23:02:45 · 6596 阅读 · 0 评论