{"repo":"joye61/clxx","free":true,"listed":false,"github":"https://github.com/joye61/clxx","clone":"git clone https://github.com/joye61/clxx.git","description":"Some lightweight H5 components and features","language":"TypeScript","stars":101,"topics":["react","css-in-js","typescript"],"license":"MIT","category":"mobile-apps","readme_excerpt":"CLXX 轻量级 React 移动端组件库 基于 React 19 + TypeScript + Emotion 构建的现代化移动端 UI 组件库 --- ✨ 特性 - 🎯 专为移动端设计 — 完美适配移动端交互和体验 - 📱 响应式布局 — 基于 rem 的自适应方案，自动处理浏览器字体缩放 - 🎨 CSS-in-JS — 使用 Emotion 实现样式隔离和动态样式 - 🔧 TypeScript — 完整的类型定义，提供更好的开发体验 - 🎪 函数式调用 — Toast、Dialog、Loading、Alert、Picker 等支持命令式调用 - 🚀 现代化 — 基于 React 19，使用最新的 Hooks API - 📦 轻量级 — tree-shaking 友好，按需引入 --- 🆕 What's New (v3.0) - 新增 DatePicker / showDatePicker ：iOS 风格滚轮日期选择器，支持 day / hour / minute / second 多档精度，含 min/max 范围联动夹取。 - 新增 RegionPicker / showRegionPicker ：iOS 风格三级（省/市/区）地区选择器，内置中国行政区数据。 - Dialog 健壮化 ：关闭操作幂等（多次调用 close / 并发遮罩点击只触发一次动画）；用户 onBlankClick 改为同步触发，事件对象不再失效；动画走 transform/opacity GPU 合成； onAnimationEnd 严格匹配自身关键帧防止子元素动画冒泡误触。 - CitySelect 重构 ：复用 Dialog （ pullLeft ）完成弹出/收起动画，删除组件内自管动画代码。 - 性能优化 ： Toast / Flex / FlexItem / Fixed / SafeArea / AutoGrid 中纯 CSS 属性赋值改走原生 inline style ，省去 emotion 哈希；模块级常量替代 render 内对象字面量。 公共 API 完全兼容，旧版 showCitySelect 等签名保持不变。 --- 📦 安装 Peer Dependencies Dependencies - @emotion/react — CSS-in-JS 样式方案 - dayjs — 日期处理 - history — 路由历史管理 - lodash — 工具函数 --- 🚀 快速开始 基础使用 使用路由创建应用 --- 📚 组件文档 🏗️ 布局组件 Container — 自适应容器 全局根容器，提供移动端 rem 自适应布局、viewport 设置和初始化逻辑。 Props： 属性 类型 默认值 说明 ------ ------ -------- ------ designWidth number 750 设计稿宽度 globalStyle Interpolation — 全局附加样式 children ReactNode — 子元素 核心能力： - 自动计算并设置 html 根字体大小，实现 rem 适配 - 检测浏览器字体缩放并自动修正，避免布局偏差 - 通过 useLayoutEffect 在绘制前完成修正，防止闪烁 - useViewport 自动设置 viewport meta - 激活 iOS 上的 :active 伪类 - 全局设置 box-sizing: border-box --- Flex / FlexIte","default_branch":null,"files":null,"tree":[],"storefront":"/r/joye61","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/joye61/clxx/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}