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 rate = layui.rate;
//渲染 //渲染
// var ins1 = rate.render({ var ins1 = rate.render({
// elem: '#test1' elem: '#test1'
// ,length: 7 ,length: 7
// ,value: 4 ,value: 4
// }); });
// ins1.setValue(5); ins1.setvalue(2);
rate.render({ rate.render({
elem: '#test1' elem: '#test1'

View File

@ -28,11 +28,8 @@ layui.define('jquery',function(exports){
,options = that.config; ,options = that.config;
return { return {
setvalue: function(value){
function(value){ that.setvalue.call(that, value);
console.log(options)
//that.setValue();
} }
,config: options ,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触控事件 //li触控事件
Class.prototype.action = function(){ Class.prototype.action = function(){
var that = this var that = this