feat: 完善后台可视化模板编辑与区域绑定
This commit is contained in:
1 parent
0b14b5a814
commit
5b85fe769f
18 files changed
+1620
-239
No files matched your search
@@ -53,7 +53,13 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<View className="intro" data-editor-target="editorial.home.proof">
|
||||
<Text className="eyebrow dark">{p.proofEyebrow}</Text>
|
||||
<Text className="section-title">{p.proofTitle}</Text>
|
||||
<Text className="body">{credential?.content}</Text>
|
||||
<Text
|
||||
className="body"
|
||||
data-editor-target="trust:credential"
|
||||
data-editor-record-id={credential?.id}
|
||||
>
|
||||
{credential?.content}
|
||||
</Text>
|
||||
<View className="stats">
|
||||
{t.stats?.map((item, index) => (
|
||||
<View key={index}>
|
||||
@@ -88,6 +94,8 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<View
|
||||
className="work-card"
|
||||
key={item.id}
|
||||
data-editor-target="linjing-editorial.home.offering"
|
||||
data-editor-record-id={item.id}
|
||||
onClick={() => navigate("detail", { id: item.id })}
|
||||
>
|
||||
<Image src={item.image} mode="aspectFill" />
|
||||
@@ -205,7 +213,12 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
</View>
|
||||
)}
|
||||
{workspace.trustItems.map((item) => (
|
||||
<View className="info-card trust-card" key={item.id}>
|
||||
<View
|
||||
className="info-card trust-card"
|
||||
key={item.id}
|
||||
data-editor-target={`trust:${item.type}`}
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
<View className="card-title">{item.title}</View>
|
||||
{item.summary && <Text className="trust-summary">{item.summary}</Text>}
|
||||
<Text>{item.content}</Text>
|
||||
@@ -227,6 +240,8 @@ function List({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<View
|
||||
className="work-card"
|
||||
key={item.id}
|
||||
data-editor-target="linjing-editorial.offerings.item"
|
||||
data-editor-record-id={item.id}
|
||||
onClick={() => navigate("detail", { id: item.id })}
|
||||
>
|
||||
<Image src={item.image} mode="aspectFill" />
|
||||
@@ -258,7 +273,11 @@ function Detail({ workspace, id }: { workspace: RuntimeWorkspace; id?: string })
|
||||
const item = offering(found);
|
||||
const p = presentation(workspace, "detail");
|
||||
return (
|
||||
<View className="editorial-detail" data-editor-target="linjing-editorial.detail.projectDetail">
|
||||
<View
|
||||
className="editorial-detail"
|
||||
data-editor-target="linjing-editorial.detail.projectDetail"
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
<View className="detail">
|
||||
<View className="hero-wrap">
|
||||
<Image
|
||||
|
||||
@@ -161,6 +161,49 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "homeOffering",
|
||||
"title": "首页业务卡片",
|
||||
"description": "点选预览中的单条内容,修改对应业务记录。",
|
||||
"page": "home",
|
||||
"target": "offering",
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"binding": "offering.name",
|
||||
"label": "名称",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "summary",
|
||||
"binding": "offering.summary",
|
||||
"label": "简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "priceText",
|
||||
"binding": "offering.priceText",
|
||||
"label": "价格说明",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "coverUrl",
|
||||
"binding": "offering.coverUrl",
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.home.offering",
|
||||
"label": "首页业务卡片"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "home",
|
||||
"title": "首页品牌表达",
|
||||
@@ -422,6 +465,49 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "offeringsOffering",
|
||||
"title": "业务卡片",
|
||||
"description": "点选预览中的单条内容,修改对应业务记录。",
|
||||
"page": "offerings",
|
||||
"target": "offering",
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"binding": "offering.name",
|
||||
"label": "名称",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "summary",
|
||||
"binding": "offering.summary",
|
||||
"label": "简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "priceText",
|
||||
"binding": "offering.priceText",
|
||||
"label": "价格说明",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "coverUrl",
|
||||
"binding": "offering.coverUrl",
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.offerings.item",
|
||||
"label": "业务卡片"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "cases",
|
||||
"title": "案例与体系",
|
||||
|
||||
Reference in new issue
Block a user