新增注册码、草稿箱、权限拦截邮件、发件菜单隐藏
This commit is contained in:
@@ -40,4 +40,8 @@ export function formatDetailDate(time) {
|
||||
|
||||
export function tzDayjs(time) {
|
||||
return dayjs.utc(time).tz('Asia/Shanghai')
|
||||
}
|
||||
|
||||
export function toUtc() {
|
||||
return dayjs().utc()
|
||||
}
|
||||
@@ -47,6 +47,16 @@ const routers = {
|
||||
menu: true
|
||||
}
|
||||
},
|
||||
'reg-key:query': {
|
||||
path: '/sys/reg-key',
|
||||
name: 'reg-key',
|
||||
component: () => import('@/views/reg-key/index.vue'),
|
||||
meta: {
|
||||
title: '注册密钥',
|
||||
name: 'reg-key',
|
||||
menu: true
|
||||
}
|
||||
},
|
||||
'sys-email:query': {
|
||||
path: '/sys/email',
|
||||
name: 'sys-email',
|
||||
|
||||
9
mail-vue/src/utils/text.js
Normal file
9
mail-vue/src/utils/text.js
Normal file
@@ -0,0 +1,9 @@
|
||||
export function getTextWidth(text, font = '14px sans-serif') {
|
||||
// 强制设置 Canvas 分辨率
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = 2000; // 足够大的画布
|
||||
canvas.style.width = '1000px'; // 避免 CSS 缩放影响
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.font = font;
|
||||
return ctx.measureText(text).width;
|
||||
}
|
||||
Reference in New Issue
Block a user