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
d8cdec6b
Commit
d8cdec6b
authored
Nov 17, 2023
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 代码优化
parent
c4e973a5
Pipeline
#81838
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
index.js
.../menuconfig/WorkDesign/components/Designer/Right/index.js
+26
-18
No files found.
src/pages/productCenter/mobileConfig/menuconfig/WorkDesign/components/Designer/Right/index.js
View file @
d8cdec6b
import
React
,
{
useState
,
useContext
,
useMemo
,
useEffect
}
from
'react'
import
styles
from
'./index.less'
import
{
Input
,
Form
,
TreeSelect
,
Switch
,
Modal
,
Space
,
Button
}
from
'antd'
import
{
Input
,
Form
,
TreeSelect
,
Switch
,
Modal
,
Space
,
Button
,
Popover
}
from
'antd'
import
{
GlobalStore
}
from
'../index'
import
{
getMenuInfo
,
getMiniAppModuleTree
}
from
'@/services/mobileConfig/api'
import
{
...
...
@@ -19,6 +19,7 @@ import { getImageBases } from '@/services/common/api'
import
PicturesWall
from
'@/components/Upload/index'
const
{
TreeNode
}
=
TreeSelect
const
{
TextArea
}
=
Input
const
themes
=
[
{
name
:
'供水主题背景'
},
...
...
@@ -220,6 +221,25 @@ const Right = () => {
setParamShow
(
false
)
}
const
content
=
(
<
TreeSelect
showSearch
treeNodeFilterProp
=
"title"
style
=
{{
width
:
'280px'
}}
dropdownStyle
=
{{
maxHeight
:
400
,
overflow
:
'auto'
}}
placeholder
=
"请选择功能路径"
allowClear
treeDefaultExpandAll
treeIcon
onChange
=
{(
value
)
=>
{
let
item
=
urlArray
.
find
(
v
=>
v
.
menuID
===
value
)
cardSettingOther
(
item
.
product
+
item
.
pageUrl
,
'url'
)
}}
>
{
moblieList
.
map
(
i
=>
mapTreeMoblie
(
i
))}
<
/TreeSelect
>
)
useEffect
(()
=>
{
getData
()
//初始增加一个供水主题
...
...
@@ -298,24 +318,12 @@ const Right = () => {
}
<
/Form.Item
>
<
Form
.
Item
label
=
"功能跳转"
name
=
"url"
>
<
TreeSelect
showSearch
treeNodeFilterProp
=
"title"
style
=
{{
width
:
'97%'
}}
value
=
{
card
.
url
}
dropdownStyle
=
{{
maxHeight
:
400
,
overflow
:
'auto'
}}
placeholder
=
"请选择功能路径"
allowClear
treeDefaultExpandAll
treeIcon
// onSearch={(value) => cardSettingOther(value, 'url')}
onChange
=
{(
value
)
=>
{
let
item
=
urlArray
.
find
(
v
=>
v
.
menuID
===
value
)
cardSettingOther
(
item
.
product
+
item
.
pageUrl
,
'url'
)
}}
<
Popover
content
=
{
content
}
trigger
=
"click"
>
{
moblieList
.
map
(
i
=>
mapTreeMoblie
(
i
))}
<
/
TreeSelect
>
<
TextArea
value
=
{
card
.
url
}
onChange
=
{
e
=>
cardSettingOther
(
e
.
target
.
value
,
'url'
)}
rows
=
{
4
}
/
>
<
/
Popover
>
<
/Form.Item
>
<
Form
.
Item
label
=
"卡片参数"
name
=
"param"
>
<
Input
value
=
{
card
.
param
}
onClick
=
{
paramShowChange
}
/
>
...
...
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