fmui-base 2.3.74 → 2.3.76

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.3.76:表单的单选多选字段选项未换行显示全
7
+ - 2.3.75:移动端表单能支持自定义上下边距
6
8
  - 2.3.74:移动端流程办理支持流程办理人增加由所选活动指定办理人员
7
9
  - 2.3.73:移动端流程表单增加退回后重新提交前的批示意见在表单下方显示
8
10
  - 2.3.72:移动端表单设置自定义样式时图标乱码问题
package/lib/form/form.js CHANGED
@@ -601,8 +601,10 @@ var PageHome = function (_React$Component) {
601
601
  var formStyle = t.props.formStyle; //统一样式
602
602
  var subStyle = form.itemStyle; //每个样式
603
603
 
604
- var style = { contentStyle: {}, titleStyle: {} };
604
+ var style = { contentStyle: {}, titleStyle: {}, fieldPadding: 18 };
605
605
  if (formStyle != null && formStyle != '' && formStyle != undefined) {
606
+ // 表单级控件上下内边距(默认18,最大24)
607
+ style.fieldPadding = this.normalizeFieldPadding(formStyle.fieldPadding);
606
608
  if (formStyle.contentStyle != null && formStyle.contentStyle != '' && formStyle.contentStyle != undefined) {
607
609
  if (formStyle.contentStyle.color != null && formStyle.contentStyle.color != undefined) {
608
610
  style.contentStyle.color = formStyle.contentStyle.color;
@@ -2108,6 +2110,34 @@ var PageHome = function (_React$Component) {
2108
2110
  return !!(styleObj.fontFamily || styleObj.fontSize || styleObj.color || styleObj.fontWeight || styleObj.fontStyle);
2109
2111
  }
2110
2112
 
2113
+ /** 控件上下内边距:默认 18,最大 24 */
2114
+
2115
+ }, {
2116
+ key: 'normalizeFieldPadding',
2117
+ value: function normalizeFieldPadding(val) {
2118
+ var n = parseInt(val, 10);
2119
+ if (isNaN(n)) {
2120
+ n = 18;
2121
+ }
2122
+ if (n < 0) {
2123
+ n = 0;
2124
+ }
2125
+ if (n > 24) {
2126
+ n = 24;
2127
+ }
2128
+ return n;
2129
+ }
2130
+
2131
+ /** 覆盖标签/内容区上下内边距,左右 padding 保持原样式 */
2132
+
2133
+ }, {
2134
+ key: 'buildFieldPaddingCss',
2135
+ value: function buildFieldPaddingCss(scope, formStyleObj) {
2136
+ var padding = this.normalizeFieldPadding(formStyleObj && formStyleObj.fieldPadding);
2137
+ var px = padding + 'px';
2138
+ return [[scope + ' .t-field-layout-h-label', scope + ' .t-field-layout-v-label', scope + ' .t-field-layout-v-label-left'].join(',') + '{padding-top:' + px + ' !important;padding-bottom:' + px + ' !important;}', [scope + ' .t-field .t-field-layout-h-label+.t-field-multi', scope + ' .t-field-layout-h-label+.t-field-multi'].join(',') + '{padding-top:' + px + ' !important;padding-bottom:' + px + ' !important;}'].join('');
2139
+ }
2140
+
2111
2141
  // 组装 CSS 声明;important=true 用于压过 SaltUI 固定字号
2112
2142
  // options.skipFontFamily:避免字段字体覆盖 iconfont 图标
2113
2143
 
@@ -2172,6 +2202,7 @@ var PageHome = function (_React$Component) {
2172
2202
  var cssParts = [];
2173
2203
  var subColumnCount = parseInt(this.props.subColumnCount, 10);
2174
2204
  var isSubFormMultiCol = this.props.dataType === 'sub' && !isNaN(subColumnCount) && subColumnCount > 1;
2205
+ cssParts.push(this.buildFieldPaddingCss(scope, formStyleObj));
2175
2206
 
2176
2207
  if (this.hasFormStyleProps(ts)) {
2177
2208
  var labelCss = this.buildFormCssDecls(ts, { important: true, withLineHeight: true });
@@ -81,6 +81,39 @@
81
81
  }
82
82
  }
83
83
 
84
+ // 多选 CheckboxField list / SelectLayer:长选项换行显示全(覆盖 SaltUI nowrap/ellipsis)
85
+ .t-checkbox-field,
86
+ .t-checkbox-field-row,
87
+ .t-select-layer {
88
+ .t-checkbox-field-content,
89
+ .item-content {
90
+ flex: 1;
91
+ min-width: 0;
92
+ max-width: 100%;
93
+ white-space: normal !important;
94
+ word-break: break-word !important;
95
+ overflow-wrap: break-word !important;
96
+ word-wrap: break-word !important;
97
+ overflow: visible !important;
98
+ text-overflow: clip !important;
99
+ -webkit-line-clamp: unset !important;
100
+ line-clamp: unset !important;
101
+ line-height: 1.5;
102
+ }
103
+
104
+ .t-checkbox-field-row,
105
+ .select-layer-item {
106
+ align-items: flex-start;
107
+ min-height: auto;
108
+ }
109
+
110
+ .t-checkbox-field-icon-wrapper {
111
+ align-items: flex-start;
112
+ flex-shrink: 0;
113
+ padding-top: 2px;
114
+ }
115
+ }
116
+
84
117
  .form-radio-field-wrap {
85
118
  // popup 弹层选项列表:对齐 CheckboxField SelectLayer 的行高、间距与字体
86
119
  &.t-radio-field.is-group {
package/lib/form/table.js CHANGED
@@ -479,6 +479,34 @@ var PageHome = function (_React$Component) {
479
479
  }
480
480
  return !!(styleObj.fontFamily || styleObj.fontSize || styleObj.color || styleObj.fontWeight || styleObj.fontStyle);
481
481
  }
482
+
483
+ /** 控件上下内边距:默认 18,最大 24 */
484
+
485
+ }, {
486
+ key: 'normalizeFieldPadding',
487
+ value: function normalizeFieldPadding(val) {
488
+ var n = parseInt(val, 10);
489
+ if (isNaN(n)) {
490
+ n = 18;
491
+ }
492
+ if (n < 0) {
493
+ n = 0;
494
+ }
495
+ if (n > 24) {
496
+ n = 24;
497
+ }
498
+ return n;
499
+ }
500
+
501
+ /** 覆盖标签/内容区上下内边距,左右 padding 保持原样式 */
502
+
503
+ }, {
504
+ key: 'buildFieldPaddingCss',
505
+ value: function buildFieldPaddingCss(scope, formStyleObj) {
506
+ var padding = this.normalizeFieldPadding(formStyleObj && formStyleObj.fieldPadding);
507
+ var px = padding + 'px';
508
+ return [[scope + ' .t-field-layout-h-label', scope + ' .t-field-layout-v-label', scope + ' .t-field-layout-v-label-left'].join(',') + '{padding-top:' + px + ' !important;padding-bottom:' + px + ' !important;}', [scope + ' .t-field .t-field-layout-h-label+.t-field-multi', scope + ' .t-field-layout-h-label+.t-field-multi'].join(',') + '{padding-top:' + px + ' !important;padding-bottom:' + px + ' !important;}'].join('');
509
+ }
482
510
  }, {
483
511
  key: 'buildFormCssDecls',
484
512
  value: function buildFormCssDecls(styleObj, options) {
@@ -541,6 +569,7 @@ var PageHome = function (_React$Component) {
541
569
  var cs = formStyleObj.contentStyle || {};
542
570
  var scope = '.fmui-form-style-root';
543
571
  var cssParts = [];
572
+ cssParts.push(this.buildFieldPaddingCss(scope, formStyleObj));
544
573
  if (this.hasFormStyleProps(ts)) {
545
574
  var labelCss = this.buildFormCssDecls(ts, { important: true, withLineHeight: true });
546
575
  var fontSizeNum = parseInt(ts.fontSize, 10);
@@ -841,6 +841,8 @@ var PageHome = function (_React$Component) {
841
841
  taskId: taskId,
842
842
  processInstanceId: processInstanceId,
843
843
  type: listType,
844
+ // 撤回可编辑批示意见:匹配当前办理人时必须带 userId(与 comment.userId/createdBy 比对)
845
+ userId: t.state.userId,
844
846
  //startUserId:startUserId,
845
847
  module: this.state.module,
846
848
  isSub: isSub
@@ -1523,11 +1525,16 @@ var PageHome = function (_React$Component) {
1523
1525
  }
1524
1526
  // 抢占加签/转交自动返回后,被加签人意见与加签人待办共用同一 taskId。
1525
1527
  // 必须同时校验办理人,否则会把他人意见回填进当前编辑框并挤出历史列表。
1528
+ // 撤回 enableEditRecallComment:后端会把原意见 taskId 绑到新待办,此处回填到编辑框(与 PC active=1 对齐)。
1526
1529
  var commentOwnerId = commentList[_i].userId || commentList[_i].createdBy || '';
1527
- if (commentField == commentList[_i].field && commentList[_i].taskId == param.taskId && commentOwnerId && commentOwnerId == param.userId) {
1530
+ var currentUserId = param.userId || t.state.userId || '';
1531
+ if (commentField == commentList[_i].field && commentList[_i].taskId == param.taskId && commentOwnerId && currentUserId && commentOwnerId == currentUserId) {
1528
1532
  newspyj = commentList[_i];
1529
1533
  commentId = commentList[_i].id;
1530
- defaultValue = commentList[_i].content;
1534
+ // 接口字段为 fullMessage,content 可能为空
1535
+ var recallCommentText = commentList[_i].fullMessage != null && commentList[_i].fullMessage !== '' ? commentList[_i].fullMessage : commentList[_i].content || '';
1536
+ defaultValue = recallCommentText;
1537
+ newspyj.content = recallCommentText;
1531
1538
  continue;
1532
1539
  }
1533
1540
  if (commentItem.field != 'default' && commentItem.commenttype != 'back') {
@@ -5874,6 +5881,7 @@ var PageHome = function (_React$Component) {
5874
5881
  taskId: t.state.taskId,
5875
5882
  processInstanceId: t.state.processInstanceId,
5876
5883
  type: t.state.listType,
5884
+ userId: t.state.userId,
5877
5885
  module: t.state.module,
5878
5886
  isSub: isSub
5879
5887
  };
@@ -4,15 +4,16 @@
4
4
  box-sizing: border-box;
5
5
  }
6
6
 
7
- /* 与 PC 一致:图标 + 选项文案 + 填空同一行;长提示在填空框内换行 */
7
+ /* 与 PC 一致:图标 + 选项文案 + 填空;长选项文案换行显示全 */
8
8
  .dd-select-input-option {
9
9
  display: flex;
10
10
  flex-direction: row;
11
- flex-wrap: nowrap;
11
+ flex-wrap: wrap;
12
12
  align-items: flex-start;
13
13
  margin: 8px 12px 8px 0;
14
14
  cursor: pointer;
15
15
  min-width: 0;
16
+ width: 100%;
16
17
  box-sizing: border-box;
17
18
  }
18
19
 
@@ -73,11 +74,15 @@
73
74
  }
74
75
 
75
76
  .dd-select-input-option-text {
76
- flex: 0 0 auto;
77
+ flex: 1 1 auto;
77
78
  margin-right: 8px;
78
79
  margin-top: 4px;
79
80
  min-width: 32px;
81
+ max-width: 100%;
80
82
  line-height: 1.47;
83
+ white-space: normal;
84
+ word-break: break-word;
85
+ overflow-wrap: anywhere;
81
86
  }
82
87
 
83
88
  /* 紧挨选项文案,占满剩余宽度;长 placeholder 在框内换行 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.3.74",
3
+ "version": "2.3.76",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",