新版式

This commit is contained in:
duanliang
2025-11-24 23:17:46 +08:00
parent 9d78158b77
commit 5c17235581
55 changed files with 973 additions and 731 deletions

View File

@@ -1,8 +1,8 @@
/* Echarts图表尺寸自适应 */
export const fitChartSize = (size, width = 3822) => {
export const fitChartSize = (size, width = 3840) => {
let clientWidth =
window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
if (!clientWidth) return size
let scale = clientWidth / width
return Number((size * scale).toFixed(3))
return Number((size * scale).toFixed(3))*1.4
}

View File

@@ -1,16 +1,16 @@
//默认设计稿的宽度
const designWidth = 3822
const designWidth = 3840
//默认设计稿的高度
const designHeight = 1080
const designHeight = 2160
let styleUtil = {
// px转vw
px2vw: function (_px) {
return ((_px * 100.0) / designWidth).toFixed(3) + 'vw'
return ((_px * 100.0*4) / designWidth).toFixed(3) + 'vw'
},
// px转vh
px2vh: function (_px) {
return ((_px * 100.0) / designHeight).toFixed(3) + 'vh'
return ((_px * 100.0*4) / designHeight).toFixed(3) + 'vh'
}
}