临时style适配

This commit is contained in:
2025-12-12 16:35:02 +08:00
parent 30764cec57
commit fa1132ebe9

View File

@@ -1,5 +1,5 @@
<template> <template>
<view class="container" id="pixi-box" ref="pixiContainerRef"></view> <view class="container" id="pixi-box" ref="pixiContainerRef" :style="'transform:scale(' + scale + ')'"></view>
</template> </template>
<script setup> <script setup>
@@ -14,6 +14,8 @@ let app = null;
let tagsContainer = null; let tagsContainer = null;
let activeTagInstances = []; let activeTagInstances = [];
const scale = ref(0)
// 配置数据 // 配置数据
const mockTags = [ const mockTags = [
{ name: '医生', bgColor: 0x0069fe, fontColor: 0xffffff, size: 17, opacity: 1.0, angle: 0, radius: 0 }, { name: '医生', bgColor: 0x0069fe, fontColor: 0xffffff, size: 17, opacity: 1.0, angle: 0, radius: 0 },
@@ -151,7 +153,7 @@ const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
const initPixi = () => { const initPixi = () => {
const container = getContainerDOM(); const container = getContainerDOM();
if (!container) return; if (!container) return;
scale.value = Math.min(container.clientWidth / 300 , 1.5)
const width = container.clientWidth || 300; const width = container.clientWidth || 300;
const height = container.clientHeight || 300; const height = container.clientHeight || 300;