上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: WXML: <view class="header"> <input class="input" placeholder-class="uni-input-placeholder" placeholder="请输入搜索内容" v-model.trim="qString" @confirm="hand 阅读全文
posted @ 2021-03-02 17:40 搬砖的苦行僧 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 要修改此标题: uni.setNavigationBarTitle({ title: '添加桌号'}) 阅读全文
posted @ 2021-03-02 17:20 搬砖的苦行僧 阅读(1463) 评论(0) 推荐(0) 编辑
摘要: 1. 在地址列表页面 // 卸载页面时onUnLoad () { // isClick 一种是点击的当前这一条,另一种是直接返回页面的 // 所以在卸载的时候需要判断是点击的还是直接返回页面的 let { id, isClick } = this.data if (!isClick) { let p 阅读全文
posted @ 2021-03-02 17:15 搬砖的苦行僧 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 实现上图所示的轮播图的效果html: <div class="swiper-scale-wrap"> <van-swipe class="swiper-block" :loop="true" :width="160" @change="onChange"> <van-swipe-item class 阅读全文
posted @ 2021-02-26 17:49 搬砖的苦行僧 阅读(950) 评论(0) 推荐(0) 编辑
摘要: 因为因为网络原因导致的node-modules的部分文件缺失,在npm install 时报错如下: 但此时有node-modules,启动项目会报:Error: Cannot find module 'node-sass'解决方法如下: 1. npm install -g cnpm --regis 阅读全文
posted @ 2021-02-25 17:49 搬砖的苦行僧 阅读(5987) 评论(0) 推荐(0) 编辑
摘要: WXML:<view class="form-item left-class" @click="hanleOpenWeek"> <view class="label">周时间</view> <view class="mid-block">{{ info.weekTime | filterWeekTi 阅读全文
posted @ 2021-02-19 16:00 搬砖的苦行僧 阅读(981) 评论(0) 推荐(0) 编辑
摘要: const list = [{type: "string", value: "字符串一"}, {type: "string", value: "字符串二"}, {type: "string", value: "字符串三"}]const newList = []list.forEach(arg => 阅读全文
posted @ 2021-02-19 15:32 搬砖的苦行僧 阅读(1956) 评论(0) 推荐(0) 编辑
摘要: const obj = { number: 100 }const { number } = obj//使用别名const { number: otherNumber } = objconsole.log(otherNumber) // 100 阅读全文
posted @ 2021-02-19 15:17 搬砖的苦行僧 阅读(3545) 评论(0) 推荐(0) 编辑
摘要: 一、数组合并去重 例:let arr1 = [1, 2,3, 4, 5, 7] let arr2 = [1, 3, 5, 7,8, 10] let arr = arr1.concat(arr2) -> 合并数组 let newArr = [...new Set(arr)] 或者:let newArr 阅读全文
posted @ 2021-02-07 11:48 搬砖的苦行僧 阅读(795) 评论(0) 推荐(0) 编辑
摘要: 一、数字转字符串 1. toString()方法 例: let arr = [1, 2, 3] let str = arr.toString() console.log(str) // 1, 2, 3 2. join()方法 -> 可以指定分隔符(如果省略参数,则默认为逗号) 例: let arr 阅读全文
posted @ 2021-02-07 11:21 搬砖的苦行僧 阅读(664) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页