Browse Source

添加主TAB

master
zhangjiming 5 months ago
parent
commit
94eee67c37
  1. 38
      src/App.css
  2. 9
      src/App.test.tsx
  3. 85
      src/App.tsx
  4. 1
      src/assets/tabIcon/icon_tab1_s.svg
  5. 1
      src/assets/tabIcon/icon_tab1_u.svg
  6. 1
      src/assets/tabIcon/icon_tab2_s.svg
  7. 1
      src/assets/tabIcon/icon_tab2_u.svg
  8. 1
      src/assets/tabIcon/icon_tab3_s.svg
  9. 1
      src/assets/tabIcon/icon_tab3_u.svg
  10. 1
      src/assets/tabIcon/icon_tab4_s.svg
  11. 1
      src/assets/tabIcon/icon_tab4_u.svg
  12. 16
      src/index.css
  13. 47
      src/index.tsx
  14. 1
      src/logo.svg
  15. 10
      src/pages/Bluetooth.tsx
  16. 10
      src/pages/Measure.tsx
  17. 14
      src/pages/MeasureSave.tsx
  18. 10
      src/pages/Mine.tsx
  19. 10
      src/pages/Setting.tsx

38
src/App.css

@ -1,38 +0,0 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

9
src/App.test.tsx

@ -1,9 +0,0 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

85
src/App.tsx

@ -1,24 +1,77 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import { Outlet, useLocation, useNavigate } from 'react-router';
import { NavBar, SafeArea, TabBar } from 'antd-mobile';
import icon_1_s from './assets/tabIcon/icon_tab1_s.svg';
import icon_1_u from './assets/tabIcon/icon_tab1_u.svg';
import icon_2_s from './assets/tabIcon/icon_tab2_s.svg';
import icon_2_u from './assets/tabIcon/icon_tab2_u.svg';
import icon_3_s from './assets/tabIcon/icon_tab3_s.svg';
import icon_3_u from './assets/tabIcon/icon_tab3_u.svg';
import icon_4_s from './assets/tabIcon/icon_tab4_s.svg';
import icon_4_u from './assets/tabIcon/icon_tab4_u.svg';
const BottomBar = () => {
const navigate = useNavigate();
const location = useLocation();
const { pathname } = location;
const setRouteActive = (value: string) => {
navigate(value);
};
const tabs = [
{
key: '/home/measure',
title: '首页',
icon_s: icon_1_s,
icon_n: icon_1_u,
},
{
key: '/home/setting',
title: '设置',
icon_s: icon_2_s,
icon_n: icon_2_u,
},
{
key: '/home/bluetooth',
title: '蓝牙',
icon_s: icon_3_s,
icon_n: icon_3_u,
},
{
key: '/home/mine',
title: '我的',
icon_s: icon_4_s,
icon_n: icon_4_u,
},
];
return (
<TabBar activeKey={pathname} onChange={value => setRouteActive(value)}>
{tabs.map(item => (
<TabBar.Item
key={item.key}
icon={(active: boolean) =>
active ? <img src={item.icon_s} /> : <img src={item.icon_n} />
}
title={item.title}
/>
))}
</TabBar>
);
};
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<SafeArea position="top" />
<div>
<Outlet />
</div>
<div>
<BottomBar />
</div>
<SafeArea position="bottom" />
</div>
);
}

1
src/assets/tabIcon/icon_tab1_s.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><g><path d="M2.390503,7.97336L3.99209,6.30253L4.9930699999999995,7.3468L3.39149,9.01763L4.39248,10.0619L5.99406,8.28664L6.99505,9.330919999999999L5.393470000000001,11.00175L5.69377,11.83716L10.99901,6.40696L7.39545,2.334311C6.79486,1.812177,5.69377,1.9166036,5.19327,2.543165L1.789909,5.88483C1.289414,6.40696,1.489612,7.13795,1.990107,7.66008L2.390503,7.97336ZM1.990107,21.7577C1.890008,22.1754,2.1903040000000003,22.4887,2.5907,22.3843L8.69674,20.4002L3.99209,15.5965L1.990107,21.7577ZM21.9098,7.24238C22.4103,6.72024,22.4103,5.98925,21.9098,5.4671199999999995L19.0069,2.543165C18.5064,2.0210306,17.7056,2.0210306,17.2051,2.543165L15.1031,4.6317L19.8077,9.33091L21.9098,7.24238ZM14.4024,5.362690000000001L4.69278,14.97L9.39743,19.6692L19.107,9.95748L14.4024,5.362690000000001ZM22.2101,16.9541L17.8057,12.6726L12.4004,17.9983L13.4014,19.0426L15.1031,17.3718L16.104100000000003,18.4161L14.4024,20.0869L15.4034,21.1312L17.105,19.4603L18.106,20.5046L16.404400000000003,22.1754L16.704700000000003,22.4887C17.2051,23.0108,18.0059,23.2197,18.6065,22.6976L22.0099,19.3559C22.5104,18.6249,22.7106,17.4762,22.2101,16.9541Z" fill="#3165D2" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></g></svg>

