Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
ReactWeb5
CivManage
Commits
ecaa9e7e
Commit
ecaa9e7e
authored
Dec 25, 2023
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 颜色修改
parent
84bfdadb
Pipeline
#83480
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
39 deletions
+55
-39
index.js
.../menuconfig/WorkDesign/components/Designer/Right/index.js
+55
-39
No files found.
src/pages/productCenter/mobileConfig/menuconfig/WorkDesign/components/Designer/Right/index.js
View file @
ecaa9e7e
import
React
,
{
useState
,
useContext
,
useMemo
,
useEffect
}
from
'react'
import
styles
from
'./index.less'
import
{
Input
,
Form
,
TreeSelect
,
Switch
,
Modal
,
Space
,
Button
,
Popover
,
Upload
}
from
'antd'
import
{
Input
,
Form
,
TreeSelect
,
Switch
,
Modal
,
Space
,
Button
,
Popover
,
Upload
,
Popconfirm
}
from
'antd'
import
{
SketchPicker
}
from
'react-color'
import
{
GlobalStore
}
from
'../index'
import
{
getMenuInfo
,
getMiniAppModuleTree
}
from
'@/services/mobileConfig/api'
import
{
...
...
@@ -28,7 +29,7 @@ const themeStyles = [
{
name
:
'企业版'
},
]
const
backgrounds
=
[
'#
FFFFFF'
,
'#EBE1FF'
,
'#E3EAFF'
,
'#DCF3FE'
,
'#DBF4D4'
,
'#FCEAD1'
,
'#FBE2E1
'
]
const
backgrounds
=
[
'#
daebfe'
,
'#FCEAD1'
,
'#f1feed'
,
'#e3ecfe'
,
'#e4fffa
'
]
const
themes
=
[
{
name
:
'供水主题背景'
},
...
...
@@ -371,10 +372,6 @@ const Right = () => {
)
}
// useEffect(() => {
// setShema({ ...shema, carousel: { ...carousel, imgUrls: showList.map(v => v.sourcePath) } })
// }, [shema.carousel])
useEffect
(()
=>
{
getData
()
//初始增加一个供水主题
...
...
@@ -433,41 +430,60 @@ const Right = () => {
</div>
<div className={styles.group}>
<div className={styles['
g
-
title
']}>主题色设置</div>
<div className={styles.mimGroup}>使用背景色</div>
<div className={styles['
g
-
content
']}>
<div className={styles['
c
-
background
']}>
{
backgrounds.map(v => {
return (
<div
className={styles['
d
-
item
']}
style={{ background: v }}
onClick={() => setShema({ ...shema, background: v })}
>
{shema.background === v && <CheckOutlined style={{ fontSize: '
14
px
', fontWeight: '
bold
', color: '
#
3594
FF
' }} />}
</div>
)
})
}
<div style={{ width: '
100
%
', display: themeStyle === '
企业版
' ? '
block
' : '
none
' }}>
<div className={styles.mimGroup}>使用背景色</div>
<div className={styles['
g
-
content
']}>
<div className={styles['
c
-
background
']}>
{
backgrounds.map(v => {
return (
<div
className={styles['
d
-
item
']}
style={{ background: v }}
onClick={() => setShema({ ...shema, background: v })}
>
{shema.background === v && <CheckOutlined style={{ fontSize: '
14
px
', fontWeight: '
bold
', color: '
#
3594
FF
' }} />}
</div>
)
})
}
<Popconfirm
placement="topLeft"
icon={false}
title={
<SketchPicker
width="217px"
color={shema.background}
onChange={(e) => setShema({ ...shema, background: e.hex })}
/>
}
>
<div className={styles['
d
-
item
']} style={{ background: backgrounds.includes(shema.background) ? '
#
FFFFFF
' : shema.background }}>
{!backgrounds.includes(shema.background) && <CheckOutlined style={{ fontSize: '
14
px
', fontWeight: '
bold
', color: '
#
3594
FF
' }} />}
</div>
</Popconfirm>
</div>
</div>
</div>
<div className={styles.mimGroup}>使用背景图</div>
<div className={styles['
g
-
content
']}>
<div className={styles['
c
-
backImg
']}>
{
themes.map(v => {
return (
<div
className={styles['
c
-
center
']}
onClick={() => changeThemes(v)}
key={v.name}
>
<div className={styles['
c
-
img
']} ative={`${v.name === shema.theme}`} name={v.name}></div>
<div className={styles['
c
-
text
']} ative={`${v.name === shema.theme}`}>{v.name}</div>
</div>
)
})
}
<div style={{ width: '
100
%
', display: themeStyle === '
个人版
' ? '
block
' : '
none
' }}>
<div className={styles.mimGroup}>使用背景图</div>
<div className={styles['
g
-
content
']}>
<div className={styles['
c
-
backImg
']}>
{
themes.map(v => {
return (
<div
className={styles['
c
-
center
']}
onClick={() => changeThemes(v)}
key={v.name}
>
<div className={styles['
c
-
img
']} ative={`${v.name === shema.theme}`} name={v.name}></div>
<div className={styles['
c
-
text
']} ative={`${v.name === shema.theme}`}>{v.name}</div>
</div>
)
})
}
</div>
</div>
</div>
</div>
...
...
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