问题描述
将Mat-select设置为禁用时,无法使用鼠标从该字段复制值。当我尝试从其他禁用字段(如文本输入)复制值时,此问题不存在。有什么办法吗?
解决方法
因此,基于以下答案:Prevent copying text in web-page我将此代码添加到了我的主要style.css文件中,并且现在可以正常使用
.mat-select-disabled .mat-select-trigger {
user-select: all !important;
}
将Mat-select设置为禁用时,无法使用鼠标从该字段复制值。当我尝试从其他禁用字段(如文本输入)复制值时,此问题不存在。有什么办法吗?
因此,基于以下答案:Prevent copying text in web-page我将此代码添加到了我的主要style.css文件中,并且现在可以正常使用
.mat-select-disabled .mat-select-trigger {
user-select: all !important;
}