fix: 修复组件预览底部按钮溢出与咨询表单缺失
This commit is contained in:
1 parent
5b85fe769f
commit
fd2e970d8b
8 files changed
+151
-8
No files matched your search
@@ -1,19 +1,29 @@
|
||||
import { TemplatePage as FoodTemplatePage } from "../../../../../packages/template-acheng-campus-food/taro/index.tsx";
|
||||
import { TemplatePage as EditorialTemplatePage } from "../../../../../packages/template-linjing-editorial/taro/index.tsx";
|
||||
import React from "react";
|
||||
import { Inquiry } from "../../../../taro/src/components/Inquiry.tsx";
|
||||
import { Records } from "../../../../taro/src/components/Records.tsx";
|
||||
import { Success } from "../../../../taro/src/components/Success.tsx";
|
||||
import { TemplateAssetContext } from "./taro-web-components.jsx";
|
||||
|
||||
function pageContent({ workspace, page }) {
|
||||
if (page === "inquiry") return <Inquiry workspace={workspace} preview />;
|
||||
if (page === "records") return <Records workspace={workspace} />;
|
||||
if (page === "success") return <Success workspace={workspace} />;
|
||||
return null;
|
||||
}
|
||||
|
||||
function FoodPreview(props) {
|
||||
return (
|
||||
<TemplateAssetContext.Provider value="acheng-campus-food">
|
||||
<FoodTemplatePage {...props} />
|
||||
<FoodTemplatePage {...props}>{pageContent(props)}</FoodTemplatePage>
|
||||
</TemplateAssetContext.Provider>
|
||||
);
|
||||
}
|
||||
function EditorialPreview(props) {
|
||||
return (
|
||||
<TemplateAssetContext.Provider value="linjing-editorial">
|
||||
<EditorialTemplatePage {...props} />
|
||||
<EditorialTemplatePage {...props}>{pageContent(props)}</EditorialTemplatePage>
|
||||
</TemplateAssetContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user