更新记录

1.0.2(2023-04-13)

新增boderWidth属性 可设置边框宽度

1.0.1(2023-03-27)

兼容vue2

1.0.0(2023-01-05)

初次提交

查看更多

平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.6.15 app-vue × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
×

c-progress-circle

  • c-progress-circle 环形进度条

c-design交流群号:330647926

示例预览

https://cloud.vuedata.wang/cdesign/#/pages/progress-circle/progress-circle

一、使用示例

<template>
    <view class="content">
        <c-progress-circle :progress='progress' :color='color' :size='size' :boderWidth="boderWidth"></c-progress-circle>
        <view class="btnBox">
            <button size="mini" @click="add">+</button>
            <view style="width: 100rpx;text-align: center;">
                {{progress}}
            </view>
            <button size="mini" @click="reduce" type="default">-</button>
        </view>
        <view class="btnBox" style="padding-left: 100rpx;">边框颜色</view>
        <view class="btnBox">
            <button size="mini" @click="color='red'">红色</button>
            <button size="mini" @click="color='green'">绿色</button>
            <button size="mini" @click="color='orange'">橙色</button>
        </view>
        <view class="btnBox" style="padding-left: 100rpx;">进度条尺寸</view>
        <view class="btnBox">
            <button size="mini" @click="size='200rpx'">200rpx</button>
            <button size="mini" @click="size='400rpx'">400rpx</button>
            <button size="mini" @click="size='600rpx'">600rpx</button>
        </view>
        <view class="btnBox" style="padding-left: 100rpx;">边框宽度</view>
        <view class="btnBox">
            <button  size="mini" @click="boderWidth='200rpx'">200rpx</button>
            <button  size="mini" @click="boderWidth='400rpx'">400rpx</button>
            <button  size="mini" @click="boderWidth='600rpx'">600rpx</button>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                progress: 0.2,
                color:'red',
                size:'200rpx',
                boderWidth:'200rpx'
            }
        },
        methods: {
            add() {
                if(this.progress<1){
                    this.progress +=0.1
                    this.progress=this.progress.toFixed(1)*1
                }
            },
            reduce(){
                if(this.progress>0){
                    this.progress -=0.1
                    this.progress=this.progress.toFixed(1)*1    
                }
            }
        },
    }
</script>

<style lang="scss">
    .content{
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 20rpx;
        font-size: 28rpx;
    }
    .btnBox{
        width: 100%;
        display: flex;
        align-items: center;
        margin-top:30rpx;
    }
</style>

二、属性介绍

字段 类型 必填 默认值 描述
progress Number 0 进度 0-1
color String #3ec3c1 进度条颜色
size String 200rpx 进度条尺寸 单位rpx
boderWidth String 200rpx 边框宽度 单位rpx

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问