1
src/assets/tabIcon/icon_tab1_u.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><g><g><path d="M2.390503,7.97336L3.99209,6.30253L4.9930699999999995,7.3468L3.39149,9.01763L4.39248,10.0619L5.99406,8.28664L6.99505,9.330919999999999L5.393470000000001,11.00175L5.69377,11.83716L10.99901,6.40696L7.39545,2.334311C6.79486,1.812177,5.69377,1.9166036,5.19327,2.543165L1.789909,5.88483C1.289414,6.40696,1.489612,7.13795,1.990107,7.66008L2.390503,7.97336ZM1.990107,21.7577C1.890008,22.1754,2.1903040000000003,22.4887,2.5907,22.3843L8.69674,20.4002L3.99209,15.5965L1.990107,21.7577ZM21.9098,7.24238C22.4103,6.72024,22.4103,5.98925,21.9098,5.4671199999999995L19.0069,2.543165C18.5064,2.0210306,17.7056,2.0210306,17.2051,2.543165L15.1031,4.6317L19.8077,9.33091L21.9098,7.24238ZM14.4024,5.362690000000001L4.69278,14.97L9.39743,19.6692L19.107,9.95748L14.4024,5.362690000000001ZM22.2101,16.9541L17.8057,12.6726L12.4004,17.9983L13.4014,19.0426L15.1031,17.3718L16.104100000000003,18.4161L14.4024,20.0869L15.4034,21.1312L17.105,19.4603L18.106,20.5046L16.404400000000003,22.1754L16.704700000000003,22.4887C17.2051,23.0108,18.0059,23.2197,18.6065,22.6976L22.0099,19.3559C22.5104,18.6249,22.7106,17.4762,22.2101,16.9541Z" fill="#666666" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></g></g></svg>

1
src/assets/tabIcon/icon_tab2_s.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_378"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_378)"><g><path d="M22.5362,14.4688L20.755,13.1188C20.7738,12.9313,20.7925,12.725,20.7925,12.5C20.7925,12.275,20.7738,12.0688,20.755,11.88125L22.5362,10.53125C23.0238,10.15625,23.155,9.5,22.8363,8.9375L20.8487,5.58125C20.6238,5.1875,20.1925,4.94375,19.7425,4.94375C19.5925,4.94375,19.4613,4.9625,19.3112,5.01875L17.192500000000003,5.84375C16.836199999999998,5.6,16.461199999999998,5.39375,16.086199999999998,5.225L15.7675,3.06875C15.6737,2.45,15.1487,2,14.5113,2L10.49875,2C9.86125,2,9.33625,2.45,9.2425,3.05L8.942499999999999,5.225C8.567499999999999,5.39375,8.21125,5.6,7.83625,5.84375L5.717499999999999,5.01875C5.5675,4.9625,5.4175,4.94375,5.2675,4.94375C4.8175,4.94375,4.38625,5.16875,4.18,5.5625L2.17375,8.9375C1.855,9.4625,1.9862498,10.15625,2.47375,10.53125L4.255,11.88125C4.23625,12.1063,4.217499999999999,12.3125,4.217499999999999,12.5C4.217499999999999,12.6875,4.217499999999999,12.8937,4.255,13.1188L2.47375,14.4688C1.9862499,14.8438,1.855,15.5,2.17375,16.0625L4.16125,19.4188C4.38625,19.8125,4.8175,20.0563,5.2675,20.0563C5.4175,20.0563,5.54875,20.0375,5.69875,19.9813L7.8175,19.1562C8.17375,19.4,8.54875,19.6063,8.92375,19.775L9.2425,21.9313C9.317499999999999,22.5312,9.86125,23,10.49875,23L14.5112,23C15.1487,23,15.6737,22.55,15.7675,21.95L16.086199999999998,19.775C16.461199999999998,19.6063,16.817500000000003,19.4,17.192500000000003,19.1562L19.3112,19.9813C19.4613,20.0375,19.6112,20.0563,19.7612,20.0563C20.2113,20.0563,20.6425,19.8313,20.8487,19.4375L22.855,16.043799999999997C23.155,15.5,23.0238,14.8438,22.5362,14.4688ZM17.005000000000003,12.5C17.005000000000003,14.975,14.98,17,12.505,17C10.03,17,8.004999999999999,14.975,8.004999999999999,12.5C8.004999999999999,10.025,10.03,8,12.505,8C14.98,8,17.005000000000003,10.025,17.005000000000003,12.5Z" fill="#3165D2" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

