uniapp如何使用纯css来实现进度条效果?
网友回复

示例代码如下:
<template>
<view class="flex align-center diygw-col-24 justify-center">
<view class="progress-circle " :class="'progress-'+innerPercent" :style="{
'--not-progress-color':notProgressColor,
'--bg-color':bgColor,
'--color':color,
'--progress-color':progressColor,
'--width':width+'px',
'--font-size':fontSize+'px',
'--border-width':borderWidth+'px'
}">
<view class="inner">
<view class="progress-number">{{innerPercent}}%</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
width: {
type: Number,
default: 100
},
borderWidth: {
type: Number,
default: 20
},
bgColor: {
type: String,
default: '#fff'
},
notProgressColor: {
type: String,
default: '#ddd'
},
progressColor: {
type: String,
default: '#07c160'
},
color: {
type: String,
default: '#07c160'
},
fontSize: {
type: Number,
default: 24
},
/**
* 进度(0-100)
*/
percent: {
type: Number,
default: 30
},
/**
* 是否动画
*/
animate: {
type: Boolean,
default: true
},
/**
* 动画速率
*/
rate: {
type: Number,
default: 5
}
},
computed: {
/**
* @private
*/
complete() {
return this.innerPercent == 100
}
},
watch: {
percent(perce...点击查看剩余70%
seedance2如何参考白模视频使用真实场景和人物生成新视频?
如何设定小孩看电视的时候每隔10分钟弹出一个题目,答对才能继续,答错继续下一题?
直播数字人根据公屏互动评论实时做出不用动作技术是什么?
未来ai文本大模型根据剧本直接生成像素风或三维白模或灰模粗糙场景动画html给视频大模型参考站位与运镜?
浏览器中如何将epub电子书转成txt文本格式?
有没有开源的工具直接完整下载番茄等平台的任意小说内容?
为啥这几天seedance2.0-mini大降智?
ai能修复被遮挡破坏的二维码图片内容吗?
ai下一个赛道是空间智能与世界模型吗?
php5到php7的PHP2SHELL漏洞有没有补丁修改?


