Commit 0a1f20c2 authored by 田翔's avatar 田翔

fix: 代码修复

parent 17d39cb4
Pipeline #81763 failed with stages
......@@ -26,6 +26,8 @@ const themes = [
{ name: '农饮水主题背景' },
]
const urlArray = []
const Right = () => {
const { shema, setShema } = useContext(GlobalStore)
......@@ -130,14 +132,17 @@ const Right = () => {
const mapTreeMoblie = (org) => {
const haveChildren = Array.isArray(org.children) && org.children.length > 0;
if (!haveChildren && ['flutter', 'MobileGCK'].includes(org?.product)) {
if (!haveChildren && ['flutter'].includes(org?.product)) {
return null
}
if (!haveChildren) {
urlArray.push(org)
}
if (org.key) {
if (haveChildren) {
return (
<TreeNode
value={org.pageUrl || org.menuID}
value={org.menuID}
title={org.text}
icon={org.key ? <MobileOutlined /> : <FolderFilled />}
disabled
......@@ -146,11 +151,11 @@ const Right = () => {
</TreeNode>
);
}
return <TreeNode value={org.pageUrl || org.menuID} title={org.text} icon={<MobileOutlined />} disabled />;
return <TreeNode value={org.menuID} title={org.text} icon={<MobileOutlined />} disabled />;
}
return haveChildren ? (
<TreeNode
value={org.pageUrl || org.menuID}
value={org.menuID}
title={org.text}
icon={org.key ? <MobileOutlined /> : <FolderFilled />}
disabled
......@@ -159,7 +164,7 @@ const Right = () => {
</TreeNode>
) : (
<TreeNode
value={org.pageUrl || org.menuID}
value={org.menuID}
title={org.text}
icon={
org.menuType == 'MiniAppMenuGroup' || org.menuType == 'MiniAppMenuGroupTwo' ? (
......@@ -304,7 +309,10 @@ const Right = () => {
treeDefaultExpandAll
treeIcon
// onSearch={(value) => cardSettingOther(value, 'url')}
onChange={(value) => cardSettingOther(value, 'url')}
onChange={(value) => {
let item = urlArray.find(v => v.menuID === value)
cardSettingOther(item.product + item.pageUrl, 'url')
}}
>
{moblieList.map(i => mapTreeMoblie(i))}
</TreeSelect>
......
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