鸿蒙圆形进度条显示异常问题

This commit is contained in:
icssoa
2025-09-10 18:52:37 +08:00
parent 21dd6a5eed
commit 3aa7e3360b

View File

@@ -22,7 +22,15 @@
</template>
<script lang="ts" setup>
import { getColor, getDevicePixelRatio, isDark, parseClass, parsePt, uuid } from "@/cool";
import {
getColor,
getDevicePixelRatio,
isDark,
isHarmony,
parseClass,
parsePt,
uuid
} from "@/cool";
import { computed, getCurrentInstance, onMounted, ref, watch, type PropType } from "vue";
import type { PassThroughProps } from "../../types";
@@ -203,6 +211,8 @@ function animate(targetValue: number) {
// 初始化画布
function initCanvas() {
setTimeout(
() => {
uni.createCanvasContextAsync({
id: canvasId,
component: proxy,
@@ -221,6 +231,9 @@ function initCanvas() {
animate(props.value);
}
});
},
isHarmony() ? 100 : 0
);
}
onMounted(() => {