安裝新的依賴 vue-tabel-with-tree-grid
vue-tabel-with-tree-grid 官方檔案
安裝完成后,在 main.js 入口檔案內先匯入 tree-tabel
然后全域注冊組件 tree-tabel
頁面中,我們使用了如下屬性:
data 確定我們的資料源,columns定義我們的指定列,selection-type 設定是否打開多選框,expand-type 設定是否展示展開欄,show-index 添加索引列, border 給表格添加邊框,
使用模板列:
通過在columns 設定 type 屬性值為 template,即可設定模板列,
然后在我們界面表格區域,添加一個 template 模板,然后設定作用域插槽 slot 為在資料塊定義的模板名稱 isOk
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/233615.html
標籤:其他
