🆕 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))"
],
"scripts": {
"start": "umi dev",
"build": "umi build",
"start": "export NODE_OPTIONS=--openssl-legacy-provider && umi dev -- editor",
"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",
"dev": "http-server dist",
"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)
- [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 智图](https://magic.dooring.vip)
## Author

View File

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