feat: 按视觉模板 manifest 驱动小程序运行时
This commit is contained in:
1 parent
031c81a7c1
commit
ce958fc1ae
17 files changed
+149
-26
No files matched your search
@@ -5,6 +5,7 @@ Page({
|
||||
trustContent: [],
|
||||
offerings: [],
|
||||
modules: [],
|
||||
moduleVariants: {},
|
||||
layout: [],
|
||||
theme: {},
|
||||
hero: {
|
||||
@@ -35,6 +36,7 @@ Page({
|
||||
trustContent: workspace.trustContent || [],
|
||||
offerings: activeOfferings,
|
||||
modules: workspace.modules || [],
|
||||
moduleVariants: workspace.moduleVariants || {},
|
||||
layout,
|
||||
theme: workspace.theme || {},
|
||||
hero: {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<view class="page">
|
||||
<block wx:for="{{layout}}" wx:key="*this" wx:for-item="moduleKey">
|
||||
<founder-card wx:if="{{moduleKey === 'founder-card'}}" brand="{{brand}}" />
|
||||
<brand-hero wx:if="{{moduleKey === 'brand-hero'}}" hero="{{hero}}" bind:explore="goWorks" />
|
||||
<trust-proof wx:if="{{moduleKey === 'trust-proof'}}" content="{{trustContent}}" />
|
||||
<trust-manifesto wx:if="{{moduleKey === 'trust-manifesto'}}" content="{{trustContent}}" />
|
||||
<offering-list wx:if="{{moduleKey === 'offering-list'}}" offerings="{{offerings}}" bind:open="selectOffering" bind:more="goWorks" />
|
||||
<founder-card wx:if="{{moduleKey === 'founder-card'}}" brand="{{brand}}" variant="{{moduleVariants[moduleKey]}}" />
|
||||
<brand-hero wx:if="{{moduleKey === 'brand-hero'}}" hero="{{hero}}" variant="{{moduleVariants[moduleKey]}}" bind:explore="goWorks" />
|
||||
<trust-proof wx:if="{{moduleKey === 'trust-proof'}}" content="{{trustContent}}" variant="{{moduleVariants[moduleKey]}}" />
|
||||
<trust-manifesto wx:if="{{moduleKey === 'trust-manifesto'}}" content="{{trustContent}}" variant="{{moduleVariants[moduleKey]}}" />
|
||||
<offering-list wx:if="{{moduleKey === 'offering-list'}}" offerings="{{offerings}}" variant="{{moduleVariants[moduleKey]}}" bind:open="selectOffering" bind:more="goWorks" />
|
||||
</block>
|
||||
</view>
|
||||
Reference in new issue
Block a user