jQuery MiniUI

标题: CheckBoxList,RadioButtonList [打印本页]

作者: lanpade    时间: 2017-11-3 16:13:29     标题: CheckBoxList,RadioButtonList

本帖最后由 lanpade 于 2017-11-3 16:47 编辑

CheckBoxList,RadioButtonList可以自定义其中每个选项的宽度吗?或者有保证上下两个list的选项对齐的功能?

作者: dforce    时间: 2017-11-3 16:55:59

可以绘制每一项的效果,onDrawItem事件里可以根据项来绘制指定宽度的内容
作者: lanpade    时间: 2017-11-6 09:26:15

dforce 发表于 2017-11-3 16:55
可以绘制每一项的效果,onDrawItem事件里可以根据项来绘制指定宽度的内容

能不能给个实例?
作者: felt    时间: 2017-11-6 11:03:49

lanpade 发表于 2017-11-6 09:26
能不能给个实例?

var index = 0;
    mini.parse();

function onDrawItem(e) {
        index = index + 10
        
        e.itemHtml = '<div style="width:' + (40 + index) + 'px;background:red">' + e.item.text + '<div>';
        
        document.title = index;
    }




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2