This commit is contained in:
star1029 2018-04-26 00:03:58 +08:00
parent fd86bdb0d4
commit ec213f8726
2 changed files with 18 additions and 12 deletions

View File

@ -55,13 +55,12 @@ layui.use(['rate'], function(){
var rate = layui.rate;
//渲染
// var ins1 = rate.render({
// elem: '#test1'
// ,length: 7
// ,value: 4
// });
// ins1.setValue(5);
var ins1 = rate.render({
elem: '#test1'
,length: 7
,value: 4
});
ins1.setvalue(2);
rate.render({
elem: '#test1'

View File

@ -28,11 +28,8 @@ layui.define('jquery',function(exports){
,options = that.config;
return {
function(value){
console.log(options)
//that.setValue();
setvalue: function(value){
that.setvalue.call(that, value);
}
,config: options
}
@ -99,6 +96,16 @@ layui.define('jquery',function(exports){
};
//重置value
Class.prototype.setvalue = function(value){
var that = this
,options = that.config ;
options.value = value
}
//li触控事件
Class.prototype.action = function(){
var that = this