From 24d7230413bd1f09d228412489fc5e41a4695e5e Mon Sep 17 00:00:00 2001 From: hailin <1356886193@qq.com> Date: 星期四, 27 七月 2023 09:47:04 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/yuanchu_code/lims-front-end --- src/views/standardLibrary/index.vue | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/src/views/standardLibrary/index.vue b/src/views/standardLibrary/index.vue index 9905c20..2d03597 100644 --- a/src/views/standardLibrary/index.vue +++ b/src/views/standardLibrary/index.vue @@ -14,6 +14,7 @@ :props="defaultProps" default-expand-all :filter-node-method="filterNode" + :render-content="renderContent" @node-click="nodeClick" /> </div> @@ -589,6 +590,24 @@ await updateSpeState({ id: this.rowId, spe_state: '0' }) this.dialogFormVisible5 = false + }, + renderContent(h, { node, data, store }) { + // console.log('data', data) + // console.log('node', node) + // 鍒ゆ柇鏄惁鏄埗鑺傜偣鎴栨枃浠跺す + const isFolder = ('children') in data + return ( + <span> + {isFolder ? ( + <i + class={node.expanded ? 'el-icon-folder-opened blue-folder' : 'el-icon-folder blue-folder'} + ></i> + ) : ( + <i class='el-icon-document blue-folder'></i> + )} + <span> {data.label}</span> + </span> + ) } } } @@ -620,6 +639,16 @@ margin-right: 12px; .el-tree { // margin-top: 12px; + ::v-deep .el-tree-node__content{ + height: 24px !important; + font-size: 16px; + display: inline-block !important; + padding: 2px; + color: #333; + .blue-folder{ + color: rgb(64, 158, 255) + } + } } // .el-tree { // margin-top: 12px; -- Gitblit v1.9.3