@gm-mobile/c-react 3.12.12-beta.1 → 3.12.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +129 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -0,0 +1,129 @@
1
+ # @gm-mobile/c-react
2
+
3
+ ## 简介
4
+ 基础 React 组件库 - gm-mobile 的底层 UI 组件库,提供 40+ 基础移动端 React 组件,是 `@gm-mobile/react` 的核心依赖。
5
+
6
+ ## 安装
7
+
8
+ ```bash
9
+ npm install @gm-mobile/c-react
10
+ ```
11
+
12
+ ### peerDependencies
13
+
14
+ ```json
15
+ {
16
+ "@tarojs/components": "3.0.18",
17
+ "@tarojs/taro": "3.0.18",
18
+ "big.js": "^5.2.2",
19
+ "classnames": "^2.2.6",
20
+ "prop-types": "^15.7.2",
21
+ "react": "^16.13.1"
22
+ }
23
+ ```
24
+
25
+ ## 使用
26
+
27
+ ### 快速开始
28
+
29
+ ```jsx
30
+ import { Button, Flex, Dialog, Toast, Input } from '@gm-mobile/c-react'
31
+
32
+ const App = () => {
33
+ return <Button type="primary">按钮</Button>
34
+ }
35
+ ```
36
+
37
+ ## API
38
+
39
+ ### 导出列表
40
+
41
+ #### 基础组件
42
+
43
+ | 导出项 | 说明 |
44
+ |--------|------|
45
+ | `Button` | 按钮 |
46
+ | `Flex` | 弹性布局 |
47
+ | `View` | 视图容器 |
48
+ | `Text` | 文本 |
49
+ | `Label` | 标签 |
50
+
51
+ #### 表单组件
52
+
53
+ | 导出项 | 说明 |
54
+ |--------|------|
55
+ | `Input` | 输入框 |
56
+ | `TextField` | 文本输入框 |
57
+ | `Textarea` | 多行文本输入 |
58
+ | `Checkbox` | 复选框 |
59
+ | `Radio` | 单选框 |
60
+ | `Switch` | 开关 |
61
+ | `Search` | 搜索框 |
62
+ | `Calendar` | 日历 |
63
+ | `DateSelector` | 日期选择器 |
64
+ | `DigitalKeyboard` | 数字键盘 |
65
+
66
+ #### 布局组件
67
+
68
+ | 导出项 | 说明 |
69
+ |--------|------|
70
+ | `Cell` | 单元格 |
71
+ | `Divider` | 分割线 |
72
+ | `Square` | 正方形容器 |
73
+ | `InnerLayer` | 内层布局 |
74
+ | `Panel` | 面板 |
75
+ | `Nav` | 导航 |
76
+ | `CustomTabbar` | 自定义标签栏 |
77
+ | `Draggable` | 可拖拽组件 |
78
+
79
+ #### 浮层/反馈组件
80
+
81
+ | 导出项 | 说明 |
82
+ |--------|------|
83
+ | `Dialog` | 弹窗(含 `alert`、`confirm`、`prompt`、`delete` 静态方法) |
84
+ | `Popup` | 弹出层 |
85
+ | `Toast` | 轻提示 |
86
+ | `Loading` | 加载中 |
87
+ | `Mask` | 遮罩层 |
88
+ | `ActionSheet` | 操作面板 |
89
+ | `ToolTip` | 文字提示 |
90
+
91
+ #### 数据展示
92
+
93
+ | 导出项 | 说明 |
94
+ |--------|------|
95
+ | `Tabs` | 标签页 |
96
+ | `Badge` | 徽标 |
97
+ | `Status` | 状态标识 |
98
+ | `TagWrap` | 标签组 |
99
+ | `Price` | 价格展示 |
100
+ | `VList` | 虚拟列表 |
101
+
102
+ #### 页面/容器
103
+
104
+ | 导出项 | 说明 |
105
+ |--------|------|
106
+ | `Page` | 页面容器 |
107
+ | `LayoutRoot` | 布局根容器(弹层挂载点) |
108
+ | `ScrollIntoView` | 滚动到可视区域 |
109
+
110
+ #### 其他
111
+
112
+ | 导出项 | 说明 |
113
+ |--------|------|
114
+ | `RepeatTimes` | 重复次数 |
115
+ | `Form` | 表单 |
116
+ | `Error` | 错误边界 |
117
+
118
+ ## 注意事项
119
+ - 同时支持 Web 端(React)和小程序端(Taro),通过 `@tarojs/components` 适配
120
+ - `Dialog` 提供静态方法:`alert()`、`confirm()`、`prompt()`、`delete()`
121
+ - `LayoutRoot` 是弹层组件的挂载点,通常放在应用根节点
122
+ - 依赖 `@gm-mobile/c-font` 提供图标字体,依赖 `@gm-mobile/locales` 提供国际化
123
+
124
+ ## 相关包
125
+ - [@gm-mobile/react](../react) - 主组件库(包含本包所有导出 + 扩展组件)
126
+ - [@gm-mobile/mp](../mp) - 小程序适配包
127
+ - [@gm-mobile/c-font](../c-font) - 图标字体
128
+ - [@gm-mobile/c-tool](../c-tool) - 工具函数库
129
+ - [@gm-mobile/locales](../locales) - 国际化工具
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gm-mobile/c-react",
3
- "version": "3.12.12-beta.1",
3
+ "version": "3.12.13",
4
4
  "description": "> TODO: description",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gm-mobile#readme",
@@ -21,9 +21,9 @@
21
21
  "url": "https://github.com/gmfe/gm-mobile/issues"
22
22
  },
23
23
  "dependencies": {
24
- "@gm-mobile/c-font": "^3.12.12-beta.1",
25
- "@gm-mobile/c-tool": "^3.12.12-beta.1",
26
- "@gm-mobile/locales": "^3.12.12-beta.1",
24
+ "@gm-mobile/c-font": "^3.12.13",
25
+ "@gm-mobile/c-tool": "^3.12.13",
26
+ "@gm-mobile/locales": "^3.12.13",
27
27
  "dayjs": "^1.11.6"
28
28
  },
29
29
  "peerDependencies": {
@@ -34,5 +34,5 @@
34
34
  "prop-types": "^15.7.2",
35
35
  "react": "^16.13.1"
36
36
  },
37
- "gitHead": "8241f847ca2e7cfbbb67076d8d89f00e20c3977b"
37
+ "gitHead": "f1807b01b33bb8ee331b6c713d52d85fda524bf7"
38
38
  }