![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小程序
别凶小晗.
这个作者很懒,什么都没留下…
展开
-
input整数,小数限制
<input type="digit" placeholder="请输入分享赚¥:" bindinput="onShare" model:value="{{amount}}" />onShare(e) { let result = e.detail.value; if (result.endsWith('.') && !isNaN(result)) { return } let reg = /^(([1-9][0-9]*\.[0-9原创 2021-12-27 19:07:41 · 149 阅读 · 0 评论 -
Stpes设置样式
根据自己UI设计稿,搞了一下午的Stpes,改哪些样式class需要拿哪个,这是根据UI设计稿扣出来的几个改动样式的地方改动地方:字体大小、字体颜色、字体间距、内边距、圆角先看一下UI设计稿再来看一下我的布局我这人有强迫症,必须要跟UI搞设计的一样,所以我就花费了很长时间把这个布局好好设计了一下,最后一张图,是效果再来看看我的样式设计CSS:wxml:<!-- 物流进度条 --> <view class="steps-box"> <van-steps原创 2021-08-02 16:38:10 · 531 阅读 · 0 评论 -
js时间戳转换格式
1、返回的毫秒数// 将时间戳转换成日期//timeStamp 时间戳function add0(m) { return m < 10 ? '0' + m : m;},function formatDate(timeStamp) { let _this = this; let time = new Date(timeStamp), // y = time.getFullYear(), m = time.getMonth() + 1,原创 2021-07-29 18:05:34 · 542 阅读 · 0 评论 -
JS小程序时间戳转日期
在小程序根目录新建一个文件夹util,然后在其中建一个util.js文件,接着写一个js_date_time方法,记得要导出!!!//时间戳转换成日期时间function js_date_time(unixtime) { var dateTime = new Date(parseInt(unixtime) * 1000) var year = dateTime.getFullYear(); var month = dateTime.getMonth() + 1; var day = .原创 2021-03-03 16:42:38 · 336 阅读 · 1 评论