fix: tree bug

This commit is contained in:
ibuler
2024-06-19 13:17:06 +08:00
parent fdb52fb4f4
commit 8e0117a100
6 changed files with 15 additions and 21 deletions

View File

@@ -125,7 +125,7 @@ export default {
},
methods: {
handleClose() {
this.$eventBus.$emit('treeComponentKey')
this.$refs.ListPage.$refs.TreeList.componentKey += 1
},
handleConfirm() {
this.$emit('confirm', this.rowSelected, this.rowsAdd)

View File

@@ -100,9 +100,6 @@ export default {
},
async mounted() {
this.iActiveMenu = await this.getPropActiveTab()
this.$eventBus.$on('treeComponentKey', () => {
this.componentKey += '1'
})
this.hiddenTextIfNeed()
},
methods: {

View File

@@ -7,7 +7,7 @@
:style="{width: treeWidth}"
class="left"
>
<span v-if="component === 'AutoDataZTree'" class="title">Asset Tree</span>
<span v-if="component === 'AutoDataZTree'" class="title">{{ $t('AssetTree') }}</span>
<component
:is="component"
:key="componentTreeKey"

View File

@@ -33,29 +33,31 @@ export default {
return this.publicSettings?.CHAT_AI_ENABLED
}
},
methods: {
}
methods: {}
}
</script>
<style lang="scss" scoped>
.app-main {
background-color: #f3f3f4;
height: 100%!important;
height: 100% !important;
width: 100%;
position: relative;
overflow: auto;
/*padding: 10px 20px 10px;*/
}
.fixed-header+.app-main {
.fixed-header + .app-main {
padding-top: 50px;
}
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px);
}
.fixed-header+.app-main {
.fixed-header + .app-main {
padding-top: 84px;
}
}

View File

@@ -75,14 +75,9 @@ export default {
}
},
headerActions: {
hasSearch: true,
hasRefresh: true,
hasLeftActions: true,
hasRightActions: true,
hasLeftActions: false,
hasExport: false,
hasImport: false,
hasCreate: false,
hasMoreActions: false
hasImport: false
},
assetRelationConfig: {
icon: 'fa-edit',

View File

@@ -19,7 +19,7 @@ export default {
tableConfig: {
url: '/api/v1/terminal/my-sessions/?limit=5',
columns: [
'id', 'user', 'asset', 'account', 'remote_addr', 'protocol'
'id', 'asset', 'account', 'remote_addr', 'protocol'
],
columnsMeta: {
id: {
@@ -36,11 +36,11 @@ export default {
}
},
asset: {
width: 240,
'min-width': 200,
label: this.$t('Asset')
},
account: {
width: 180
'min-width': 100
},
command_amount: {
align: 'center',
@@ -51,7 +51,7 @@ export default {
label: this.$t('RemoteAddr')
},
protocol: {
width: 120,
width: 100,
label: this.$t('Protocol'),
el: {
disabled: false