data: () => ({ msg: "Welcome to Your Vue.js App", week: [] }), created() { let data = []; for (let i = 6; i >= 0; i--) { data.push(this.getWeek(-i)); } this.week = data; console.log(this.week); }, methods: { getWeek(day) { var today = new Date(); var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day; today.setTime(targetday_milliseconds); var tYear = today.getFullYear(); var tMonth = today.getMonth(); var tDate = today.getDate(); tMonth = this.doHandleMonth(tMonth + 1); tDate = this.doHandleMonth(tDate); return tYear + "-" + tMonth + "-" + tDate; }, doHandleMonth(month) { var m = month; if (month.toString().length == 1) { m = "0" + month; } return m; } }
Motion for Vue:一个轻量级且功能强大的Vue3动画库
el-table利用:row-style="rowClass"设置指定行变色
一款免费开源效果酷炫的 Vue / React 大屏数据展示组件库——DataV
上面是“vuejs获取一周的时间(就是前七天)”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_102.html
workflows工作流
3D圆形玉雕图案comfyui工作流
一幅以霓虹灯照亮的城市天际线和未来主义画
1个很漂亮的单身小女孩ComfyUI工作流
泰坦尼克号桌面壁纸上ComfyUI工作流
在地铁站里一个迷茫的非主流姑娘
金色玫瑰花comfyui工作流
一个超凡脱俗的女明星的特写镜头ComfyUI工作流
一只外星甲壳虫子ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!