From 724c4830ea23cd632802a2f76a318a16b309f8a2 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期五, 27 十二月 2024 09:00:00 +0800 Subject: [PATCH] 滚动条 --- src/views/hosp/rules/index.vue | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/views/hosp/rules/index.vue b/src/views/hosp/rules/index.vue index 00064d5..7b40803 100644 --- a/src/views/hosp/rules/index.vue +++ b/src/views/hosp/rules/index.vue @@ -13,7 +13,22 @@ style="margin-bottom: 20px" /> </div> - <el-scrollbar style="height: 629px; width: 100%"> + <div class="scrollable-container"> + <div class="content"> + <el-tree + :data="deptOptions" + :props="defaultProps" + :expand-on-click-node="false" + :filter-node-method="filterNode" + ref="tree" + node-key="id" + :default-expanded-keys="treeId" + highlight-current + @node-click="handleNodeClick" + /> + </div> + </div> + <!-- <el-scrollbar style="height: 629px; width: 100%"> <div class="head-container"> <el-tree :data="deptOptions" @@ -27,7 +42,7 @@ @node-click="handleNodeClick" /> </div> - </el-scrollbar> + </el-scrollbar> --> <!-- <div class="head-tree"> <el-tree ref="tree" @@ -1282,6 +1297,21 @@ .pag1 { width: 30%; } + +.scrollable-container { + width: 260px; /* 璁剧疆瀹瑰櫒鐨勫搴� */ + height: 629px; /* 璁剧疆瀹瑰櫒鐨勯珮搴� */ + overflow: auto; /* 鍏佽鍐呭婧㈠嚭鏃舵樉绀烘粴鍔ㄦ潯 */ + border: 1px solid #ccc; /* 鍙�夛細娣诲姞杈规浠ユ洿濂藉湴鏄剧ず瀹瑰櫒 */ + position: relative; /* 鍙�夛細浣垮鍣ㄥ唴鐨勭粷瀵瑰畾浣嶅厓绱犺兘澶熸纭樉绀� */ +} + +.content { + width: 1000px; /* 璁剧疆鍐呭鐨勫搴︼紝浠ヨЕ鍙戞按骞虫粴鍔ㄦ潯 */ + height: 1000px; /* 璁剧疆鍐呭鐨勯珮搴︼紝浠ヨЕ鍙戝瀭鐩存粴鍔ㄦ潯 */ +} + + /* .guding { position: fixed; top: 20px; -- Gitblit v1.8.0