module.exports.getClassName = function (option) {
if (!option) return '';
if (option.disabled) return 'card--disabled';
if (option.checked) return 'card--active';
}
module.exports.maxHeight = function (options, height, maxHeight) {
var rows = Math.ceil(options.filter(function (option) { return !option.hide }).length / 3);
return Math.min(rows * (height + 8), maxHeight || 350);
}
module.exports.subName = function (option) {
if (!option.options) return '';
var options = option.options
.filter(function (option) { return option.checked; })
.map(function (option) { return option.name; })
if (options.length) return ':' + options.join(' ');
return ''
}
{{item.name}}{{_.subName(item)}}
都没有
提交
{{item.name}}{{_.subName(item)}}