fmui-base 2.1.32 → 2.1.33

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,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.1.33:表单组件html编辑器移动端图片路径替换成viewImage形式
6
7
  - 2.1.32:表单组件html编辑器移动端图片路径替换
7
8
  - 2.1.31:表单组件支持对单行文本进行关联字段赋值
8
9
  - 2.1.30:宏值字段可编辑时根据当前人变化
package/lib/form/form.js CHANGED
@@ -1343,14 +1343,18 @@ var PageHome = function (_React$Component) {
1343
1343
  // //alert("value==="+value);
1344
1344
  // }
1345
1345
  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];
1346
+ if (p2 && p2.indexOf("/attachment/" > 0) && p2.indexOf("?" > 0)) {
1347
+ var queryString = p2.split('?')[1];
1348
+ var params = new URLSearchParams(queryString);
1349
+ var fid = params.get('fid');
1350
+ // console.log(fid);
1351
+ p2 = context + '/api/m/plugin/attachment/mobile/viewImage?token=' + token + '&fid=' + fid;
1352
+ // p2 = context + "/attachment/"+p2.split("/attachment/")[1];
1349
1353
  }
1350
1354
  return '<img ' + p1 + 'src="' + p2 + '"';
1351
1355
  });
1352
- console.log(updatedHtml);
1353
- itemParam.value = updatedHtml;
1356
+ // console.log(updatedHtml);
1357
+ value = updatedHtml;
1354
1358
  }
1355
1359
  itemParam = t.dealwithLinkField(itemParam, data, status);
1356
1360
  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.33",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",