在父div的自定义组件中添加此类并添加下面的css,然后复制即可。
.custom-detail-component {
user-select: text; /* Allow text selection */
pointer-events: auto; /* Allow pointer events */
}
对于EG: 将其更改为
<h1 style="padding: 20px;">My Custom Detail</h1>
这个
<h1 style="padding: 20px;" class="custom-detail-component">My Custom Detail</h1>
然后您将能够选择文本,然后按 ctrl+c 复制所选内容