![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
嘻嘻嘻嘻嘻喜喜
做一个有趣且令人欢喜的程序员儿!
展开
-
uniapp 封装导航栏
老有人私信问我,顶部导航栏怎么弄。哎~ 只能发一个代码出来。我自己瞎封装的。不见得很好。凑合看吧 <template> <!-- <view class="title-padding"> --> <view class="top_bar"> <view class="l_bar"> <slot name="left"> <span class="iconfont iconback" @tap="goB原创 2020-08-07 09:46:43 · 680 阅读 · 0 评论 -
uniapp 带商店的购物车操作代码,真实项目。参考可直接复制。自己删减多余的代码。
页面效果 功能相识的直接复制粘贴下面的代码 <template> <view> <topTabBar class="topbar"> <view slot="left"> </view> <view slot="center" class="top_bar"> <text>购物车</text> </view&g原创 2020-06-19 21:28:13 · 2235 阅读 · 7 评论 -
uniapp封装请求挂载调用
封装require.js const commonUrl = "https://192.168.1.103:8080/pig/"; //公共路径 const commonImgUrl = 'https://192.168.1.103:8080/FileUpload/' // post请求封装 function postRequest(url, data) { var promise = new Promise((resolve, reject) => { var th原创 2020-06-17 16:49:58 · 3157 阅读 · 5 评论 -
uni-app封装请求及如何使用
const commonUrl = "https://www.xxxxxx/upload/"; //公共路径 // post请求封装 function postRequest(url, data) { var promise = new Promise((resolve, reject) => { var that = this; var post...原创 2020-02-24 16:22:26 · 6354 阅读 · 0 评论 -
vue使用防抖函数
methods:{ debouce(func,delay){ let timer = null; return function(...args){ if(timer) clearTimeout(timer) timer = setTimeout(() =>{ func.apply.(this,args) },delay) } } }原创 2020-02-07 14:56:28 · 394 阅读 · 1 评论 -
vue移动端使用rem适配手机
比较懒,不喜欢引入,所以直接在main.js里加一些代码 定义方法 function setRem() { var whdef = 100 / 750; // 表示750的设计图,使用100PX的默认值 var bodyWidth = document.body.clientWidth; // 当前窗口的宽度 var rem = bodyWidth * whdef; // ...原创 2019-12-10 11:12:31 · 383 阅读 · 0 评论