![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Date
T-腾腾
这个作者很懒,什么都没留下…
展开
-
Uniapp中引入Ucharts统计表的使用
效果:实现步骤:1.在插件市场下载插件,使用hbuilderx导入即可。https://ext.dcloud.net.cn/plugin?id=2712.新建vue文件,无需引入。源码:<template> <view class="box"> <view class="title"> 饼图 </view> <view clas...原创 2022-04-22 23:07:10 · 1296 阅读 · 2 评论 -
Uniapp中根据生日计算年龄
getage() { var birthdays = new Date(this.birthday.replace(/-/g, "/")); var d = new Date(); var age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() =...原创 2022-04-22 22:56:30 · 396 阅读 · 0 评论 -
Vue中导入DayJs(时间戳转时间格式)
1.Npm安装Dayjsnpm install dayjs --save2.Dayjs写入到Vue原型中import dayjs from 'dayjs';Vue.prototype.$dayjs = dayjs;3.在页面中调用$dayjs,进行时间戳格式化(this.$dayjs()中不传入时间戳就是获取当前时间,format()中可以按照自己需求去传入时间格式)let time = Date.now();console.log(this.$dayjs(time).form原创 2022-03-09 11:44:36 · 5340 阅读 · 0 评论 -
Js计算账号创建天数
1.首先在methods写入一个计算天数的方法SkyNumber(time){ let now = Date.parse(new Date(time)) / 1000; let limit = Date.parse(new Date()) / 1000 - now; let createTime = Math.floor(limit / 86400) + 1; return createTime;}2.在行内调用SkyNumber方法,把账号创建时间的天数传进方法中...原创 2022-02-14 11:18:23 · 321 阅读 · 0 评论