# ecg-ui
**Repository Path**: billschen/ecg-ui
## Basic Information
- **Project Name**: ecg-ui
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-07-06
- **Last Updated**: 2025-09-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
Antd Mobile Pro
### 运行
```
pnpm i
pnpm start
```
### 关于尺寸标注
100% 宽为 750px,可在蓝湖等工具中将标准改为 750px,这样可以直接使用标注的尺寸用于 caa class 中的尺寸,最终运行会根据手机适配,将 px 自动转为对应的 rem 值。
值得注意的是,写在内联样式 style 中的 px 值不会被转化,需要手动写明 rem 单位,直接将 px 值除于 100 即可,如 750px,在 style 中应该写为 7.5rem
## 自带头部
可在 `src/app.tsx#L24` 中配置
```tsx
const titleList: TitleListItem[] = [
{
pagePath: '/',
title: '首页',
},
{
pagePath: '/list',
title: '列表',
},
];
```
也可以在页面中独立配置
```tsx
import { setPageNavBar, useLocation } from 'alita';
import { LeftOutline } from 'antd-mobile-icons';
import { useEffect } from 'react';
const location = useLocation();
useEffect(() => {
setPageNavBar({
pagePath: location.pathname,
navBar: {
mode: 'dark',
pageTitle: '首页动态标题',
pageBackground: '#fff',
back: '返回',
icon: ,
leftContent: 首页
,
rightContent: 详情
,
onLeftClick: (navigate) => {
navigate(-1);
},
hideNavBar: false,
},
});
}, []);
```
> 关闭默认 NavBar 上述 hideNavBar 配置改为 hideNavBar: true
## 底部 Tabs
可在 `src/app.tsx#L42` 中配置
```tsx
const tabList: TabBarListItem[] = [
{
pagePath: '/',
text: '首页',
iconPath: HomeGary,
selectedIconPath: HomeBlue,
title: '首页',
iconSize: '',
badge: '',
},
{
pagePath: '/list',
text: '列表',
iconPath: ListGary,
selectedIconPath: ListBlue,
title: '列表',
iconSize: '',
badge: '',
},
];
```
也可以在页面中独立配置
```tsx
import { setTabBarList, useLocation } from 'alita';
import { useEffect } from 'react';
const location = useLocation();
useEffect(() => {
setTabBarList({
pagePath: location.pathname,
text: '首页',
iconSize: '18px',
badge: '12',
onPress: () => {
navigate(location.pathname, { replace: true });
return '';
},
remove: false,
});
}, []);
```
> 关闭 app.ts 中已经配置好的 Tab ,上述 remove 配置改为 remove: true
### 格式化
```
pnpm format
```
### 构建
```
pnpm build
```
### 调试工具
在 `config/config.ts` 中增加配置
```
aconsole: {
console: {},
inspx: {},
},
```