Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-admin
Commits
d6da9da5
Commit
d6da9da5
authored
Sep 22, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 移动端装修页面添加公共取消确认按钮
parent
bc13b2b7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
38 deletions
+97
-38
global.d.ts
src/global/config/global.d.ts
+0
-35
config.ts
src/pages/pageCustomized/mobileEdit/config.ts
+14
-0
index.less
src/pages/pageCustomized/mobileSettingPanel/index.less
+33
-1
index.tsx
src/pages/pageCustomized/mobileSettingPanel/index.tsx
+5
-0
index.tsx
...ttingPanel/propsSettings/components/cardNavItem/index.tsx
+4
-0
index.tsx
...pageCustomized/mobileSettingPanel/propsSettings/index.tsx
+0
-2
settingWrap.tsx
src/pages/pageCustomized/mobileSettingPanel/settingWrap.tsx
+41
-0
No files found.
src/global/config/global.d.ts
View file @
d6da9da5
export
interface
RuleConfiguration
{
value
:
number
;
label
:
string
;
platformType
:
number
;
}
export
interface
PayWayResponse
{
payType
:
number
;
value
:
number
;
label
:
string
;
}
export
interface
PayInitializeConfig
{
payType
:
number
;
ruleConfigurations
:
RuleConfiguration
[];
payWayResponses
:
PayWayResponse
[];
}
export
interface
PayPlatformPayConfig
{
id
:
number
;
way
:
string
;
wayId
?:
any
;
payType
:
number
;
isPitchOn
:
number
;
settlementWay
?:
any
;
settlementDays
?:
any
;
settlementDate
?:
any
;
}
export
interface
PayConfig
{
payInitializeConfig
:
PayInitializeConfig
[];
payPlatformPayConfig
:
PayPlatformPayConfig
[];
}
export
interface
ShopInfo
{
export
interface
ShopInfo
{
id
:
number
;
id
:
number
;
name
:
string
;
name
:
string
;
...
@@ -91,7 +57,6 @@ export interface Global {
...
@@ -91,7 +57,6 @@ export interface Global {
}
}
export
interface
RootObject
{
export
interface
RootObject
{
payConfig
:
PayConfig
;
web
:
Web
;
web
:
Web
;
site
:
Site
;
site
:
Site
;
global
:
Global
;
global
:
Global
;
...
...
src/pages/pageCustomized/mobileEdit/config.ts
View file @
d6da9da5
...
@@ -51,6 +51,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -51,6 +51,7 @@ export const defaultConfig: PageConfigType = {
'1'
:
{
'1'
:
{
title
:
'头部导航栏'
,
title
:
'头部导航栏'
,
componentName
:
'HeaderNav'
,
componentName
:
'HeaderNav'
,
canDelete
:
false
,
props
:
{
props
:
{
styleTheme
:
'${topStyle}'
,
styleTheme
:
'${topStyle}'
,
categoryList
:
'${categoryList}'
,
categoryList
:
'${categoryList}'
,
...
@@ -80,6 +81,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -80,6 +81,7 @@ export const defaultConfig: PageConfigType = {
'3'
:
{
'3'
:
{
title
:
'广告图'
,
title
:
'广告图'
,
componentName
:
'Banner'
,
componentName
:
'Banner'
,
canDelete
:
false
,
props
:
{
props
:
{
style
:
{
style
:
{
margin
:
'8px'
,
margin
:
'8px'
,
...
@@ -104,6 +106,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -104,6 +106,7 @@ export const defaultConfig: PageConfigType = {
'5'
:
{
'5'
:
{
title
:
'分类导航'
,
title
:
'分类导航'
,
componentName
:
'MobileNavCard'
,
componentName
:
'MobileNavCard'
,
canDelete
:
false
,
props
:
{
props
:
{
style
:
{
style
:
{
margin
:
'8px'
,
margin
:
'8px'
,
...
@@ -137,6 +140,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -137,6 +140,7 @@ export const defaultConfig: PageConfigType = {
'7'
:
{
'7'
:
{
title
:
'橱窗广告'
,
title
:
'橱窗广告'
,
componentName
:
'ShowCaseBanner'
,
componentName
:
'ShowCaseBanner'
,
canDelete
:
false
,
childComponentName
:
'ShowCaseBanner.Item'
,
childComponentName
:
'ShowCaseBanner.Item'
,
props
:
{
props
:
{
stylesthemelist
:
[
stylesthemelist
:
[
...
@@ -175,6 +179,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -175,6 +179,7 @@ export const defaultConfig: PageConfigType = {
},
},
childNodes
:
[],
childNodes
:
[],
canEdit
:
false
,
canEdit
:
false
,
canDelete
:
false
,
addBtnText
:
'添加资讯'
,
addBtnText
:
'添加资讯'
,
},
},
'10'
:
{
'10'
:
{
...
@@ -191,6 +196,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -191,6 +196,7 @@ export const defaultConfig: PageConfigType = {
]
]
},
},
childNodes
:
[
'11'
],
childNodes
:
[
'11'
],
canDelete
:
false
,
childComponentName
:
'RecommendShop.Item'
,
childComponentName
:
'RecommendShop.Item'
,
addBtnText
:
'添加店铺'
,
addBtnText
:
'添加店铺'
,
maxLength
:
3
maxLength
:
3
...
@@ -212,6 +218,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -212,6 +218,7 @@ export const defaultConfig: PageConfigType = {
'12'
:
{
'12'
:
{
title
:
'优质推荐'
,
title
:
'优质推荐'
,
componentName
:
'QualityRecommend'
,
componentName
:
'QualityRecommend'
,
canDelete
:
false
,
props
:
{
props
:
{
defaultActiveType
:
'${defaultActive}'
defaultActiveType
:
'${defaultActive}'
},
},
...
@@ -221,6 +228,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -221,6 +228,7 @@ export const defaultConfig: PageConfigType = {
title
:
'分类标签'
,
title
:
'分类标签'
,
componentName
:
'ClassifyLabel'
,
componentName
:
'ClassifyLabel'
,
childNodes
:
[
'14'
],
childNodes
:
[
'14'
],
canDelete
:
false
,
props
:
{},
props
:
{},
childComponentName
:
'ClassifyLabel.LabelItem'
,
childComponentName
:
'ClassifyLabel.LabelItem'
,
addBtnText
:
'添加标签'
,
addBtnText
:
'添加标签'
,
...
@@ -242,11 +250,13 @@ export const defaultConfig: PageConfigType = {
...
@@ -242,11 +250,13 @@ export const defaultConfig: PageConfigType = {
'15'
:
{
'15'
:
{
title
:
'推荐列表'
,
title
:
'推荐列表'
,
componentName
:
'RecommendList'
,
componentName
:
'RecommendList'
,
canDelete
:
false
,
childNodes
:
[
'16'
,
'17'
,
'19'
,
'21'
],
childNodes
:
[
'16'
,
'17'
,
'19'
,
'21'
],
},
},
'16'
:
{
'16'
:
{
title
:
'商品列表'
,
title
:
'商品列表'
,
componentName
:
'RecommendCommodityList'
,
componentName
:
'RecommendCommodityList'
,
canDelete
:
false
,
props
:
{
props
:
{
dataList
:
'${recommendCommodityList}'
,
dataList
:
'${recommendCommodityList}'
,
id
:
'${recommendCommodityIdList}'
id
:
'${recommendCommodityIdList}'
...
@@ -257,6 +267,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -257,6 +267,7 @@ export const defaultConfig: PageConfigType = {
title
:
'店铺列表'
,
title
:
'店铺列表'
,
componentName
:
'RecommendShopList'
,
componentName
:
'RecommendShopList'
,
childNodes
:
[
'18'
],
childNodes
:
[
'18'
],
canDelete
:
false
,
childComponentName
:
'RecommendShopList.Item'
,
childComponentName
:
'RecommendShopList.Item'
,
addBtnText
:
'添加店铺'
,
addBtnText
:
'添加店铺'
,
// canHide: true,
// canHide: true,
...
@@ -279,6 +290,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -279,6 +290,7 @@ export const defaultConfig: PageConfigType = {
title
:
'品牌列表'
,
title
:
'品牌列表'
,
componentName
:
'RecommendBrandList'
,
componentName
:
'RecommendBrandList'
,
childNodes
:
[
'20'
],
childNodes
:
[
'20'
],
canDelete
:
false
,
childComponentName
:
'RecommendBrandList.Item'
,
childComponentName
:
'RecommendBrandList.Item'
,
addBtnText
:
'添加品牌'
,
addBtnText
:
'添加品牌'
,
// canHide: true,
// canHide: true,
...
@@ -297,6 +309,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -297,6 +309,7 @@ export const defaultConfig: PageConfigType = {
'21'
:
{
'21'
:
{
title
:
'资讯列表'
,
title
:
'资讯列表'
,
componentName
:
'RecommendInformationList'
,
componentName
:
'RecommendInformationList'
,
canDelete
:
false
,
props
:
{
props
:
{
dataList
:
'${recommendInformationList}'
,
dataList
:
'${recommendInformationList}'
,
id
:
'${recommendInformationIdList}'
id
:
'${recommendInformationIdList}'
...
@@ -307,6 +320,7 @@ export const defaultConfig: PageConfigType = {
...
@@ -307,6 +320,7 @@ export const defaultConfig: PageConfigType = {
title
:
'底部标签栏'
,
title
:
'底部标签栏'
,
componentName
:
'BottomNavigation'
,
componentName
:
'BottomNavigation'
,
props
:
{},
props
:
{},
canDelete
:
false
,
childNodes
:
[
'23'
],
childNodes
:
[
'23'
],
childComponentName
:
'BottomNavigation.Items'
,
childComponentName
:
'BottomNavigation.Items'
,
addBtnText
:
'添加标签'
,
addBtnText
:
'添加标签'
,
...
...
src/pages/pageCustomized/mobileSettingPanel/index.less
View file @
d6da9da5
...
@@ -13,8 +13,15 @@
...
@@ -13,8 +13,15 @@
}
}
.settingTabs {
.settingTabs {
height: 100%;
:global {
:global {
.ant-tabs-content {
position: relative;
height: 100%;
}
.ant-tabs {
height: 100%;
}
.ant-tabs-tab {
.ant-tabs-tab {
margin: 0 32px;
margin: 0 32px;
...
@@ -33,3 +40,28 @@
...
@@ -33,3 +40,28 @@
}
}
}
}
}
}
.setting_panel {
position: absolute;
top: 0;
right: 0;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
width: 100%;
height: 100%;
&_body {
flex-grow: 1;
overflow: auto;
font-size: 12px;
line-height: 1.5715;
}
&_footer {
flex-shrink: 0;
padding: 10px 10px;
border-top: 1px solid #f0f0f0;
}
}
src/pages/pageCustomized/mobileSettingPanel/index.tsx
View file @
d6da9da5
...
@@ -6,6 +6,7 @@ import cx from 'classnames';
...
@@ -6,6 +6,7 @@ import cx from 'classnames';
import
{
Tabs
}
from
'antd'
;
import
{
Tabs
}
from
'antd'
;
import
StyleSettings
from
'./styleSettings'
;
import
StyleSettings
from
'./styleSettings'
;
import
PropsSettings
from
'./propsSettings'
;
import
PropsSettings
from
'./propsSettings'
;
import
SettingWrap
from
'./settingWrap'
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
type
SettingPanelType
=
{
type
SettingPanelType
=
{
...
@@ -48,14 +49,18 @@ const MobileSettingPanel: React.FC<MobileSettingPanelProps> = (props)=> {
...
@@ -48,14 +49,18 @@ const MobileSettingPanel: React.FC<MobileSettingPanelProps> = (props)=> {
{
{
(
propsConfig
&&
propsConfig
.
componentType
)
&&
(
(
propsConfig
&&
propsConfig
.
componentType
)
&&
(
<
TabPane
tab=
{
propsConfig
.
componentType
.
label
||
'编辑'
}
key=
"props"
>
<
TabPane
tab=
{
propsConfig
.
componentType
.
label
||
'编辑'
}
key=
"props"
>
<
SettingWrap
>
<
PropsSettings
selectedInfo=
{
newSelectInfo
}
pageConfig=
{
pageConfig
}
{
...
props
}
/>
<
PropsSettings
selectedInfo=
{
newSelectInfo
}
pageConfig=
{
pageConfig
}
{
...
props
}
/>
</
SettingWrap
>
</
TabPane
>
</
TabPane
>
)
)
}
}
{
{
(
propsConfig
&&
propsConfig
.
styleType
)
&&
(
(
propsConfig
&&
propsConfig
.
styleType
)
&&
(
<
TabPane
tab=
"样式"
key=
"style"
>
<
TabPane
tab=
"样式"
key=
"style"
>
<
SettingWrap
>
<
StyleSettings
selectedInfo=
{
newSelectInfo
}
/>
<
StyleSettings
selectedInfo=
{
newSelectInfo
}
/>
</
SettingWrap
>
</
TabPane
>
</
TabPane
>
)
)
}
}
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/cardNavItem/index.tsx
View file @
d6da9da5
...
@@ -167,6 +167,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
...
@@ -167,6 +167,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
}
}
}
}
if
(
key
===
'type'
)
{
newProps
.
id
=
null
}
changeProps
({
changeProps
({
title
:
title
?
title
:
name
,
title
:
title
?
title
:
name
,
props
:
Object
.
assign
({
...
props
},
newProps
)
props
:
Object
.
assign
({
...
props
},
newProps
)
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/index.tsx
View file @
d6da9da5
...
@@ -33,11 +33,9 @@ interface PropsSettingsPropsType {
...
@@ -33,11 +33,9 @@ interface PropsSettingsPropsType {
const
PropsSettings
:
React
.
FC
<
PropsSettingsPropsType
>
=
(
props
)
=>
{
const
PropsSettings
:
React
.
FC
<
PropsSettingsPropsType
>
=
(
props
)
=>
{
const
{
selectedInfo
,
pageConfig
,
shopId
,
property
}
=
props
;
const
{
selectedInfo
,
pageConfig
,
shopId
,
property
}
=
props
;
const
renderSettingItem
=
()
=>
{
const
renderSettingItem
=
()
=>
{
console
.
log
(
selectedInfo
,
'selectedInfo'
);
const
{
props
:
initProps
,
propsConfig
,
parentKey
}
=
selectedInfo
||
{};
const
{
props
:
initProps
,
propsConfig
,
parentKey
}
=
selectedInfo
||
{};
const
_props
=
{
...
initProps
,
shopId
,
property
,
selectedKey
:
selectedInfo
?.
selectedKey
};
const
_props
=
{
...
initProps
,
shopId
,
property
,
selectedKey
:
selectedInfo
?.
selectedKey
};
const
componentType
=
propsConfig
?.
componentType
;
const
componentType
=
propsConfig
?.
componentType
;
console
.
log
(
componentType
,
'componentType'
);
if
(
componentType
)
{
if
(
componentType
)
{
switch
(
componentType
.
type
)
{
switch
(
componentType
.
type
)
{
case
PROPS_SETTING_TYPES
.
mobileHeaderNav
:
case
PROPS_SETTING_TYPES
.
mobileHeaderNav
:
...
...
src/pages/pageCustomized/mobileSettingPanel/settingWrap.tsx
0 → 100644
View file @
d6da9da5
import
React
from
'react'
import
{
Button
}
from
'antd'
import
{
clearSelectedStatus
}
from
'@lingxi-disign/core'
;
import
styles
from
'./index.less'
interface
SettingPanelPropsType
{
footer
?:
React
.
ReactNode
;
onOK
?:
Function
;
onCancel
?:
Function
;
confirmLoading
?:
boolean
}
const
SettingWrap
:
React
.
FC
<
SettingPanelPropsType
>
=
(
props
)
=>
{
// eslint-disable-next-line @typescript-eslint/no-empty-function
const
{
children
,
footer
,
onOK
,
onCancel
,
confirmLoading
=
false
}
=
props
return
(
<
div
className=
{
styles
.
setting_panel
}
id=
"setting_panel"
>
<
div
className=
{
styles
.
setting_panel_body
}
>
{
children
}
</
div
>
{
footer
?
(
<
div
className=
{
styles
.
setting_panel_footer
}
>
{
footer
}
</
div
>
)
:
(
<
div
className=
{
styles
.
setting_panel_footer
}
>
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
style=
{
{
marginRight
:
8
}
}
onClick=
{
()
=>
onCancel
?
onCancel
()
:
clearSelectedStatus
()
}
>
取消
</
Button
>
<
Button
type=
"primary"
onClick=
{
(
e
)
=>
onOK
?
onOK
(
e
)
:
clearSelectedStatus
()
}
loading=
{
confirmLoading
}
>
确定
</
Button
>
</
div
>
</
div
>
)
}
</
div
>
)
}
export
default
SettingWrap
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment