@hzab/form-render-mobile 1.2.1 → 1.2.2-beta

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 CHANGED
@@ -73,29 +73,33 @@ export default () => {
73
73
 
74
74
  - example 本地开发测试代码
75
75
  - src 组件源码
76
- - lib 组件打包编译后的代码
77
76
 
78
77
  ## 命令
79
78
 
80
- - Mac 执行该命令,设置 pre-commit 为可执行文件
81
-
82
- - npm run mac-chmod
83
- - chmod +x .husky && chmod +x .husky/pre-commit
84
-
85
79
  - 生成文档:npm run docs
86
80
  - 本地运行:npm run dev
87
81
  - 打包编译:npm run build
88
82
 
89
83
  ## 发布
90
84
 
91
- - 注意:示例代码生效,但发布之后未生效。确认是否执行了编译!!!
85
+ - npm 源和云效源都需要发布
92
86
 
93
- - 编译组件:npm run build
94
87
  - 命令:npm publish --access public
95
88
  - 发布目录:
96
- - lib
97
89
  - src
98
90
 
91
+ ### nrm
92
+
93
+ - 安装
94
+ npm install -g nrm
95
+ - 增加源
96
+ nrm add aliyun https://packages.aliyun.com/62046985b3ead41b374a17f7/npm/npm-registry/
97
+ - 切换源
98
+ nrm use aliyun
99
+ nrm use npm
100
+ - 登录(账号密码在 https://packages.aliyun.com/npm/npm-registry/guide 查看)
101
+ npm login --registry=https://packages.aliyun.com/62046985b3ead41b374a17f7/npm/npm-registry/
102
+
99
103
  ## 配置
100
104
 
101
105
  ### 配置文件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/form-render-mobile",
3
- "version": "1.2.1",
3
+ "version": "1.2.2-beta",
4
4
  "description": "formily-form-render-mobile",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -44,7 +44,8 @@
44
44
  "@formily/antd-mobile": "1.0.0-beta.3",
45
45
  "@formily/core": "2.2.29",
46
46
  "@formily/react": "2.2.29",
47
- "@hzab/data-model": "^0.0.3",
47
+ "@hzab/data-model": "^1.8.8",
48
+ "@hzab/utils": "^1.0.4",
48
49
  "antd-mobile": "^5.32.0",
49
50
  "antd-mobile-icons": "^0.2.2",
50
51
  "nanoid": "^3.3.7",
@@ -134,6 +134,7 @@ function Uploader(props, ref) {
134
134
  const actions = useMemo(() => {
135
135
  const allEnum = {
136
136
  select: { text: "选择文件", key: "select" },
137
+ input: { text: "选择文件(H5)", key: "input" },
137
138
  image: { text: "拍照", key: "captureImage" },
138
139
  video: { text: "录像", key: "captureVideo" },
139
140
  audio: { text: "录音", key: "captureAudio" },
@@ -191,6 +192,10 @@ function Uploader(props, ref) {
191
192
  }
192
193
  break;
193
194
 
195
+ case "input":
196
+ uploaderRef.current.click();
197
+ console.log("使用h5上传", uploaderRef)
198
+ break;
194
199
  case "captureImage":
195
200
  getImage(props.imgPluginOpt, props.getImgOpt).then((res) => {
196
201
  onFileChange({