- 博客(4)
- 收藏
- 关注
原创 input框输入限制
input框只能输入两位小数event.target.value = event.target.value.replace(/[^\d.]/g, ''); // 清除“数字”和“.”以外的字符event.target.value = event.target.value.replace(/\.{2,}/g, '.'); // 只保留第一个. 清除多余的event.target.value ...
2020-03-26 17:08:18
374
原创 保留指定位数的小数不足补0(不四舍五入)
@TOC保留指定位数的小数不足补0(不四舍五入)方法一string = String(string).indexOf('.') > -1 ? string + '00000000' : string + '.000000000';string = String(string).replace(/^(.*\..{1}).*$/,'$1')方法二function filterPoi...
2020-03-26 17:03:18
2415
原创 vue-awesome-swiper 特殊样式
关于vue-awesome-swiper 特殊轮播图样式整理,下图为效果图<template> <div class="my-swiper"> <swiper :options="swiperOption" class="swiper-container"> <swiper-slide class="swiper-item" v...
2020-02-11 22:46:51
759
转载 关于ios端微信input框键盘收起留白
关于ios端微信input框键盘收起留白问题关于ios端微信input框键盘收起留白问题document.body.addEventListener("focusout", () => { //软键盘收起的事件处理 setTimeout(() => { const scrollHeight = document.documentElement.scrollT...
2019-04-25 20:05:13
640
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人