feat(模板): 添加模板复制功能并优化文件操作
- 在模板列表和创建模板界面添加复制模板功能 - 将模板卡片样式改为outlined并修正节点统计标签 - 将同步文件操作改为异步操作提升性能 - 在执行模板对话框显示当前模板名称
This commit is contained in:
1 parent
466c02773f
commit
5d7d31c04d
4 files changed
+60
-30
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-card class="d-flex flex-column" height="100%">
|
||||
<v-card class="d-flex flex-column" height="100%" variant="outlined">
|
||||
<v-card-item>
|
||||
<v-card-title>{{ template.name }}</v-card-title>
|
||||
<v-card-subtitle>{{ template.description }}</v-card-subtitle>
|
||||
@@ -8,7 +8,7 @@
|
||||
<v-card-text class="flex-grow-1 py-2">
|
||||
<v-chip-group column>
|
||||
<v-chip size="small" color="primary" variant="tonal">
|
||||
节点: {{ nodeCount.files }}
|
||||
文件: {{ nodeCount.files }}
|
||||
</v-chip>
|
||||
<v-chip size="small" color="success" variant="tonal">
|
||||
目录: {{ nodeCount.directories }}
|
||||
@@ -43,6 +43,13 @@
|
||||
<v-list-item-title>修改</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item @click="$emit('copy', template)">
|
||||
<template v-slot:prepend>
|
||||
<v-icon color="primary">mdi-content-copy</v-icon>
|
||||
</template>
|
||||
<v-list-item-title>复制</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-list-item @click="$emit('delete', template)">
|
||||
@@ -70,6 +77,7 @@ interface Emits {
|
||||
(e: 'execute', template: Template): void
|
||||
(e: 'edit', template: Template): void
|
||||
(e: 'delete', template: Template): void
|
||||
(e: 'copy', template: Template): void
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
@@ -97,4 +105,4 @@ const nodeCount = computed(() => {
|
||||
|
||||
return { files, directories }
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
Reference in new issue
Block a user