- 博客(23)
- 收藏
- 关注
原创 购物车vue
{id:4,name:‘牛肉粒’,price:28.88,num:1,img:‘images/4.jpg’},{id:2,name:‘干牛肉’,price:5.85,num:3,img:‘images/2.jpg’},{id:1,name:‘西瓜’,price:10.9,num:2,img:‘images/1.jpg’},{id:3,name:‘鸭’,price:4.23,num:1,img:‘images/3.jpg’},// 定义 保留 两位小数的过滤器。// 返回订单总数量和总价格。
2024-06-21 01:06:26 275 2
原创 小程序 swiper 图片高度问题
var swiperH = winWid * imgh / imgw + “px” //等比设置swiper的高度。//即 屏幕宽度 / swiper高度 = 图片宽度 / 图片高度 --> swiper高度 = 屏幕宽度 * 图片高度 / 图片宽度。//获取当前屏幕的宽度。swiperHeight: swiperH //设置swiper高度。
2023-12-07 03:56:19 143
原创 element input 用法
<el-input v-model="input" @blur="qq()" type="text" placeholder="222222" />import { defineComponent, ref } from “vue”;export default defineComponent({setup() {return {input: ref(“”),};},methods: {qq() {console.log(this.input);},},});..
2022-04-25 15:56:52 766
原创 element ui 轮播图获取本地图片展示
html<el-carousel indicator-position="outside"> <el-carousel-item v-for="item in carouseData" :key="item"> <img :src="item.url" alt="" /> </el-carousel-item></el-carousel>css.el-carousel__item {width: 100%;}.el
2022-04-19 17:27:45 563
原创 node git安装
##https://registry.npmmirror.com/binary.html?path=git-for-windows/v2.24.0-rc0.windows.1/
2022-04-18 10:59:51 390
原创 在VUE中路由遇到Error: Avoided redundant navigation to current location:
:报错显示是路由重复router.js添加const originalPush = VueRouter.prototype.pushVueRouter.prototype.push = function push(location) {return originalPush.call(this, location).catch(err => err)}const originalReplace = VueRouter.prototype.replace;VueRouter.protot
2020-11-05 21:02:05 138
原创 防止多次点击路由出错
在 router /index,js 添加const originalPush = VueRouter.prototype.pushVueRouter.prototype.push = function push(location) {return originalPush.call(this, location).catch(err => err)}
2020-10-28 23:23:48 161
原创 jQuery判断当前元素是第几个元素&获取第N个元素
<button class="qq">111</button><button class="qq">22</button><button class="qq">33</button><button class="qq">44</button>$(".qq").click(function() { console.log($(".qq").index(this))})
2020-10-22 10:58:20 307
原创 关于小程序引入外部字体方法
1下载要引入的字体文件转码打开 https://transfonter.org/ 下载完把css文件后缀改为wxss , 在小程序中直接引入这个文件,.information-pho {float: left;font-family: DIN Condensed;font-size: 40rpx;color: #000000;letter-spacing: 0;text-align: left;}字体已经可以使用...
2020-06-10 09:51:07 1555
原创 关于文字是否换行问题
1 换行word-wrap:break-word2不换行word-break:keep-all;white-space:nowrap;
2020-05-20 11:19:26 149
原创 关于flex 的处理汇总
display: box;display: -webkit-box;display: -moz-box;-webkit-box-align: center;/垂直排列方式/-webkit-box-pack: justify;/水平排列方式/-moz-box-pack: justify;-moz-box-align: center;/IE 10/display: -ms-flex...
2020-04-20 16:42:05 106
原创 关于元素上下左右居中的解决方法汇总
左右居中设置1-1.rule-title-boxg {##margin: 0 auto;}1-2 justify-content: center上下居中align-items: center; /定义body的元素垂直居中/vertical-align: middle;定位(终极决绝方法).cont {position: fixed;width: 80%;left...
2020-04-20 15:57:05 143
原创 关于 文字排列问题汇总
单行省略号white-space:nowrap;overflow: hidden;text-overflow: ellipsis;多行显示省略号overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;-webk...
2020-04-20 11:44:22 131
原创 关于 左边加一比本身不一样高度的线 css伪类
.login-lists1 li.get-code .code-btn:after {content: “”;position: absolute;top: 0.25rem;bottom: 0.25rem;left: 0;width: 1px;background-color: #0085d0;}
2020-04-20 11:38:59 102
原创 设置input 默认提示语样式的方法及兼容性处理css
input#phone1::-webkit-input-placeholder {color: #bfbfc2;font-size: 0.7rem;}input#phone1::-moz-placeholder {color: #bfbfc2;font-size: 0.7rem;}input#phone1:-ms-input-placeholder {color: #bfbfc2...
2020-04-20 11:23:41 1353
原创 关于 img点击 变大的 禁止
img {border: none;vertical-align: bottom;pointer-events: none;}css 中 增加 pointer-events: none;
2020-04-20 11:21:08 1457
原创 关于ios输入框无法输入的坑
input,textarea {-webkit-user-select: auto;background-color: transparent;border: none;outline: none;}添加 -webkit-user-select: auto;
2020-04-20 11:18:15 600
原创 css渐变的坑
background: -webkit-linear-gradient(left, #00c7a6, #5fe5c4);background: -o-linear-gradient(to right, #00c7a6, #5fe5c4);background: -moz-linear-gradient(to right, #00c7a6, #5fe5c4);background: linea...
2020-04-20 11:12:54 108
原创 关于css之渐变汇总
普通渐变 background: -webkit-linear-gradient(red, blue); /* Safari 5.1 - 6.0 */ background: -o-linear-gradient(red, blue); /* Opera 11.1 - 12.0 */ background: -moz-linear-gradient(red, blue); /*...
2019-09-25 17:37:47 84
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人