码农-小林 2022-04-23 23:15 采纳率: 74.1%
浏览 10
已结题

使用tree插件时候在节点加的东西在360及qq浏览器样式都起效就谷歌不起效有什么解决方案吗

这是结构
<a-tree
class="device-tree-node"
showIcon
:expandedKeys="expandedKeys"
:autoExpandParent="autoExpandParent"
:treeData="treeData"
@expand="onExpand"
:selectedKeys="selectedKeys"
:multiple="isMultiple"
@select="onTreeSelect"
:style="{ width: deviceTreeWidth }"
@rightClick="test($event)"
>


<span class="line" v-if="item.lineIcon && showLineIcon" @click.stop>
<img src="@/assets/device-tree/line2.png" @click="vShowLine" alt="" />
<img src="@/assets/device-tree/line1.png" @click="beginPatrol" alt="" />






这是样式
/deep/ .device-tree-node {
margin-bottom: 20px;
width: 250px;
height: 660px;
overflow: auto;
background: url("~@/assets/device-tree/tree-border.png") no-repeat;
background-size: 100% 100%;
position: relative;
/deep/ .line {
position: absolute;
right: -120px;
display: inline-flex;
align-items: center;
z-index: 100;
img {
margin-right: 5px;
}
    }
    .ant-select-selection__rendered {
      line-height: 20px !important;
      margin-right: 0;
      margin-left: 8px;
    }
  • 写回答

1条回答 默认 最新

  • _念_ 2022-04-24 17:33
    关注

    首先class有没有生效,如果有class那么应该是样式被覆盖了。
    如果class都没有,那试试把/deep/ 换成 v-deep或者>>>试试

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 7月27日
  • 已采纳回答 7月19日
  • 创建了问题 4月23日