🎨 组件优化

This commit is contained in:
不做码农
2023-05-31 18:19:38 +08:00
parent 94c3d5d714
commit 507435014b
8 changed files with 124 additions and 85 deletions
+11
View File
@@ -282,3 +282,14 @@ export function color16() {
const color = `#${r.toString(16)}${g.toString(16)}${b.toString(16)}`
return color
}
/**
* 返回星期几
* @param {*} num
* @returns
*/
export function getWeek(num = 0) {
var datas = dayjs().add(num, 'day').day()
var week = ['日', '一', '二', '三', '四', '五', '六']
return '星期' + week[datas]
}