fmui-base 2.1.32 → 2.1.34

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
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.1.34:表单组件子表字段只读时不做必填校验
7
+ - 2.1.33:表单组件html编辑器移动端图片路径替换成viewImage形式
6
8
  - 2.1.32:表单组件html编辑器移动端图片路径替换
7
9
  - 2.1.31:表单组件支持对单行文本进行关联字段赋值
8
10
  - 2.1.30:宏值字段可编辑时根据当前人变化
package/lib/form/form.js CHANGED
@@ -358,6 +358,9 @@ var PageHome = function (_React$Component) {
358
358
  }
359
359
  if (itemType != "comment") {
360
360
  required = form.valid == "true"; //必填
361
+ if (readOnly) {
362
+ required = false;
363
+ }
361
364
  }
362
365
  }
363
366
  itemParam.readOnly = readOnly;
@@ -1343,14 +1346,18 @@ var PageHome = function (_React$Component) {
1343
1346
  // //alert("value==="+value);
1344
1347
  // }
1345
1348
  var updatedHtml = value.replace(/<img\s+([^>]*)src="([^"]*)"/gi, function (match, p1, p2, p3) {
1346
- console.log(p1);
1347
- if (p2 && p2.indexOf("/attachment/" > 0)) {
1348
- p2 = context + "/attachment/" + p2.split("/attachment/")[1];
1349
+ if (p2 && p2.indexOf("/attachment/" > 0) && p2.indexOf("?" > 0)) {
1350
+ var queryString = p2.split('?')[1];
1351
+ var params = new URLSearchParams(queryString);
1352
+ var fid = params.get('fid');
1353
+ // console.log(fid);
1354
+ p2 = context + '/api/m/plugin/attachment/mobile/viewImage?token=' + token + '&fid=' + fid;
1355
+ // p2 = context + "/attachment/"+p2.split("/attachment/")[1];
1349
1356
  }
1350
1357
  return '<img ' + p1 + 'src="' + p2 + '"';
1351
1358
  });
1352
- console.log(updatedHtml);
1353
- itemParam.value = updatedHtml;
1359
+ // console.log(updatedHtml);
1360
+ value = updatedHtml;
1354
1361
  }
1355
1362
  itemParam = t.dealwithLinkField(itemParam, data, status);
1356
1363
  itemParam = t.dealwithRelaField(itemParam, allForm);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.32",
3
+ "version": "2.1.34",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",