feat: 新增独立工坊宣传模板及配置导入验证
This commit is contained in:
1 parent
bf4bbf81c7
commit
04e42b3a80
43 files changed
+5726
-13
No files matched your search
@@ -24,9 +24,9 @@ export default defineAppConfig({
|
||||
...(!PREVIEW_ALL_TEMPLATES
|
||||
? {
|
||||
tabBar: {
|
||||
color: "#8b8178",
|
||||
selectedColor: "#3b2118",
|
||||
backgroundColor: "#ffffff",
|
||||
color: TEMPLATE_TAB_STYLE.color || "#8b8178",
|
||||
selectedColor: TEMPLATE_TAB_STYLE.selectedColor || "#3b2118",
|
||||
backgroundColor: TEMPLATE_TAB_STYLE.backgroundColor || "#ffffff",
|
||||
list: TEMPLATE_MANIFEST.navigation.map((tab) => ({
|
||||
pagePath: routes[tab.page],
|
||||
text: tab.label,
|
||||
|
||||
@@ -21,9 +21,13 @@ import "./forms.css";
|
||||
export function Inquiry({
|
||||
workspace,
|
||||
preview = false,
|
||||
choiceStyle = "picker",
|
||||
beforeSubmit,
|
||||
}: {
|
||||
workspace: RuntimeWorkspace;
|
||||
preview?: boolean;
|
||||
choiceStyle?: "chips" | "picker";
|
||||
beforeSubmit?: React.ReactNode;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [offeringId, setOfferingId] = useState(router.params.offeringId || "");
|
||||
@@ -107,7 +111,8 @@ export function Inquiry({
|
||||
const value = values[field.key];
|
||||
const stringValue = typeof value === "string" ? value : "";
|
||||
const chips =
|
||||
compactForm && field.key === "type" && ["select", "radio"].includes(field.type);
|
||||
(choiceStyle === "chips" || (compactForm && field.key === "type")) &&
|
||||
["select", "radio"].includes(field.type);
|
||||
return (
|
||||
<View
|
||||
className={`form-field ${compactForm && compactFieldKeys.has(field.key) ? "half-field" : ""}`}
|
||||
@@ -200,6 +205,7 @@ export function Inquiry({
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
{beforeSubmit}
|
||||
{error && (
|
||||
<View className="form-error" role="alert">
|
||||
{error}
|
||||
|
||||
Vendored
+5
@@ -1,3 +1,8 @@
|
||||
declare const TEMPLATE_TAB_STYLE: {
|
||||
color?: string;
|
||||
selectedColor?: string;
|
||||
backgroundColor?: string;
|
||||
};
|
||||
declare const TEMPLATE_KEY: string;
|
||||
declare const BRAND_SLUG: string;
|
||||
declare const API_BASE_URL: string;
|
||||
|
||||
Reference in new issue
Block a user