1. 程式人生 > >配置字段(居左,居中,居右,高度自適應)

配置字段(居左,居中,居右,高度自適應)

居中 visible ext 高度自適應 高度 value one rim tex


var style = (lis.visible*1 === 0 ? ‘display: none;‘ : ‘‘);


var abbrStyle = ‘‘;


// style +=‘white-space:‘ +‘normal‘+‘;‘;
if(lis.note ===‘left‘) {
abbrStyle += ‘ text-align:left;‘
}else if(lis.note ===‘right‘) {
abbrStyle += ‘text-align:right;‘
} else if($.trim(lis.note) ===‘height-auto‘){
abbrStyle += ‘white-space:normal; text-align:left; text-overflow: normal;word-break: break-all;‘;

}


console.log(abbrStyle);
str += ‘<span data-func="‘ + lis.func + ‘" ‘ +
‘data-key="‘ + lis.key + ‘" ‘ +
‘data-select="‘ + lis.select + ‘" ‘ +
‘class=" ‘ + lis.cls + ‘ ‘ + lis.w + ‘ " ‘ +
style=" ‘ + fryyClass + style + ‘ " ‘ +
‘data-msg="‘+dataMsg+‘" ‘ +
‘data-verification="‘+lis.verification+‘" ‘ +
‘title="‘+ title +‘">‘ +
‘<abbr style="‘+abbrStyle+‘">‘
+
value +
‘</abbr>‘ +
‘</span>‘;

後臺:配置居左中右1,2,3;高度自適應:height-auto;

配置字段(居左,居中,居右,高度自適應)