添加主机身份页面.

This commit is contained in:
lijiahang
2023-09-21 13:50:42 +08:00
parent fbc40116f0
commit b13cbd8cca
39 changed files with 444 additions and 649 deletions

View File

@@ -2,30 +2,36 @@
<div class="layout-container">
<!-- 表格 -->
<host-identity-table ref="table"
@openAdd="() => drawer.openAdd()"
@openUpdate="(e) => drawer.openUpdate(e)" />
@openAdd="() => modal.openAdd()"
@openUpdate="(e) => modal.openUpdate(e)" />
<!-- 添加修改模态框 -->
<host-identity-form-drawer ref="drawer"
@added="() => table.addedCallback()"
@updated="() => table.updatedCallback()" />
<host-identity-form-modal ref="modal"
@added="() => table.addedCallback()"
@updated="() => table.updatedCallback()" />
</div>
</template>
<script lang="ts">
export default {
name: 'asset-host-identity'
name: 'assetHostIdentity'
};
</script>
<script lang="ts" setup>
import HostIdentityTable from './components/host-identity-table.vue';
import HostIdentityFormDrawer from './components/host-identity-form-drawer.vue';
import HostIdentityFormModal from './components/host-identity-form-modal.vue';
import { ref } from 'vue';
import { onUnmounted, ref } from 'vue';
import { useCacheStore } from '@/store';
const table = ref();
const drawer = ref();
const modal = ref();
// 卸载时清除 tags cache
onUnmounted(() => {
const cacheStore = useCacheStore();
cacheStore.set('hostKeys', []);
});
</script>