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

View File

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

View File

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