- 博客(15)
- 收藏
- 关注
原创 element ui 级联选择器Cascader 实现一级菜单多选二级菜单单选
【代码】element ui 级联选择器Cascader 实现一级菜单多选二级菜单单选。
2025-04-21 10:16:20
56
原创 vant实现上拉加载更多
<!-- tab栏切换区域 --> <div class="tabs-box"> <div class="tabs"> <div class="tabsItem" :class="[currentIndex == index?'active':'']" v-for="(item,index) in tabsArr" :key=".
2021-10-09 10:44:17
1333
原创 JavaScript之如何让数字千位分割
<script > var num = "1231231231231.666666 "; console.log(parseFloat(num).toLocaleString());</script>
2021-08-31 10:07:27
113
原创 如何使用Visibility属性控制元素的显示和隐藏
<input type="button" value="隐藏文本" onclick="document.getElementById('p1').style.visibility='hidden'" /><input type="button" value="显示文本" onclick="document.getElementById('p1').style.visibility='visible'" />
2021-08-19 11:41:46
970
转载 原生JS--js数组遍历方法
2.foreach循环遍历数组中的每一项,没有返回值,即使有return,也不会返回任何值,对原数组没有影响,不支持IE//1 没有返回值arr.forEach((item,index,array)=>{ //执行代码})//参数:item数组中的当前索引的值, index当前项的索引, array原始数组;//数组中有几项,那么传递进去的匿名回调函数就需要执行几次3.map循环 映射数组有返回值,可以return出来map的回调函数中支持return返回值;re
2021-08-03 11:46:54
327
翻译 vue中路由跳转的几种方式以及传递的参数
vue路由跳转的四中方式1. router-link2. this.$router.push() (函数里面调用)3. this.$router.replace() (用法同push)4. this.$router.go(n)一、不带参1 router-link<router-link :to="{name:'login'}"> <router-link :to="{path:'/login'}"> //这里根据页面的name...
2021-07-27 13:52:03
1166
原创 原生微信小程序分包
小程序分包大小有以下限制:1.整个小程序所有分包大小不超过 8M2.单个分包/主包大小不能超过 2M在小程序启动的时候,默认会下载主包并启动主包内页面,如果用户需要打开分包内某个页面,客户端会把对应分包下载下来,下载完成后再进行展示。对小程序进行分包,可以优化小程序首次启动的下载时间{ "pages": [ "pages/index/index", "pages/classification/classification", "pages/shopp
2021-07-19 09:29:02
443
原创 微信小程序里面如何让video标签点击图片之后再播放
<view> <view class="play-box" > <image class="play-img" src='默认显示的图片' mode="scaleToFill"> </image> <image bindtap='videoPlay' class="play-btn" src='播放按钮的图片' mode="scaleToFill"> </image> </view> <view.
2021-07-14 09:43:20
1041
原创 微信小程序怎么在onshow里面拿到上个页面传递下来的参数
如果在onLoad里面取出上个页面传递的参数很简单 直接在options里面拿就可以了 onLoad: function (options) { console.log(options); },如果在onshow里面可以通过页面栈去拿 onshow(options){// 1 获取当前的小程序的页面栈-数组 长度最大是10页面 let pages = getCurrentPages(); // 2 数组中 索引最大的页面就是当前页面 ..
2021-07-11 18:25:31
2200
原创 uniapp中关于scroll-view标签设置scrollTop=0无效的解决办法
html部分<scroll-view :scroll-top="scrollTop" scroll-y="true" @scroll="scroll" ">data中的定义 data() { return { scrollTop: 0, old: { //之前的滚动条距离顶部的距离 scrollTop: 0 } } },
2021-07-09 16:34:50
892
原创 css 的样式穿透问题
外层容器 /deep/ 组件 { }外层容器 ::v-deep 组件 { }/deep/ 是深度选择器(样式穿透),都能实现对组件内部的样式修改/deep/ .subscribe--live-player-hasSubscribe ,.subscribe--live-player-subscribe__btn{ background-color: red !important; } .live_prompt1{ width: 94%; } /deep/ .su..
2021-07-08 18:47:44
294
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人