fmui-base 2.1.31 → 2.1.32

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.32:表单组件html编辑器移动端图片路径替换
6
7
  - 2.1.31:表单组件支持对单行文本进行关联字段赋值
7
8
  - 2.1.30:宏值字段可编辑时根据当前人变化
8
9
  - 2.1.29:委托办理被委托人批示,显示被委托人的签名
package/lib/form/form.js CHANGED
@@ -641,7 +641,7 @@ var PageHome = function (_React$Component) {
641
641
  alert("265====="+itemParam.dataAttr.textLineFeed);
642
642
  }*/
643
643
  //宏值签名图片
644
- if (itemParam.dataAttr && itemParam.dataAttr.dataSrc == '2' && !readOnly) {
644
+ if (itemParam.dataAttr && itemParam.dataAttr.dataSrc == '2' && !readOnly && !itemParam.bizCodeRuleId) {
645
645
  value = form.defaultValue;
646
646
  }
647
647
  if (itemParam.dataAttr && itemParam.dataAttr.dataSrc == '2' && itemParam.dataAttr.fromMacro.value == 'currentUserSignPic') {
@@ -1335,6 +1335,22 @@ var PageHome = function (_React$Component) {
1335
1335
  });
1336
1336
  t.props.onChange(data, t.state.itemParam);
1337
1337
  }
1338
+ } else if (itemType == 'html') {
1339
+
1340
+ // if(value){
1341
+ // value = value.split('_')[0];
1342
+ // value = context + '/api/m/plugin/attachment/mobile/viewImage?token=' + token + '&fid='+value;
1343
+ // //alert("value==="+value);
1344
+ // }
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];
1349
+ }
1350
+ return '<img ' + p1 + 'src="' + p2 + '"';
1351
+ });
1352
+ console.log(updatedHtml);
1353
+ itemParam.value = updatedHtml;
1338
1354
  }
1339
1355
  itemParam = t.dealwithLinkField(itemParam, data, status);
1340
1356
  itemParam = t.dealwithRelaField(itemParam, allForm);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.31",
3
+ "version": "2.1.32",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",