Skip to content

Commit

Permalink
fix: ios真机中,只要radius设置的不是默认值,更新则会闪烁问题(jdf2e#2481
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-boide committed Oct 26, 2023
1 parent 0cfaa8f commit 2ab5967
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/packages/__VUE/circleprogress/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</template>

<script lang="ts">
import Taro from '@tarojs/taro';
import { computed, ref, watch, PropType } from 'vue';
import { createComponent } from '@/packages/utils/create';
import { CircleProgressStrokeLinecap } from './types';
Expand Down Expand Up @@ -50,6 +51,7 @@ export default create({
}
},
setup(props) {
const isIos = Taro.getSystemInfoSync().platform === 'ios';
const currentRate = ref(props.progress);
const refRandomId = Math.random().toString(36).slice(-8);
const isObject = (val: unknown): val is Record<any, any> => val !== null && typeof val === 'object';
Expand Down Expand Up @@ -105,7 +107,7 @@ export default create({
background: `url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E${pa}${path}${path1}%3C/svg%3E")`,
width: '100%',
height: '100%',
transition: ' background-image .3s ease 0s,stroke .3s ease 0s'
transition: `${isIos ? '' : 'background-image .3s ease 0s, '}stroke .3s ease 0s`
};
});
const format = (progress: string | number) => Math.min(Math.max(+progress, 0), 100);
Expand Down

0 comments on commit 2ab5967

Please sign in to comment.