gpt4 book ai didi

html - 如何限制 AngularJS 中 条目中显示的字符

转载 作者:搜寻专家 更新时间:2023-10-31 22:02:31 25 4
gpt4 key购买 nike

<分区>

我有一个表格,我想知道如何限制 <td> 中显示的字符数条目,以便在超出限制时显示“...”,可能允许用户单击它以展开。

<table st-table="displayedCollection" st-safe-src="main.quizCollection" class="table table-striped table-condensed table-bordered" ng-show="main.tab === 'active'">
<thead>
<tr>
<th st-sort="Internal.quizName">Name</th>
<th st-sort="Internal.description">Description</th>
<th st-sort="Internal.dateCreated">Date Created</th>
<th st-sort="Internal.timesTaken">Times Taken</th>
<th>URL</th>
<th>View More</th>
<th>Copy</th>
<th>Export</th>
<th>Deactivate</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="quiz in displayedCollection | filter:'active': true">
<td>{{quiz.Internal.quizName}}</td>
<td>{{quiz.Internal.description}}</td>
<td>{{quiz.Internal.dateCreated}}</td>
<td>{{quiz.Internal.timesTaken}}</td>
<td><button class="btn btn-default" clip-copy="main.copyURL(quiz)"><i class="fa fa-share-square-o"></i></button></td>
<td><a href="#/view-more/{{quiz.$id}}" class="btn btn-info"><i class="fa fa-eye"></i></a></td>
<td><a href="#/copy/{{quiz.$id}}" class="btn btn-default"><i class="fa fa-clipboard"></i></a></td>
<td><button class="btn btn-default" ng-csv="main.export(quiz)" csv-header="main.csvHeader" lazy-load="true" filename="{{quiz.Internal.quizName}}.csv"><i class="fa fa-floppy-o"></i></button></td>
<td><button class="btn btn-danger" ng-click="main.deactivate(quiz)"><i class="fa fa-ban"></i></button></td>
</tr>
</tbody>
</table>

我正在使用 ng-smart-table。另一个解决方案是,如果 <td>太长则柱子会变高但不会变宽。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com