diff --git a/web/src/views/SitePages.vue b/web/src/views/SitePages.vue
index ca8e923..c642abd 100644
--- a/web/src/views/SitePages.vue
+++ b/web/src/views/SitePages.vue
@@ -9,7 +9,10 @@
{{ dt.label }} {{ dt.type }}
{{ dt.entries.length }} 个入口
-
查看模板
+
+ 查看
+ 编辑默认
+
@@ -154,8 +157,16 @@ const loadDefault = (row) => {
window.scrollTo({top: document.body.scrollHeight, behavior:'smooth'})
}
+const editDefault = (dt) => {
+ editSiteId.value = dt.type
+ editingEntries.value = JSON.parse(JSON.stringify(dt.entries))
+ if (editingEntries.value.length === 0) editingEntries.value.push({key:'home',label:'首页',url:'{base}',method:'GET'})
+ editorMode.value = 'table'
+ window.scrollTo({top: document.body.scrollHeight, behavior:'smooth'})
+}
+
const previewDefault = (dt) => {
- ElMessageBox.alert(JSON.stringify(dt.entries, null, 2), dt.type + ' 默认模板', { dangerouslyUseHTMLString: false })
+ ElMessageBox.alert(JSON.stringify(dt.entries, null, 2), dt.type + ' 默认模板')
}
const toggleEdit = (row) => {