无人机管理后台前端(已迁走)
罗广辉
2025-06-26 51ba2672d153c172b6bc4d62f3df0edc8f621870
feat: 样式自适应
2 files modified
7 ■■■■■ changed files
src/main.js 3 ●●●●● patch | view | raw | blame | history
src/styles/variables.scss 4 ●●●● patch | view | raw | blame | history
src/main.js
@@ -95,6 +95,9 @@
app.config.globalProperties.$dayjs = dayjs
app.config.globalProperties.website = website
app.config.globalProperties.getScreen = getScreen
app.config.globalProperties.pxToVh = height => height / 10.8 + 'vh'
app.config.globalProperties.pxToRem = width => width * 0.1 + 'rem'
app.use(error)
app.use(i18n)
app.use(store)
src/styles/variables.scss
@@ -1,3 +1,7 @@
$sidebar_width: 230px;
$sidebar_collapse: 60px;
$top_height: 50px;
@function pxToVh($px) {
  @return calc($px / 1080) * 100vh;
}