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

View File

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