vue中el-tree?橫向滾動(dòng)條的實(shí)現(xiàn)
本文主要介紹了vue中el-tree 橫向滾動(dòng)條的實(shí)現(xiàn),具體如下
<template> <el-dialog :before-close="dialogHandleClose" :title="dialogData.title" :visible="dialogVisible" append-to-body center width="70%" @opened="tableOptionalTreeOpened"> <el-row :gutter="20" class="mb8" type="flex"> <el-col :span="6" justify="center"> <el-input v-model="treeFilterText" placeholder="輸入關(guān)鍵字搜索" style="margin-bottom: 5px"/> <!-- 滾動(dòng)條樣式 left、filter-tree --> <div class="left"> <el-tree class="filter-tree" ref="tree_child" :data="tableTreeData" :default-expand-all="false" :expand-on-click-node="false" :filter-node-method="treeFilterNode" :load="loadNode" :props="treeDefaultProps" lazy node-key="id" @node-click="handleNodeClick"> </el-tree> </div> </el-col> <el-col :span="18" justify="center" > <!-- 滾動(dòng)條樣式 style的width要設(shè)置100%,不然內(nèi)容會(huì)被擠 --> <el-input v-model="tableFilterText" :clearable="true" placeholder="輸入物料名稱按下回車進(jìn)行搜索" style="margin-bottom: 5px;width: 100%" @clear="clear" @keyup.enter.native="search"/> <el-table ref="table_child" :data="tableData" :reserve-selection="true" border height="320" row-key="id" style="width: 100%" @select='onTableSelect' @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55"/> <el-table-column align="center" label="編碼" prop="code" width="180"/> <el-table-column align="center" label="名稱" prop="name" width="180"/> <el-table-column align="center" label="簡(jiǎn)稱" prop="shortName" width="180"/> <el-table-column align="center" label="版本號(hào)" prop="version"/> </el-table> <pagination v-show="total>=0" :limit.sync="pageSize" :page.sync="pageNum" :total="total" @pagination="getList"/> <div class="select-view"> <div style="margin: 5px 0">當(dāng)前已選:</div> <div class="gys-names"> <el-tag v-for="item in selectDataAll" :key="item.id" style="margin-right:5px;"> {{ item.name }} <i class="el-icon-delete" @click="delMaterial(item)" style="cursor: pointer;margin-left:5px"></i> </el-tag> </div> </div> </el-col> </el-row> <span slot="footer" class="dialog-footer"> <el-button @click="cancel()">取 消</el-button> <el-button type="primary" @click="confirm()">確 定</el-button> </span> </el-dialog> </template>
<style lang="scss" scoped> ::v-deep .el-tree { /*width: 100%;*/ overflow-y: auto; } ::v-deep .el-dialog--center .el-dialog__body { padding: 0 25px 0; } ::v-deep .el-dialog__footer { padding: 0 20px 20px; } .filter-tree { //border: 1px solid #dcdfe6; display: inline-block; overflow: auto; } ::v-deep .el-tree-node__label { display: block; overflow: hidden; word-break: keep-all; white-space: nowrap; text-overflow: ellipsis; } .left { height: 480px; overflow: auto; } .select-view { flex: 1; width: 100%; display: flex; flex-direction: column; .gys-names { flex: 1; border: 1px solid #e8e8e8; border-radius: 5px; min-height: 85px; overflow-y: auto; } } </style>
到此這篇關(guān)于vue中el-tree 橫向滾動(dòng)條的實(shí)現(xiàn)的文章就介紹到這了,更多相關(guān)el-tree 橫向滾動(dòng)條內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Vue3中的setup語(yǔ)法糖、computed函數(shù)、watch函數(shù)詳解
這篇文章主要介紹了Vue3中的setup語(yǔ)法糖、computed函數(shù)、watch函數(shù),本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-03-03Vue項(xiàng)目中ESlint規(guī)范示例代碼
這篇文章主要給大家介紹了關(guān)于Vue項(xiàng)目中ESlint規(guī)范的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用Vue具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-07-07vue中ref引用操作DOM元素的實(shí)現(xiàn)
本文主要介紹了vue中ref引用操作DOM元素的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2023-01-01Vue3+Element-Plus實(shí)現(xiàn)左側(cè)菜單折疊與展開(kāi)功能示例
本文主要介紹了Vue3+Element-Plus實(shí)現(xiàn)左側(cè)菜單折疊與展開(kāi)功能示例,文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-04-04使用vuex的時(shí)候,出現(xiàn)this.$store為undefined問(wèn)題
這篇文章主要介紹了使用vuex的時(shí)候,出現(xiàn)this.$store為undefined問(wèn)題及解決,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-06-06解讀element ui el-row標(biāo)簽中的gutter用法
這篇文章主要介紹了解讀element ui el-row標(biāo)簽中的gutter用法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2024-08-08vue項(xiàng)目中輪詢狀態(tài)更改方式(鉤子函數(shù))
這篇文章主要介紹了vue項(xiàng)目中輪詢狀態(tài)更改方式(鉤子函數(shù)),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-10-10Vue el-table復(fù)選框全部勾選及勾選回顯功能實(shí)現(xiàn)
這篇文章主要介紹了Vue el-table復(fù)選框全部勾選及勾選回顯功能實(shí)現(xiàn),本文通過(guò)示例代碼給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧2024-05-05