摘要: 在uniapp中,给当前页面添加满屏背景颜色,需要给当前组件的根元素添加绝对定位,宽高百分百,然后设置背景颜色 <template> <view class="loginContent"> <view class="logo"> <image src="../../static/QTDD.jpg"> 阅读全文
posted @ 2022-04-16 22:50 QTDD 阅读(3732) 评论(0) 推荐(0)
摘要: 问题所在:父元素使用了touchstart,touchmove,touchend三个事件,导致作为子元素的scroll-view组件无法滑动 解决办法:父元素绑定touchstart事件时不要使用catch绑定,使用capture-bind:touchstart="fn"绑定,也就是捕获模式,tou 阅读全文
posted @ 2022-03-23 21:23 QTDD 阅读(1749) 评论(1) 推荐(0)
摘要: <script> //个人感觉是两边都调用了Number console.log(true == 1); // 1==1 true console.log(true == '1'); // 1==1 true console.log(1 == '2'); // 1==2 false console. 阅读全文
posted @ 2022-03-22 18:58 QTDD 阅读(57) 评论(0) 推荐(0)
摘要: ###js中startWith()方法用于检测字符串是否以指定的字符串开头 'hello world'.startsWith('hello') ####在vue中可以使用此方法检查路由地址 import {useRoute} from 'vue-router'; const route = useR 阅读全文
posted @ 2022-02-27 13:41 QTDD 阅读(950) 评论(0) 推荐(0)
摘要: 第一种方法:使用join方法加split方法 //第一种方法:使用join方法将数组降维成一维字符串,然后使用split方法转为数组 let arr = [1, [2, 3, [7, 8, 9]], [4, 5, [10, 11, 12, [13, 14, 15]], 6] ]; let arrjo 阅读全文
posted @ 2021-11-30 20:18 QTDD 阅读(432) 评论(0) 推荐(0)
摘要: Math对象属性 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" co 阅读全文
posted @ 2021-11-16 11:49 QTDD 阅读(43) 评论(0) 推荐(0)
摘要: ###首先准备一个存放许多经常用到的less变量文件 variables.less //公共变量 // 主题 @xtxColor:#27BA9B; // 辅助 @helpColor:#E26237; // 成功 @sucColor:#1DC779; // 警告 @warnColor:#FFB302; 阅读全文
posted @ 2021-11-06 22:29 QTDD 阅读(544) 评论(0) 推荐(0)
摘要: import {useRoute} from 'vue-router'; const route = useRoute(); console.log(route.fullPath); 阅读全文
posted @ 2021-11-06 22:15 QTDD 阅读(1458) 评论(0) 推荐(0)
摘要: #encodeURIComponent(编码) let encodeBase = encodeURIComponent(); #decodeURIComponent(解码) let decodeBase = decodeURIComponent(); 阅读全文
posted @ 2021-11-06 11:52 QTDD 阅读(95) 评论(0) 推荐(0)
摘要: String <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" cont 阅读全文
posted @ 2021-10-09 06:26 QTDD 阅读(46) 评论(0) 推荐(0)