From 5d1b588fadc8c4ff080f129557edc6fa0d2d2aa0 Mon Sep 17 00:00:00 2001
From: mediabot-pt <295750538+mediabot-pt@users.noreply.github.com>
Date: Sun, 5 Jul 2026 18:53:33 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=A8=A1=E6=9D=BF=E5=A2=9E=E5=8A=A0=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/views/SitePages.vue | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
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) => {