【发布时间】:2017-12-07 17:37:50
【问题描述】:
在我的 handSon 表中,我只想在一行中显示文本,之后应该有 ...,如果有更多的文本。
$scope.textRenderer = function (instance, td, row, col, prop, value, cellProperties) {
if (cellProperties) {
var template;
template = ['<span style="white-space:nowrap; overflow:hidden;text-overflow: ellipsis;">' + value + '</span>'].join('');
while (td.firstChild) {
td.removeChild(td.firstChild);
}
if (!td.firstChild) {
td.appendChild($compile(template)($scope)[0]);
}
}
return td;
};
我试过上面的代码,但省略号没有显示。
【问题讨论】:
标签: javascript css dynamic handsontable