From a7e6761ba0cfccdf33ed552eb2d3b783c8e4ab4a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 16 Apr 2025 20:49:12 +0800
Subject: [PATCH] feat:事件弹窗显示调整

---
 vite.config.mjs |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/vite.config.mjs b/vite.config.mjs
index f5f278b..e28915a 100644
--- a/vite.config.mjs
+++ b/vite.config.mjs
@@ -4,6 +4,8 @@
 } from 'vite';
 import { resolve } from 'path'
 import createVitePlugins from './vite/plugins';
+import postCssPxToRem from 'postcss-pxtorem'
+
 // https://vitejs.dev/config/
 export default ({
   mode,
@@ -77,6 +79,19 @@
           additionalData: `@use "@/styles/variables.scss" as *;`,
         },
       },
+      postcss: {
+        plugins: [
+          postCssPxToRem({
+            rootValue: 10, // 指定转换基准值,通常是设计稿宽度的1/10
+            propList: ['*'], // 可以从px转换为rem的属性,这里是所有属性
+            unitPrecision: 5, // 允许REM单位增长到的十进制数
+            selectorBlackList: [], // 选择器黑名单,忽略转换的选择器
+            replace: true, // 替换包含rem的规则,而不是添加回退
+            mediaQuery: false, // 允许在媒体查询中转换px
+            minPixelValue: 0 // 设置要替换的最小像素值
+          }),
+        ]
+      }
     },
     plugins: createVitePlugins(env, command === 'build'),
     build: buildConfig,

--
Gitblit v1.9.3