示例仅供参考,请以真机为主

Progress 进度条

参数

参数说明类型可选值默认值
modelValue / v-model绑定值 | number0
type类型stringlineline
sroke-width宽度number12
show-text是否显示文本booleanfalse
color颜色,支持多色string / array
status状态booleanfalse
icon尾部图标string

插槽

插槽名称说明
text文本内容

示例

基本用法

<cl-progress :value="40"></cl-progress>

不同颜色

<cl-progress color="#67C23A" :value="40"></cl-progress>

可调节颜色

<cl-progress :value="60" :color="['#F56C6C', '#E6A23C', '#67C23A']"></cl-progress>

自定义

通过插槽 text 实现

<cl-progress :value="val">
	<template #text>
		<text v-if="val >= 90"></text>
		<text v-else-if="val >= 80"></text>
		<text v-else-if="val >= 60">及格</text>
		<text v-else>{{ val }}</text>
	</template>
</cl-progress>
Last Updated: