fastadmin列表文字显示太长,设置宽度和鼠标停留显示文字

直接在对应的js中字段中显示:

{
	field: 'remark', 
	title: __('Remark'), 
	operate: false,
	formatter : function(value, row, index, field){
		return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.remark + "'>" + value + "span>";
	},
	cellStyle : function(value, row, index, field){
		return {
			css: {
				"white-space": "nowrap",
				"text-overflow": "ellipsis",
				"overflow": "hidden",
				"max-width":"150px"
			}
		};
	}
},

你可能感兴趣的:(fastadmin,php)