element-ui的樹型結構圖,帶有複選框的,沒有子項的,橫排展現

// 修改樹形圖樣式,若是不含有下箭頭的塊,要變成行內樣式
        treeChildInline(){
            let hasCaretRight = $("#permission_panel").find(".is-leaf");
            $.each(hasCaretRight,(index:number,item:any)=>{
                let hasChildNodeList= item.closest('.el-tree-node');
                item.closest('.el-tree-node').style.display = 'inline-block';
            });
        },





//因爲element-ui,樣式設置爲不換行,因此要修改稱換行處理,不然小屏幕會致使,展現不全,被隱藏了

// 本例#permission_panel僅僅只是增長做用域,防止全局覆蓋,只針對想實現的地方處理,若是由於有全局本身修改覆蓋,致使失效請用!important,最高級執行覆蓋
<style>    #permission_panel .el-tree-node{        white-space: normal;    }</style>
相關文章
相關標籤/搜索