临时style适配
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="container" id="pixi-box" ref="pixiContainerRef"></view>
|
||||
<view class="container" id="pixi-box" ref="pixiContainerRef" :style="'transform:scale(' + scale + ')'"></view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -14,6 +14,8 @@ let app = null;
|
||||
let tagsContainer = null;
|
||||
let activeTagInstances = [];
|
||||
|
||||
const scale = ref(0)
|
||||
|
||||
// 配置数据
|
||||
const mockTags = [
|
||||
{ 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 container = getContainerDOM();
|
||||
if (!container) return;
|
||||
|
||||
scale.value = Math.min(container.clientWidth / 300 , 1.5)
|
||||
const width = container.clientWidth || 300;
|
||||
const height = container.clientHeight || 300;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user