Files
orion-visor/orion-ops-ui/src/views/asset/host-identity/index.vue

41 lines
1.0 KiB
Vue
Raw Normal View History

2023-09-20 12:13:02 +08:00
<template>
<div class="layout-container">
<!-- 表格 -->
<host-identity-table ref="table"
2023-09-21 13:50:42 +08:00
@openAdd="() => modal.openAdd()"
@openUpdate="(e) => modal.openUpdate(e)" />
2023-09-20 12:13:02 +08:00
<!-- 添加修改模态框 -->
2023-09-21 13:50:42 +08:00
<host-identity-form-modal ref="modal"
@added="() => table.addedCallback()"
@updated="() => table.updatedCallback()" />
2023-09-20 12:13:02 +08:00
</div>
</template>
<script lang="ts">
export default {
2023-09-21 13:50:42 +08:00
name: 'assetHostIdentity'
2023-09-20 12:13:02 +08:00
};
</script>
<script lang="ts" setup>
import HostIdentityTable from './components/host-identity-table.vue';
2023-09-21 13:50:42 +08:00
import HostIdentityFormModal from './components/host-identity-form-modal.vue';
2023-09-20 17:13:38 +08:00
2023-09-21 13:50:42 +08:00
import { onUnmounted, ref } from 'vue';
import { useCacheStore } from '@/store';
2023-09-20 12:13:02 +08:00
const table = ref();
2023-09-21 13:50:42 +08:00
const modal = ref();
// 卸载时清除 tags cache
onUnmounted(() => {
const cacheStore = useCacheStore();
cacheStore.set('hostKeys', []);
});
2023-09-20 12:13:02 +08:00
</script>
<style lang="less" scoped>
</style>