鸿蒙圆形进度条显示异常问题
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user