Commit f2026636 authored by GuanHua's avatar GuanHua

fix: 商城装修问题修复

parent 337ce82f
......@@ -13,10 +13,6 @@ const DesignPanel: React.FC<DesignPanelPropsType> = (props) => {
const { theme, pageName = 'index', onlyEidt } = props;
const { pageConfig } = useSelector(['pageConfig']);
useEffect(() => {
console.log(pageConfig, 'pageConfig')
}, [pageConfig])
return <BrickDesign
pageName={pageName}
initState={{ pageConfig }}
......
.setting_list {
display: flex;
flex-wrap: wrap;
margin: 0 -12px;
margin: 12px -16px;
&.small {
margin: 0 -8px;
}
&_item {
position: relative;
width: 380px;
......
import { ComponentSchemaType, PROPS_TYPES, PROPS_SETTING_TYPES } from '@lingxi-disign/core';
const RecommendShops: ComponentSchemaType = {
const RecommendShop: ComponentSchemaType = {
propsConfig: {
children: {
label: '内容',
......@@ -14,7 +14,7 @@ const RecommendShops: ComponentSchemaType = {
};
const ShopItem : ComponentSchemaType = {
fatherNodesRule: ['RecommendShops.children'],
fatherNodesRule: ['RecommendShop.children'],
propsConfig: {
children: {
label: '内容',
......@@ -28,6 +28,6 @@ const ShopItem : ComponentSchemaType = {
};
export default {
RecommendShops,
'RecommendShops.ShopItem': ShopItem
RecommendShop,
'RecommendShop.Item': ShopItem
};
......@@ -50,7 +50,7 @@ import MobileNavCard from './MobileNavCard';
import SuggestProduct from './SuggestProduct';
import Commodity from './Commodity';
import InformationCard from './InformationCard';
import RecommendShops from './RecommendShops';
import RecommendShop from './RecommendShop';
export default {
View,
......@@ -105,5 +105,5 @@ export default {
...SuggestProduct,
...Commodity,
InformationCard,
...RecommendShops,
...RecommendShop,
};
import { PROPS_SETTING_TYPES, PageConfigType } from '@lingxi-disign/core'
import { resolveMappingPageConfig } from '@lingxi-disign/react'
import styleThemeImgDefault from './imgs/style_theme_default.png'
import styleThemeImgScience from './imgs/style_theme_science.png'
import categoryNavTemplateDefault from './imgs/category_template_default.png'
import showCaseTemplateDefault from './imgs/showcase_template_default.jpg'
export const defaultHeaderNavData = [
{
name: "我的",
content: "",
status: true,
type: 1
},
{
name: "进货单",
content: "",
status: true,
type: 2
},
{
name: "客服",
content: "",
status: true,
type: 3
},
{
name: "搜索框",
content: "灯具",
status: true,
type: 4
}
]
export const defaultConfig: PageConfigType = {
'0': {
componentName: 'MallLayout',
props: {
style: {
width: '100%',
minHeight: '100%',
background: '#F7F8FA',
overflowX: 'hidden',
paddingBottom: '56px',
position: 'relative',
},
},
childNodes: []
},
// '1': {
// title: '头部导航栏',
// componentName: 'HeaderNav',
// props: {
// styleTheme: 0,
// categoryList: '${categoryList}',
// stylesthemelist: [
// {
// key: 0,
// img: styleThemeImgDefault,
// },
// {
// key: 1,
// img: styleThemeImgScience,
// }
// ]
// },
// childNodes: ['2'],
// childComponentName: 'HeaderNav.ActionItem',
// },
// '2': {
// loop: '${headerNav}',
// title: '${item.name}',
// hideActions: true,
// componentName: 'HeaderNav.ActionItem',
// props: {
// data: '${item}'
// },
// },
// '3': {
// title: '广告图',
// componentName: 'Banner',
// props: {
// style: {
// margin: '8px',
// },
// },
// childNodes: ['4'],
// childComponentName: 'Banner.Items',
// addBtnText: '添加广告',
// },
// '4': {
// loop: '${banner}',
// title: '${item.name}',
// componentName: 'Banner.Items',
// props: {
// id: '${item.name}',
// type: '${item.type}',
// img: '${item.img}',
// name: '${item.name}',
// isnull: false,
// },
// },
// '5': {
// title: '分类导航',
// componentName: 'MobileNavCard',
// props: {
// style: {
// margin: '8px',
// },
// stylesthemelist: [
// {
// key: 0,
// width: 320,
// height: 148,
// img: categoryNavTemplateDefault,
// },
// ]
// },
// childNodes: ['6'],
// childComponentName: 'MobileNavCard.NavItem',
// addBtnText: '添加导航',
// },
// '6': {
// loop: '${navList}',
// title: '${item.name}',
// componentName: 'MobileNavCard.NavItem',
// props: {
// id: '${item.id}',
// name: '${item.name}',
// type: '${item.type}',
// url: '${item.url}',
// icon: '${item.icon}',
// empty: false,
// },
// },
// '7': {
// title: '橱窗广告',
// componentName: 'ShowCaseBanner',
// childComponentName: 'ShowCaseBanner.Item',
// props: {
// stylesthemelist: [
// {
// key: 0,
// width: 152,
// height: 105,
// img: showCaseTemplateDefault,
// },
// ]
// },
// addBtnText: '添加橱窗',
// childNodes: ['8'],
// },
// '8': {
// loop: '${showCase}',
// title: '${item.name}',
// componentName: 'ShowCaseBanner.Item',
// props: {
// name: '${item.name}',
// banner: '${item.banner}',
// inner: '${item.inner}',
// type: '${item.type}',
// idList: '${item.idList}',
// },
// },
// '9': {
// title: '资讯',
// componentName: 'InformationCard',
// props: {
// title: '${informationTitle}'
// },
// childNodes: [],
// canEdit: false,
// addBtnText: '添加资讯',
// },
// '10': {
// title: '店铺推荐',
// componentName: 'RecommendShop',
// props: {},
// childNodes: [],
// childComponentName: 'RecommendShop.Item',
// addBtnText: '添加店铺',
// },
}
import React, { useEffect, useState } from 'react';
import { BrickProvider } from '@lingxi-disign/react';
import { updatePageConfig } from '@lingxi-disign/core'
import { Prompt } from 'umi';
import { message } from 'antd';
import { GlobalConfig } from '@/global/config';
......@@ -323,7 +322,6 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
};
setComponentConfigs(config);
setLoading(false);
updatePageConfig(config)
};
return !loading ? (
......
......@@ -174,10 +174,10 @@ export const defaultConfig: PageConfigType = {
},
'10': {
title: '店铺推荐',
componentName: 'RecommendShops',
componentName: 'RecommendShop',
props: {},
childNodes: [],
childComponentName: 'RecommendShops.ShopItem',
childComponentName: 'RecommendShop.Item',
addBtnText: '添加店铺',
}
},
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment