Merge pull request #4030 from jumpserver/pr@v4@fix_plateform_create

fix: Fixed the issue that when creating a device in the platform list, the new device needs to refresh before it can be displayed
This commit is contained in:
ZhaoJiSen 2024-06-12 19:14:28 +08:00 committed by GitHub
commit 4a604f4f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -10,10 +10,6 @@ export default {
components: {
ListTable
},
computed: {
},
created() {
},
methods: {
reloadTable() {
this.$refs.ListTable.reloadTable()
@ -22,9 +18,8 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
.list-table {
margin-bottom: 20px;
}
</style>

View File

@ -7,7 +7,7 @@
@tab-click="changeMoreCreates"
>
<keep-alive>
<GenericListTable :header-actions="headerActions" :table-config="tableConfig" />
<GenericListTable ref="genericListTable" :header-actions="headerActions" :table-config="tableConfig" />
</keep-alive>
</TabPage>
</template>
@ -124,6 +124,9 @@ export default {
return `/api/v1/assets/platforms/?category=${this.tab.activeMenu}`
}
},
activated() {
this.$refs.genericListTable.reloadTable()
},
async mounted() {
try {
await this.setCategoriesTab()