dur*_*rai 7 angularjs angularjs-directive angular-ui-router
我正在使用ag-grid来绑定列表中的值,是否可以复制所选单元格中的值/数据.我试图使用ctrl + c复制该值,但它没有工作有没有其他方法?
请帮我!
小智 23
您可以使用以下CSS执行此操作:
.ag-font-style {
user-select: initial;
-moz-user-select: text;
-ms-user-select: text;
-webkit-user-select: text;
}
Run Code Online (Sandbox Code Playgroud)
这适用于任何浏览器,即IE,Chrome,Mozilla,也可能是Safari.
小智 5
许多用户都要求这个功能:
https://github.com/ceolter/ag-grid/issues/87
无论如何,复制粘贴功能似乎仅在企业版中有效:
https://www.ag-grid.com/angular-grid-context-menu/index.php
There is a flag which will allow you to select text and then CTRL+C will work.
enableCellTextSelection=true
Run Code Online (Sandbox Code Playgroud)
This is not an enterprise config and can be at any time to enable cell text selection.