摘要: 一、路由守卫:https://blog.csdn.net/qq_26769677/article/details/101003337 全局前置守卫(beforeEnter)/路由独享(beforeEnter)/组件内的守卫(beforeRouteEnter、beforeRouteUpdate、bef 阅读全文
posted @ 2020-07-11 11:51 Yo! 阅读(887) 评论(0) 推荐(0) 编辑
摘要: 保存选择tab不刷新原数据,通过大的数组包住[{data:[],page:0},{data,page},{data,page}],page判断是否重置数据 html <div id="app"> <nav class="nav-block"> <div @click="showMe(1)">tab1 阅读全文
posted @ 2020-07-09 16:39 Yo! 阅读(205) 评论(0) 推荐(0) 编辑
摘要: vuex 状态管理器,或者是一个curd管理数据变化的js仓库。 main.js store.js state 方法 参考 main.js 一般在根目录main.js全局引入用prototype vue.prototype.$store = store (import store from './s 阅读全文
posted @ 2020-06-30 09:10 Yo! 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 零、 select x from y where z x输出条件: \(\color{#f00}{avg()}\) | \(\color{#f00}{min()}\) | \(\color{#f00}{max()}\) | \(\color{#f00}{sum()}\) | \(\color{#f0 阅读全文
posted @ 2020-06-24 15:57 Yo! 阅读(219) 评论(0) 推荐(0) 编辑
摘要: ts文档 ts 1.声明(声明标识 + 变量名 + ':' + 声明类型 = 值) var a:number = 56; // 数字类型(C => int a = 5;) enum REN{nan='男人',nv='女人',cen='中性人'} // 枚举类型 2.类型 undefined numb 阅读全文
posted @ 2020-06-23 14:35 Yo! 阅读(285) 评论(0) 推荐(0) 编辑
摘要: colorUI 1、icon cuIcon-locationfill 2、字体 xs sm df lg xl xxl 26 30 80 20 24 28 32 36 44 text-left 颜色 text-center text-bold text-price text-cut text-颜色名 阅读全文
posted @ 2020-06-22 10:16 Yo! 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 客户端 1、初始化(App.vue的onLoaunch初始化) onLaunch() { // 云端初始化 wx.cloud.init() if (!wx.cloud) { console.error('请使用 2.2.3 或以上的基础库以使用云能力') } else { wx.cloud.init 阅读全文
posted @ 2020-06-17 14:14 Yo! 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 视图层: wx小程序转uniapp :style="`{transform: translate(${topMove}px,0)}`" //小程序不支持这个写法 :style="{transform: `translate(${topMove}px,0)`} // 兼容 属性绑定: attr="{{ 阅读全文
posted @ 2020-05-21 17:58 Yo! 阅读(855) 评论(0) 推荐(0) 编辑
摘要: for...in index for...of item forEach index,item,all filter index,item,all return 新数组,原数组不变(1层的情况) map index,item,all some index,item,all every index,i 阅读全文
posted @ 2020-04-16 10:06 Yo! 阅读(272) 评论(0) 推荐(0) 编辑
摘要: let k = true; k && fn() if(k) { fn() } 1、柯里化:https://www.jianshu.com/p/2975c25e4d71 2.1、防抖 <script> function debounce(fn,delay){ let timer = null // 借 阅读全文
posted @ 2020-04-16 10:02 Yo! 阅读(161) 评论(0) 推荐(0) 编辑