diff --git a/src/components/admin/settings/template/TemplateListItem.vue b/src/components/admin/settings/template/TemplateListItem.vue index a9ed5d4..e28d0ee 100644 --- a/src/components/admin/settings/template/TemplateListItem.vue +++ b/src/components/admin/settings/template/TemplateListItem.vue @@ -2,13 +2,19 @@

{{ template.template }}

-
+
- + + + + +
@@ -26,11 +32,14 @@ diff --git a/src/stores/admin/template.ts b/src/stores/admin/template.ts index 13c85bb..e9ef5bb 100644 --- a/src/stores/admin/template.ts +++ b/src/stores/admin/template.ts @@ -48,6 +48,13 @@ export const useTemplateStore = defineStore("template", { this.fetchTemplates(); return result; }, + async cloneTemplate(cloneId: number): Promise> { + const result = await http.post(`/admin/template/clone`, { + cloneId: cloneId, + }); + this.fetchTemplates(); + return result; + }, async deleteTemplate(template: number): Promise> { const result = await http.delete(`/admin/template/${template}`); this.fetchTemplates();