1
src/assets/tabIcon/icon_tab2_u.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_909"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_909)"><g><path d="M22.5362,14.4688L20.755,13.1188C20.7738,12.9313,20.7925,12.725,20.7925,12.5C20.7925,12.275,20.7738,12.0688,20.755,11.88125L22.5362,10.53125C23.0238,10.15625,23.155,9.5,22.8363,8.9375L20.8487,5.58125C20.6238,5.1875,20.1925,4.94375,19.7425,4.94375C19.5925,4.94375,19.4613,4.9625,19.3112,5.01875L17.192500000000003,5.84375C16.836199999999998,5.6,16.461199999999998,5.39375,16.086199999999998,5.225L15.7675,3.06875C15.6737,2.45,15.1487,2,14.5113,2L10.49875,2C9.86125,2,9.33625,2.45,9.2425,3.05L8.942499999999999,5.225C8.567499999999999,5.39375,8.21125,5.6,7.83625,5.84375L5.717499999999999,5.01875C5.5675,4.9625,5.4175,4.94375,5.2675,4.94375C4.8175,4.94375,4.38625,5.16875,4.18,5.5625L2.17375,8.9375C1.855,9.4625,1.9862498,10.15625,2.47375,10.53125L4.255,11.88125C4.23625,12.1063,4.217499999999999,12.3125,4.217499999999999,12.5C4.217499999999999,12.6875,4.217499999999999,12.8937,4.255,13.1188L2.47375,14.4688C1.9862499,14.8438,1.855,15.5,2.17375,16.0625L4.16125,19.4188C4.38625,19.8125,4.8175,20.0563,5.2675,20.0563C5.4175,20.0563,5.54875,20.0375,5.69875,19.9813L7.8175,19.1562C8.17375,19.4,8.54875,19.6063,8.92375,19.775L9.2425,21.9313C9.317499999999999,22.5312,9.86125,23,10.49875,23L14.5112,23C15.1487,23,15.6737,22.55,15.7675,21.95L16.086199999999998,19.775C16.461199999999998,19.6063,16.817500000000003,19.4,17.192500000000003,19.1562L19.3112,19.9813C19.4613,20.0375,19.6112,20.0563,19.7612,20.0563C20.2113,20.0563,20.6425,19.8313,20.8487,19.4375L22.855,16.043799999999997C23.155,15.5,23.0238,14.8438,22.5362,14.4688ZM17.005000000000003,12.5C17.005000000000003,14.975,14.98,17,12.505,17C10.03,17,8.004999999999999,14.975,8.004999999999999,12.5C8.004999999999999,10.025,10.03,8,12.505,8C14.98,8,17.005000000000003,10.025,17.005000000000003,12.5Z" fill="#666666" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

