Commit 16dc25ca authored by rocosen's avatar rocosen

feat:mui

parent 81033937
...@@ -108,6 +108,9 @@ ...@@ -108,6 +108,9 @@
} }
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@mui/material": "^5.10.8",
"electron-debug": "^3.2.0", "electron-debug": "^3.2.0",
"electron-log": "^4.4.8", "electron-log": "^4.4.8",
"electron-root-path": "^1.1.0", "electron-root-path": "^1.1.0",
......
...@@ -2,6 +2,7 @@ import { MemoryRouter as Router, Routes, Route } from 'react-router-dom'; ...@@ -2,6 +2,7 @@ import { MemoryRouter as Router, Routes, Route } from 'react-router-dom';
import icon from '../../assets/icon.svg'; import icon from '../../assets/icon.svg';
import './App.css'; import './App.css';
import path from 'path'; import path from 'path';
import { Button } from '@mui/material';
const rootPath = require('electron-root-path').rootPath; const rootPath = require('electron-root-path').rootPath;
const { shell } = require('electron') const { shell } = require('electron')
const location = path.join(rootPath.substring(0, rootPath.length - 8), './assets/bat/mount.bat'); const location = path.join(rootPath.substring(0, rootPath.length - 8), './assets/bat/mount.bat');
...@@ -14,14 +15,20 @@ const Hello = () => { ...@@ -14,14 +15,20 @@ const Hello = () => {
</div> </div>
<h1>electron-react</h1> <h1>electron-react</h1>
<div className="Hello"> <div className="Hello">
<button type="button" onClick={()=>{
<Button variant="contained" onClick={()=>{
shell.openPath(location); shell.openPath(location);
}} > }} >
挂载
</Button>
{/* <button type="button" >
<span role="img" aria-label="books"> <span role="img" aria-label="books">
🙏 🙏
</span> </span>
挂载 挂载
</button> </button> */}
</div> </div>
</div> </div>
); );
......
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