[CMS-VISUAL] F2: 布局编辑器三栏化——中间 iframe 实时预览(500ms debounce 注入+手动刷新兜底+三档视口)、类型卡 SVG 缩略图(R-40)、展示形态 RadioCard、首用自动编排、序列高度示意(171 测试绿)
This commit is contained in:
@@ -120,6 +120,10 @@ const portalPreviewUrl = computed(() =>
|
||||
? portalUrlOf(row.value)
|
||||
: ""
|
||||
);
|
||||
/** F2 实时预览 iframe 地址(编辑模式 = serviceHost + 正式门户首页) */
|
||||
const portalFrameUrl = computed(() =>
|
||||
!isCreate.value && row.value ? `${config.serviceHost}${portalUrlOf(row.value)}` : undefined
|
||||
);
|
||||
|
||||
const rules = {
|
||||
code: [
|
||||
@@ -268,6 +272,7 @@ async function persistTab(tab: TabKey, patch: Record<string, unknown> | null) {
|
||||
seeding = true;
|
||||
if (tab === "layout") {
|
||||
layoutModel.value = lastSavedConfigJson.value;
|
||||
layoutEditorRef.value?.refreshAfterSave?.();
|
||||
} else if (tab === "css") {
|
||||
customCss.value = readCustomCss(lastSavedConfigJson.value);
|
||||
}
|
||||
@@ -530,7 +535,13 @@ watch(() => store.currentSchool?.schId, () => loadSites());
|
||||
<span class="card-subtitle">首页 = 可编排的区块序列(要闻/栏目文章/画廊/链接组)</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<HomeLayoutEditor v-model="layoutModel" :site-id="basic.id" ref="layoutEditorRef" @save="saveLayout" />
|
||||
<HomeLayoutEditor
|
||||
v-model="layoutModel"
|
||||
:site-id="basic.id"
|
||||
:portal-url="portalFrameUrl"
|
||||
ref="layoutEditorRef"
|
||||
@save="saveLayout"
|
||||
/>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<Button type="primary" :loading="saving.layout" @click="saveLayout">保存首页布局</Button>
|
||||
|
||||
Reference in New Issue
Block a user