上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 63 下一页
摘要: 解决: const originalPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch( 阅读全文
posted @ 2020-04-23 16:55 吴小明- 阅读(869) 评论(0) 推荐(0) 编辑
摘要: var arr = [ {name:'zopp',age:0}, {name:'gpp',age:18}, {name:'yjj',age:8} ]; function compare(property){ return function(a,b){ var value1 = a[property] 阅读全文
posted @ 2020-04-20 13:58 吴小明- 阅读(1083) 评论(0) 推荐(0) 编辑
摘要: let arr=[1,2,3,4]; let arr1=[1,2,3,4,5,6,7,8,"a"]; function array_diff(a, b) { for(let i=0;i<b.length;i++){ for(let j=0;j<a.length;j++){ if(a[j] b[i]) 阅读全文
posted @ 2020-04-20 11:18 吴小明- 阅读(1096) 评论(0) 推荐(0) 编辑
摘要: ### 项目搭建 vue create my_cms Babel Router Vuex CSS Use history mode for router? n Sass/SCSS (with dart-sass) In package.json Save this as a preset for f 阅读全文
posted @ 2020-03-22 10:40 吴小明- 阅读(357) 评论(0) 推荐(0) 编辑
摘要: ### 拿到登录的token ①api/index.js中添加user接口: user: { login: "/v3/login" }, ②api/request.js中导出 userLoginApi 接口(注意是post方法): export const userLoginApi=(data)=> 阅读全文
posted @ 2020-03-19 00:18 吴小明- 阅读(615) 评论(0) 推荐(0) 编辑
摘要: ### ts配置路由 ①安装:npm i vue-router -S ②src下新建pages/Home.vue(还有Goods.vue、Detail.vue等页面): <template> <div class="home"> <h2>首页</h2> </div> </template> <scr 阅读全文
posted @ 2020-03-17 02:31 吴小明- 阅读(6000) 评论(0) 推荐(0) 编辑
摘要: 在函数体内操作某个变量时,如何明确这个变量操作的是全局变量还是局部变量? 向上查找,如果在函数体内找到了与该变量相同的变量名,并且这个变量时局部变量,说明该行操作的变量也是局部变量。 向上查找时,如果在函数体内没有找到和该变量相同名称的变量,继续向函数体外查找,如果找到说明该行操作的变量是全局变量。 阅读全文
posted @ 2020-03-14 00:14 吴小明- 阅读(139) 评论(0) 推荐(0) 编辑
摘要: vue响应式数据的原理-vue最大的特点就是数据驱动视图,vue的数据改变,页面一定发生改变吗?这也不一定。当操作引用类型的数据,动态添加属性时,页面不会发生改变。vue响应式的原理:底层是Object.defineProperty(),目前vue2.6和将来的vue3.0都是通过给data中的数据 阅读全文
posted @ 2020-03-11 16:56 吴小明- 阅读(195) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 63 下一页