修改卡片模板.

This commit is contained in:
lijiahang
2023-10-07 18:55:24 +08:00
parent d0f0c9428e
commit 6d37fb51cf
16 changed files with 315 additions and 23 deletions

View File

@@ -59,7 +59,9 @@
配置
</a-doption>
<!-- 删除 -->
<a-doption class="span-red" @click="deleteRow(record.id)">
<a-doption v-permission="['asset:host:delete']"
class="span-red"
@click="deleteRow(record.id)">
<icon-delete />
删除
</a-doption>
@@ -111,7 +113,7 @@
<script lang="ts">
export default {
name: 'host-card-list'
name: 'asset-host-card-list'
};
</script>

View File

@@ -44,8 +44,7 @@
const appStore = useAppStore();
const cacheStore = useCacheStore();
// FIXME 临时
const renderTable = computed(() => appStore.hostView === 'card');
const renderTable = computed(() => appStore.hostView === 'table');
// 添加回调
const modalAddCallback = () => {
@@ -58,7 +57,6 @@
// 修改回调
const modalUpdateCallback = () => {
console.log(renderTable.value);
if (renderTable.value) {
table.value.updatedCallback();
} else {

View File

@@ -18,7 +18,7 @@ export const fieldConfig = {
label: '主机标签',
dataIndex: 'tags',
slotName: 'tags',
rowAlign: 'start'
rowAlign: 'start',
},
] as CardField[]
} as CardFieldConfig;