|
@@ -23,10 +23,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
import { ref, computed, watch } from "vue"
|
|
|
+import { useWindowSize } from "@vueuse/core"
|
|
|
|
|
|
-const { windowSizeInCssForRef, windowSizeWhenDesignForRef } = useSizeAdapt()
|
|
|
+const windowHeightDesign = 1080 - 71 - 37 // 设计稿里视口高度。注意要减去上下边栏
|
|
|
+const { width: windowWidth, height: windowHeight } = useWindowSize()
|
|
|
|
|
|
const props = defineProps({
|
|
|
type: {
|
|
@@ -83,12 +84,12 @@ watch(propIsShow, (v) => {
|
|
|
margin-right: 5px;
|
|
|
font-family: KaiTi;
|
|
|
font-weight: 400;
|
|
|
- font-size: 20px;
|
|
|
+ font-size: calc(20px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
white-space: pre;
|
|
|
}
|
|
|
> img {
|
|
|
- width: 40px;
|
|
|
- height: 41px;
|
|
|
+ width: calc(40px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
+ height: calc(41px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
}
|
|
|
}
|
|
|
</style>
|