实现效果图:
https://live.csdn.net/v/191683
我的代码:
添加个class是为了防止写在全局里会影响全局的treeselect,使效果仅作用于我当前的treeselect
所参考的大佬链接:
https://segmentfault.com/q/1010000023052471
大佬简直神了,这思路很不一般,把旁边小三角的功能范围扩大,,,盖住了旁边的标题,所以点标题的时候,实际点到的是旁边的三角:
我这出来的效果:
大佬的代码复制一下:
.ant-select-tree-switcher {
position: relative;
}
.ant-select-tree-switcher_open::before, .ant-select-tree-switcher_close::before {
content: ‘’;
position: absolute;
right: -310px;
top: 0;
left: 0;
bottom: 0;
}