1
src/assets/tabIcon/icon_tab3_s.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_482"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_482)"><g><path d="M17.8801953125,22.886994140625L6.0601953125,22.886994140625C3.3751953125,22.886994140625,1.2001953125,20.711994140625,1.2001953125,18.026994140625L1.2001953125,6.203994140625C1.2001953125,3.518994140625,3.3751953125,1.343994498253,6.0601953125,1.343994498253L17.8801953125,1.343994498253C20.5651953125,1.343994498253,22.7401953125,3.518994140625,22.7401953125,6.203994140625L22.7401953125,18.026994140625C22.7401953125,20.711994140625,20.5651953125,22.886994140625,17.8801953125,22.886994140625Z" fill="#3165D2" fill-opacity="1" style="mix-blend-mode:passthrough"/></g><g><path d="M15.738067578125001,9.02396833984375L12.021067578124999,5.36096733984375C11.724067578125,5.06696733984375,11.220067578125,5.27996743984375,11.220067578125,5.69696733984375L11.220067578125,10.29296833984375L8.874068578125,8.09096833984375C8.841068578125,8.05796833984375,8.787068578125,8.06096833984375,8.754068578125,8.09396833984375L8.085068478125,8.80496833984375C8.052068708125,8.83796833984375,8.055068488125,8.89196833984375,8.088068278125,8.92496833984375L11.220067578125,11.864968339843749L11.220067578125,12.30596833984375L8.091068078125,15.21596833984375C8.058068278125,15.24894833984375,8.055067778125,15.30294833984375,8.088068278125,15.33594833984375L8.754067578125,16.049948339843752C8.787067578125,16.08294833984375,8.841067578125,16.08594833984375,8.874067578125,16.052948339843752L11.223067578125,13.86896833984375L11.223067578125,18.53094833984375C11.223067578125,18.947948339843748,11.727067578125,19.16094833984375,12.024067578124999,18.866948339843752L15.738067578125001,15.20996833984375C15.924067578125001,15.02696833984375,15.924067578125001,14.72396833984375,15.738067578125001,14.53796833984375L13.620067578125,12.45296833984375C13.434067578125,12.26996833984375,13.434067578125,11.96696833984375,13.620067578125,11.78096833984375L15.738067578125001,9.69296833984375C15.927067578125001,9.50996833984375,15.927067578125001,9.20696833984375,15.738067578125001,9.02396833984375ZM12.366067578125,7.31096833984375L14.418067578125001,9.332968339843749L12.378067578125,11.22896833984375L12.366067578125,11.21696833984375L12.366067578125,7.31096833984375ZM12.366067578125,13.01396833984375L12.405067578125,12.97796833984375L14.436067578125,14.88296833984375L12.369067578125,16.91994833984375L12.369067578125,13.01396833984375L12.366067578125,13.01396833984375Z" fill="#FFFFFF" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

1
src/assets/tabIcon/icon_tab3_u.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_1219"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_1219)"><g><path d="M17.8801953125,22.886994140625L6.0601953125,22.886994140625C3.3751953125,22.886994140625,1.2001953125,20.711994140625,1.2001953125,18.026994140625L1.2001953125,6.203994140625C1.2001953125,3.518994140625,3.3751953125,1.343994498253,6.0601953125,1.343994498253L17.8801953125,1.343994498253C20.5651953125,1.343994498253,22.7401953125,3.518994140625,22.7401953125,6.203994140625L22.7401953125,18.026994140625C22.7401953125,20.711994140625,20.5651953125,22.886994140625,17.8801953125,22.886994140625Z" fill="#666666" fill-opacity="1" style="mix-blend-mode:passthrough"/></g><g><path d="M15.738067578125001,9.02396833984375L12.021067578124999,5.36096733984375C11.724067578125,5.06696733984375,11.220067578125,5.27996743984375,11.220067578125,5.69696733984375L11.220067578125,10.29296833984375L8.874068578125,8.09096833984375C8.841068578125,8.05796833984375,8.787068578125,8.06096833984375,8.754068578125,8.09396833984375L8.085068478125,8.80496833984375C8.052068708125,8.83796833984375,8.055068488125,8.89196833984375,8.088068278125,8.92496833984375L11.220067578125,11.864968339843749L11.220067578125,12.30596833984375L8.091068078125,15.21596833984375C8.058068278125,15.24894833984375,8.055067778125,15.30294833984375,8.088068278125,15.33594833984375L8.754067578125,16.049948339843752C8.787067578125,16.08294833984375,8.841067578125,16.08594833984375,8.874067578125,16.052948339843752L11.223067578125,13.86896833984375L11.223067578125,18.53094833984375C11.223067578125,18.947948339843748,11.727067578125,19.16094833984375,12.024067578124999,18.866948339843752L15.738067578125001,15.20996833984375C15.924067578125001,15.02696833984375,15.924067578125001,14.72396833984375,15.738067578125001,14.53796833984375L13.620067578125,12.45296833984375C13.434067578125,12.26996833984375,13.434067578125,11.96696833984375,13.620067578125,11.78096833984375L15.738067578125001,9.69296833984375C15.927067578125001,9.50996833984375,15.927067578125001,9.20696833984375,15.738067578125001,9.02396833984375ZM12.366067578125,7.31096833984375L14.418067578125001,9.332968339843749L12.378067578125,11.22896833984375L12.366067578125,11.21696833984375L12.366067578125,7.31096833984375ZM12.366067578125,13.01396833984375L12.405067578125,12.97796833984375L14.436067578125,14.88296833984375L12.369067578125,16.91994833984375L12.369067578125,13.01396833984375L12.366067578125,13.01396833984375Z" fill="#FFFFFF" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

