progressBar(进度条)组件

一、class加载方式

<div id="pos" class="easyui-progressbar" data-options="value:60" style="width: 200px;"></div>

二、js加载方式

   

    $("#pos").progressbar({
    //属性
      width:600,//设置进度条宽度。默认为 auto,值为string
      height:30,//设置进度条高度。默认为 22,值为number
      value:10,// 设置进度条值。默认为 0,值为number
      text:'{value}%',//设置进度条百分比模版:默认{value}%,值为string
    //事件
      onChange:function (newValue,oldValue) {
        console.log("新值:"+newValue+",旧值:"+oldValue)
      },

    });
    //方法
      console.log($('#pos').progressbar('options'));//返回属性对象 参数none
      //$("#pos").progressbar('setValue',80); //设置一个新的进度值,参数value
      $("#pos").progressbar('resize',500);// 组件大小,参数width
      setInterval(function() {
        $("#pos").progressbar('setValue',$("#pos").progressbar('getValue')+1)//返回当前进度值,参数none
      },200)

三、可以使用$.fn.resizable.defaults 重写默认值对象

猜你喜欢

转载自www.cnblogs.com/Alaic2052243080/p/11514221.html
今日推荐