perf: 优化 tree 高度

This commit is contained in:
ibuler
2023-02-28 16:08:50 +08:00
parent c099a16a49
commit 10a6dae2cf
3 changed files with 18 additions and 17 deletions

View File

@@ -5,20 +5,20 @@
top="1vh"
v-bind="$attrs"
width="80vw"
@close="handleClose"
@cancel="handleCancel"
@close="handleClose"
@confirm="handleConfirm"
v-on="$listeners"
>
<AssetTreeTable
ref="ListPage"
v-bind="$attrs"
:header-actions="headerActions"
:table-config="tableConfig"
:url="baseUrl"
:node-url="baseNodeUrl"
:table-config="tableConfig"
:tree-url="`${baseNodeUrl}children/tree/`"
:url="baseUrl"
class="tree-table"
v-bind="$attrs"
/>
</Dialog>
</template>
@@ -172,10 +172,11 @@ export default {
.left {
padding: 5px;
}
.treebox {
height: 70vh;
}
.right {
height: calc(100vh - 200px);
overflow: auto;
}
.mini {
@@ -188,8 +189,8 @@ export default {
}
}
.page ::v-deep .treebox {
height: inherit !important;
.page ::v-deep .treebox .ztree {
}
.asset-select-dialog ::v-deep .el-icon-circle-check {

View File

@@ -11,12 +11,12 @@
<AssetSelectDialog
v-if="dialogVisible"
ref="dialog"
:base-node-url="baseNodeUrl"
:base-url="baseUrl"
:tree-url-query="treeUrlQuery"
:value="value"
:visible.sync="dialogVisible"
v-bind="$attrs"
:tree-url-query="treeUrlQuery"
:base-url="baseUrl"
:base-node-url="baseNodeUrl"
@cancel="handleCancel"
@confirm="handleConfirm"
v-on="$listeners"
@@ -143,8 +143,8 @@ export default {
.left {
padding: 5px;
.treebox {
height: 70vh;
.ztree {
height: calc(100vh - 250px) !important;
}
}

View File

@@ -408,13 +408,13 @@ export default {
}
.treebox {
height: 70vh;
background-color: transparent;
> > > .ztree {
>>> .ztree {
overflow: auto;
background-color: transparent;
height: calc(100% - 50px);
max-height: calc(100vh - 220px);
min-height: 500px;
li {
background-color: transparent !important;