1
src/assets/tabIcon/icon_tab4_s.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_544"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_544)"><g><path d="M17.85,14.85C16.35,16.2,14.4,17.1,12.15,17.1C9.9,17.1,7.95,16.2,6.3,14.85C2.55,16.8,0,19.35,0,24L24,24C24,19.35,21.45,16.95,17.85,14.85ZM12,15.3C15.75,15.3,18.75,12.15,18.75,8.4C18.75,4.65,15.75,1.5,12,1.5C8.25,1.5,5.25,4.65,5.25,8.4C5.25,12.3,8.4,15.3,12,15.3Z" fill="#3165D2" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

1
src/assets/tabIcon/icon_tab4_u.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_2_393"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_2_393)"><g><path d="M17.85,14.85C16.35,16.2,14.4,17.1,12.15,17.1C9.9,17.1,7.95,16.2,6.3,14.85C2.55,16.8,0,19.35,0,24L24,24C24,19.35,21.45,16.95,17.85,14.85ZM12,15.3C15.75,15.3,18.75,12.15,18.75,8.4C18.75,4.65,15.75,1.5,12,1.5C8.25,1.5,5.25,4.65,5.25,8.4C5.25,12.3,8.4,15.3,12,15.3Z" fill="#666666" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

16
src/index.css

@ -2,6 +2,22 @@
@tailwind components;
@tailwind utilities;
:root {
--primaryColor: #3e63cb;
--tabBarHeight: 50px;
--navBarHeight: 45px;
}
@layer utilities {
.main-page-content {
height: calc(100vh - var(--navBarHeight));
background-color: #f5f6fa;
}
.home-page-content {
height: calc(100vh - var(--tabBarHeight) - var(--navBarHeight));
background-color: #f5f6fa;
}
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',

47
src/index.tsx

@ -3,13 +3,57 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import {
createHashRouter,
Navigate,
RouterProvider,
} from "react-router-dom";
import Measure from './pages/Measure';
import Setting from './pages/Setting';
import Bluetooth from './pages/Bluetooth';
import Mine from './pages/Mine';
import MeasureSave from './pages/MeasureSave';
const router = createHashRouter([
{
path: "/",
element: <Navigate to="/home/measure" />
},
{
path: "/home",
element: <App />,
children: [
{
path: "measure",
element: <Measure />
},
{
path: "setting",
element: <Setting />
},
{
path: "bluetooth",
element: <Bluetooth />
},
{
path: "mine",
element: <Mine />
}
]
},
{
path: "/measure/save",
element: <MeasureSave />
}
]);
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<App />
<RouterProvider router={router} />
</React.StrictMode>
);
@ -17,3 +61,4 @@ root.render(
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

1
src/logo.svg

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>

10
src/pages/Bluetooth.tsx

@ -0,0 +1,10 @@
import { NavBar } from 'antd-mobile';
export default function Bluetooth() {
return (
<div>
<NavBar className='bg-white' back={null}></NavBar>
<div className="home-page-content">Bluetooth</div>
</div>
);
}

10
src/pages/Measure.tsx

@ -0,0 +1,10 @@
import { NavBar } from 'antd-mobile';
export default function Measure() {
return (
<div>
<NavBar className='bg-white' back={null}></NavBar>
<div className="home-page-content">Measure</div>
</div>
);
}

14
src/pages/MeasureSave.tsx

@ -0,0 +1,14 @@
import { NavBar } from "antd-mobile";
import { useNavigate } from "react-router";
export default function MeasureSave() {
const navigate = useNavigate()
const back = () => navigate(-1);
return (
<div>
<NavBar className='bg-white' onBack={back}></NavBar>
<div className="main-page-content">MeasureSave</div>
</div>
);
}

10
src/pages/Mine.tsx

@ -0,0 +1,10 @@
import { NavBar } from "antd-mobile";
export default function Mine() {
return (
<div>
<NavBar className='bg-white' back={null}></NavBar>
<div className="home-page-content">Mine</div>
</div>
);
}

10
src/pages/Setting.tsx

@ -0,0 +1,10 @@
import { NavBar } from "antd-mobile";
export default function Setting() {
return (
<div>
<NavBar className='bg-white' back={null}></NavBar>
<div className="home-page-content">Setting</div>
</div>
);
}
Loading…
Cancel
Save