feat(模板): 添加模板复制功能并优化文件操作
- 在模板列表和创建模板界面添加复制模板功能 - 将模板卡片样式改为outlined并修正节点统计标签 - 将同步文件操作改为异步操作提升性能 - 在执行模板对话框显示当前模板名称
This commit is contained in:
1 parent
466c02773f
commit
5d7d31c04d
4 files changed
+60
-30
No files matched your search
@@ -33,6 +33,7 @@
|
||||
@view="viewTemplate"
|
||||
@execute="executeTemplate"
|
||||
@edit="editTemplate"
|
||||
@copy="copyTemplate"
|
||||
@delete="deleteTemplate"
|
||||
/>
|
||||
</v-col>
|
||||
@@ -64,7 +65,7 @@
|
||||
<!-- Execute template dialog -->
|
||||
<v-dialog v-model="showExecuteDialog" max-width="600">
|
||||
<v-card>
|
||||
<v-card-title>执行模板</v-card-title>
|
||||
<v-card-title>执行模板: {{ selectedTemplate?.name }}</v-card-title>
|
||||
<v-card-text>
|
||||
<v-form v-model="executeFormValid">
|
||||
<v-text-field v-model="executePath" label="选择目录" readonly @click="selectDirectory"
|
||||
@@ -140,6 +141,11 @@ const editTemplate = (template: Template) => {
|
||||
router.push(`/create-template/${template.id}`)
|
||||
}
|
||||
|
||||
const copyTemplate = (template: Template) => {
|
||||
router.push(`/create-template?copyId=${template.id}`)
|
||||
}
|
||||
|
||||
|
||||
const deleteTemplate = async (template: Template) => {
|
||||
const confirmed = await ConfirmDialogService.confirm({
|
||||
title: '删除模板',
|
||||
|
||||
Reference in new issue
Block a user