7 changed files with 70 additions and 23 deletions
@ -1,6 +1,31 @@ |
|||
# 有源标靶上位机软件 |
|||
|
|||
## 快速开始 |
|||
|
|||
### 安装 |
|||
|
|||
1. 克隆仓库 |
|||
|
|||
```bash |
|||
git clone https://gitea.anxinyun.cn/qinjian/FlexometerSetup.git |
|||
``` |
|||
|
|||
2. 安装依赖 |
|||
|
|||
```bash |
|||
cd FlexometerSetup |
|||
npm install |
|||
``` |
|||
|
|||
3. 开发 |
|||
|
|||
```bash |
|||
npm run dev |
|||
``` |
|||
|
|||
4. 打包应用 |
|||
|
|||
```bash |
|||
npm run build:目标平台 |
|||
# 目标平台可选:win32, linux, mac详见 package.json |
|||
``` |
|||
|
@ -1,17 +1,30 @@ |
|||
import { Button } from 'antd' |
|||
function App() { |
|||
const ipcHandle = () => window.electron.ipcRenderer.send('ping') |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<h1>Hello Electron + antd!</h1> |
|||
<Button type="primary" onClick={ipcHandle}> |
|||
Antd Button send Ping to Main |
|||
</Button> |
|||
</div> |
|||
</> |
|||
) |
|||
import { Layout } from 'antd' |
|||
const { Sider, Content } = Layout |
|||
const contentStyle = { |
|||
textAlign: 'center', |
|||
minHeight: 'calc(100vh - 20px)', |
|||
color: '#fff', |
|||
backgroundColor: '#0958d9' |
|||
} |
|||
|
|||
const siderStyle = { |
|||
textAlign: 'center', |
|||
color: '#fff', |
|||
backgroundColor: '#1677ff' |
|||
} |
|||
const layoutStyle = { |
|||
borderRadius: 8, |
|||
overflow: 'hidden', |
|||
width: 'calc(100% - 8px)', |
|||
maxWidth: 'calc(100% - 8px)' |
|||
} |
|||
const App = () => ( |
|||
<Layout style={layoutStyle}> |
|||
<Sider width={'20%'} style={siderStyle}> |
|||
Sider |
|||
</Sider> |
|||
<Layout> |
|||
<Content style={contentStyle}>Content</Content> |
|||
</Layout> |
|||
</Layout> |
|||
) |
|||
export default App |
|||
|
Loading…
Reference in new issue