🆕 support nodejs20+ and imrpove entry config

This commit is contained in:
xujiang 2024-08-06 16:48:03 +08:00
parent afc1c9112b
commit a3c482ae1d
4 changed files with 121 additions and 49 deletions

View File

@ -22,8 +22,10 @@
"yehuozhili <yehuozhili@outlook.com> (https://github.com/yehuozhili))" "yehuozhili <yehuozhili@outlook.com> (https://github.com/yehuozhili))"
], ],
"scripts": { "scripts": {
"start": "umi dev", "start": "export NODE_OPTIONS=--openssl-legacy-provider && umi dev -- editor",
"build": "umi build", "start:win": "set NODE_OPTIONS=--openssl-legacy-provider && umi dev -- editor",
"build": "export NODE_OPTIONS=--openssl-legacy-provider && umi build",
"build:win": "set NODE_OPTIONS=--openssl-legacy-provider && umi build",
"server": "node server.js", "server": "node server.js",
"dev": "http-server dist", "dev": "http-server dist",
"docs:dev": "vuepress dev doc", "docs:dev": "vuepress dev doc",

View File

@ -36,8 +36,9 @@ Related products:
- [V6.Dooring | Large screen visual editor](https://github.com/MrXujiang/v6.dooring.public) - [V6.Dooring | Large screen visual editor](https://github.com/MrXujiang/v6.dooring.public)
- [dooring-electron-lowcode | Dooring desktop software](https://github.com/MrXujiang/dooring-electron-lowcode) - [dooring-electron-lowcode | Dooring desktop software](https://github.com/MrXujiang/dooring-electron-lowcode)
- [Lowcode community](http://lowcode.dooring.cn) - [Nocode/WEP](http://doc.dooring.vip)
- [Dooring-Saas](https://dooring.vip) - [Dooring-Saas](https://dooring.vip)
- [Dooring 智图](https://magic.dooring.vip)
## Author ## Author

View File

@ -2,9 +2,27 @@
display: flex; display: flex;
height: 100%; height: 100%;
.leftArea { .leftArea {
padding: 10px 0 10px 20px; width: 270px;
// width: 320px; height: 100%;
border-right: 1px solid #f0f0f0; background-color: #fff;
padding: 26px 0 40px;
.bottomArea {
margin-top: 232px;
text-align: center;
.groupWrap {
.groupItem {
margin-bottom: 10px;
font-size: 12px;
span {
margin-left: 3px;
display: inline-block;
padding: 2px 5px;
border: 1px solid #2f54eb;
cursor: pointer;
}
}
}
}
} }
.contentArea { .contentArea {
flex: 1; flex: 1;
@ -60,3 +78,28 @@
} }
} }
} }
.menuWrap,
.vcWrap {
background-color: #fff;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
border-radius: 3px;
text-align: center;
.menuItem {
height: 38px;
line-height: 38px;
text-align: center;
cursor: pointer;
&:hover {
color: #fff;
background-color: #2f54eb;
}
}
img {
width: 160px;
}
p {
text-align: center;
color: #ccc;
}
}

View File

@ -1,65 +1,91 @@
import React from "react"; import React from "react";
import { Tabs, message } from "antd"; import { message, Dropdown, Button } from "antd";
import { history } from "umi"; import { history } from "umi";
import { import {
MobileOutlined, MobileOutlined,
ConsoleSqlOutlined, ConsoleSqlOutlined,
CodeOutlined, CodeOutlined,
IdcardOutlined RobotOutlined,
FileImageOutlined
} from "@ant-design/icons"; } from "@ant-design/icons";
import Zan from "@/components/Zan"; import Zan from "@/components/Zan";
import styles from "./index.less"; import styles from "./index.less";
const { TabPane } = Tabs;
const Home = () => { const Home = () => {
const handleGo = (type: string) => { const handleGo = (type: string) => {
if (type === "H5") { if (type === "H5") {
history.push("/editor?tid=123456"); history.push("/editor?tid=123456");
} else if (type === "PC") { } else if (type === "Doc") {
window.open("https://v6.dooring.vip/beta"); window.open("http://doc.dooring.vip");
} else if (type === "mitu") {
window.open("https://magic.dooring.vip");
} else { } else {
history.push("/ide"); history.push("/ide");
} }
}; };
const menu = (
<div className={styles.menuWrap}>
<div className={styles.menuItem} onClick={() => handleGo("H5")}>
<MobileOutlined /> H5
</div>
<div className={styles.menuItem} onClick={() => handleGo("Doc")}>
<ConsoleSqlOutlined /> {" "}
</div>
<div className={styles.menuItem} onClick={() => handleGo("online")}>
<RobotOutlined /> 线{" "}
</div>
<div className={styles.menuItem} onClick={() => handleGo("mitu")}>
<FileImageOutlined /> {" "}
</div>
</div>
);
return ( return (
<div className={styles.homeWrap}> <div className={styles.homeWrap}>
<div className={styles.leftArea}> <div className={styles.leftArea}>
<Tabs defaultActiveKey="1"> <Dropdown overlay={menu} placement="bottomCenter" arrow visible>
<TabPane <Button type="primary" block size="large">
tab={
<span> </Button>
<MobileOutlined /> </Dropdown>
H5 <div className={styles.bottomArea}>
</span> <div>
} <img
key="1" src="http://cdn.dooring.cn/dr/R-C.gif"
> alt=""
... style={{ width: "180px", marginBottom: "20px" }}
</TabPane> />
<TabPane </div>
tab={ <div className={styles.groupWrap}>
<span> <div className={styles.groupItem}>
<ConsoleSqlOutlined /> dooring低代码交流群500人 <span></span>
</div>
</span> <div className={styles.groupItem} style={{ color: "#2F54EB" }}>
} ,
key="2" <Dropdown
> overlay={
... <div className={styles.group}>
</TabPane> <img
<TabPane src="https://cdn.dooring.cn/dr/dooring.jpeg"
tab={ style={{ width: "180px", marginBottom: "20px" }}
<span> alt=""
<IdcardOutlined /> />
</div>
</span> }
} placement="bottomCenter"
key="3" >
> <span></span>
... </Dropdown>
</TabPane> </div>
</Tabs> <h3></h3>
<div style={{ textAlign: "center" }}>
<img
src="http://cdn.dooring.cn/dr%2Fcode1.png"
style={{ width: "152px" }}
alt=""
/>
</div>
</div>
</div>
</div> </div>
<div className={styles.contentArea}> <div className={styles.contentArea}>
<div className={styles.logoTip}> <div className={styles.logoTip}>
@ -91,9 +117,9 @@ const Home = () => {
<CodeOutlined /> <CodeOutlined />
<div>线</div> <div>线</div>
</div> </div>
<div className={styles.card} onClick={() => handleGo("PC")}> <div className={styles.card} onClick={() => handleGo("mitu")}>
<ConsoleSqlOutlined /> <ConsoleSqlOutlined />
<div></div> <div></div>
</div> </div>
</div> </div>
<footer className={styles.footer}> <footer className={styles.footer}>