@hzab/form-render-mobile 0.0.1
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.
- package/README.md +67 -0
- package/lib/index.js +46475 -0
- package/lib/static/imgs/approachPointIcon_f2eb69df51.png +0 -0
- package/lib/static/imgs/layers-2x_8f2c4d1147.png +0 -0
- package/lib/static/imgs/layers_416d91365b.png +0 -0
- package/lib/static/imgs/marker-icon_2b3e1faf89.png +0 -0
- package/package.json +59 -0
- package/src/common/schemaHandler.js +55 -0
- package/src/components/Cascader/index.jsx +75 -0
- package/src/components/Cascader/index.less +3 -0
- package/src/components/DatePicker/index.less +3 -0
- package/src/components/DatePicker/index.tsx +98 -0
- package/src/components/MapPicker/common/approachPointIcon.png +0 -0
- package/src/components/MapPicker/common/getCurrentPosition.js +27 -0
- package/src/components/MapPicker/common/gpsConvert.js +236 -0
- package/src/components/MapPicker/common/map-config.js +7 -0
- package/src/components/MapPicker/index.jsx +82 -0
- package/src/components/MapPicker/line-picker/car-route.json +426 -0
- package/src/components/MapPicker/line-picker/index.jsx +188 -0
- package/src/components/MapPicker/line-picker/index.less +41 -0
- package/src/components/MapPicker/line-picker/mockLonLat.js +1 -0
- package/src/components/MapPicker/location-picker/index.jsx +104 -0
- package/src/components/MapPicker/location-picker/index.less +36 -0
- package/src/components/NumberPicker/index.jsx +16 -0
- package/src/components/NumberPicker/index.less +3 -0
- package/src/components/Password/index.jsx +14 -0
- package/src/components/Select/index.less +3 -0
- package/src/components/Select/index.tsx +60 -0
- package/src/components/Text/index.tsx +23 -0
- package/src/components/Uploader/common/cordova-camera.js +188 -0
- package/src/components/Uploader/common/utils.js +87 -0
- package/src/components/Uploader/index.jsx +31 -0
- package/src/components/Uploader/uploader.jsx +246 -0
- package/src/components/Uploader/uploader.less +36 -0
- package/src/components/Uploader/video/index.jsx +37 -0
- package/src/components/Uploader/video/index.less +37 -0
- package/src/components/index.ts +10 -0
- package/src/index.tsx +101 -0
- package/src/type.d.ts +15 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @hzab/form-render-mobile
|
|
2
|
+
|
|
3
|
+
组件模板
|
|
4
|
+
|
|
5
|
+
- node@14.21
|
|
6
|
+
|
|
7
|
+
# 组件
|
|
8
|
+
|
|
9
|
+
## 示例
|
|
10
|
+
|
|
11
|
+
```jsx
|
|
12
|
+
import FormRender from "@hzab/form-render-mobile";
|
|
13
|
+
import Schema from './test.schema.json'
|
|
14
|
+
|
|
15
|
+
<FormRender schema={schema} />;
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
### InfoPanel Attributes
|
|
21
|
+
|
|
22
|
+
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|
|
23
|
+
| ------ | ------ | ---- | ------ | ----------------- | --- |
|
|
24
|
+
| schema | Object | 是 | - | 数据信息的 schema | |
|
|
25
|
+
|
|
26
|
+
# 组件开发流程
|
|
27
|
+
|
|
28
|
+
- 在 config/webpack.config.js 中按需修改 library 配置的文件名
|
|
29
|
+
- 在 config/webpack.config.js 中按需修改 alias 配置的包名,便于本地调试
|
|
30
|
+
- 在 tsconfig.json 中按需修改 paths 配置的包名,解决 ts 报错问题
|
|
31
|
+
- npm run dev
|
|
32
|
+
|
|
33
|
+
## 文件目录
|
|
34
|
+
|
|
35
|
+
- example 本地开发测试代码
|
|
36
|
+
- src 组件源码
|
|
37
|
+
- lib 组件打包编译后的代码
|
|
38
|
+
|
|
39
|
+
## 命令
|
|
40
|
+
|
|
41
|
+
- Mac 执行该命令,设置 pre-commit 为可执行文件
|
|
42
|
+
- npm run mac-chmod
|
|
43
|
+
- chmod +x .husky && chmod +x .husky/pre-commit
|
|
44
|
+
|
|
45
|
+
- 生成文档:npm run docs
|
|
46
|
+
- 本地运行:npm run dev
|
|
47
|
+
- 打包编译:npm run build
|
|
48
|
+
|
|
49
|
+
## 发布
|
|
50
|
+
|
|
51
|
+
- 注意:示例代码生效,但发布之后未生效。确认是否执行了编译!!!
|
|
52
|
+
|
|
53
|
+
- 编译组件:npm run build
|
|
54
|
+
- 命令:npm publish --access public
|
|
55
|
+
- 发布目录:
|
|
56
|
+
- lib
|
|
57
|
+
- src
|
|
58
|
+
|
|
59
|
+
## 配置
|
|
60
|
+
|
|
61
|
+
### 配置文件
|
|
62
|
+
|
|
63
|
+
- 本地配置文件:config/config.js
|
|
64
|
+
|
|
65
|
+
### webpack 配置文件
|
|
66
|
+
|
|
67
|
+
- config/webpack.config.js
|