
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
ty-ui-mobile-cockpit
Advanced tools
基于 Ant Design Mobile 5 的公司内部移动端组件库,采用 CSS-in-JS 方案,无需单独导入样式文件。完全自包含,防止版本冲突,包大小约 227KB。
基于 Ant Design Mobile 5 封装的公司内部移动端组件库,提供统一的 UI 风格和交互体验。现已包含 Cockpit 驾驶舱组件!
npm install ty-ui-mobile-cockpit
# 或
yarn add ty-ui-mobile-cockpit
import { Button, Input, Card, Cockpit } from 'ty-ui-mobile-cockpit';
// 重要:导入样式文件
import 'ty-ui-mobile-cockpit/dist/index.css';
function App() {
const footerTabs = [
{ key: 'home', title: '首页', icon: <HomeIcon />, url: '/home' },
{ key: 'profile', title: '我的', icon: <UserIcon />, url: '/profile' },
];
return (
<Cockpit
NavBarTitle="我的应用"
footerTabs={footerTabs}
onNavigate={(url) => console.log('跳转到:', url)}
>
<div>
<Button type="primary">主要按钮</Button>
<Input placeholder="请输入内容" />
<Card title="卡片标题">
卡片内容
</Card>
</div>
</Cockpit>
);
}
import Button from 'ty-ui-mobile-cockpit/lib/Button';
import Input from 'ty-ui-mobile-cockpit/lib/Input';
import Card from 'ty-ui-mobile-cockpit/lib/Card';
// 或者在单独使用组件时也可以导入所有样式
import 'ty-ui-mobile-cockpit/dist/index.css';
为移动端应用提供统一的页面布局和导航体验。
功能特点:
基于 Ant Design Mobile Button 组件封装,支持公司内部的设计规范。
基于 Ant Design Mobile Input 组件封装,提供统一的输入体验。
基于 Ant Design Mobile Card 组件封装,支持多种布局和样式。
# 安装依赖
npm install
# 启动开发模式
npm run dev
# 启动演示应用
npm run demo
# 启动 Storybook
npm run storybook
# 构建组件库
npm run build
# 代码检查
npm run lint
├── src/ # 源代码
│ ├── components/ # 组件目录
│ │ ├── Button/ # 按钮组件
│ │ ├── Input/ # 输入框组件
│ │ ├── Card/ # 卡片组件
│ │ └── Cockpit/ # 驾驶舱组件
│ └── index.ts # 入口文件
├── demo/ # 演示应用
├── stories/ # Storybook 文档
└── dist/ # 构建产物
欢迎提交 Issue 和 Pull Request!
MIT License
FAQs
基于 Ant Design Mobile 5 的公司内部移动端组件库,采用 CSS-in-JS 方案,无需单独导入样式文件。完全自包含,防止版本冲突,包大小约 227KB。
The npm package ty-ui-mobile-cockpit receives a total of 4 weekly downloads. As such, ty-ui-mobile-cockpit popularity was classified as not popular.
We found that ty-ui-mobile-cockpit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.