fan-standard-comp 3.2.5 → 3.2.7

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.
@@ -112,13 +112,7 @@ var FieldComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
112
112
  placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入',
113
113
  autoComplete: "off",
114
114
  title: fieldStatus === 'disabled' || defaultProps.disabled ? value : null,
115
- maxLength: defaultProps.maxLength || 50,
116
- onKeyDown: function onKeyDown(evt) {
117
- if (evt.key === 'Enter') {
118
- // 表单只有一个输入框时,焦点定到输入框后按下Enter会触发提交事件
119
- evt.preventDefault(); // 禁止默认行为
120
- }
121
- }
115
+ maxLength: defaultProps.maxLength || 50
122
116
  }, defaultProps)));
123
117
  break;
124
118
  case 'password':
@@ -46,7 +46,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
46
46
  // const isEnough = wrapHeight % baseItemHeight === 0; // 剩余的是否足够容纳一个单元格
47
47
  var isInsideEnoughWidth = navList.length * baseItemWidth <= _this.mainWrap.current.clientWidth;
48
48
  var wrapWidth = _this.mainWrap.current.clientWidth - (isInsideEnoughWidth ? 0 : 30 * 2);
49
- console.log('this.mainWrap.current.clientWidth', _this.mainWrap.current.clientWidth, wrapWidth, isInsideEnoughWidth);
49
+ // console.log('this.mainWrap.current.clientWidth', this.mainWrap.current.clientWidth, wrapWidth, isInsideEnoughWidth)
50
50
  var floorWidth = _this.leafNav.current.clientWidth; // 所有楼层占用的宽度
51
51
  if (type === 'horizontal') {
52
52
  // 判断有效区域与单元格高度:若小于,则直接使用单元格高度,否则将内容区高度去除不足一个单元格高度
@@ -285,7 +285,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
285
285
  floorWidth = _this$state3$floorRel.floorWidth,
286
286
  stepSize = _this$state3.stepSize;
287
287
  if (type === 'horizontal') {}
288
- if (JSON.stringify(navList) !== JSON.stringify(prevProps.navList) || (type === 'horizontal' ? baseItemWidth !== prevProps.baseItemWidth : baseItemHeight !== prevProps.baseItemHeight) || align !== prevProps.align) {
288
+ if (navList !== prevProps.navList || (type === 'horizontal' ? baseItemWidth !== prevProps.baseItemWidth : baseItemHeight !== prevProps.baseItemHeight) || align !== prevProps.align) {
289
289
  this.initFloorValues();
290
290
  }
291
291
  if (forbidScroll !== prevProps.forbidScroll) {
@@ -64,10 +64,10 @@ var RefactorTree = function RefactorTree(props) {
64
64
  e.selectedNodes.map(function (item) {
65
65
  return multiSelectedData.push(item);
66
66
  }); // 多选条件下,当前选中所有节点数据
67
- onSelect && onSelect(key, {
67
+ onSelect && onSelect(key, Object.assign({
68
68
  currentData: currentData,
69
69
  multiData: multiSelectedData
70
- }, e);
70
+ }, e), e);
71
71
  };
72
72
  var handleToCheckTreeNode = function handleToCheckTreeNode(keys, e) {
73
73
  var currentData = e.node;
@@ -45,8 +45,11 @@ var StandardFilter = /*#__PURE__*/React.forwardRef(function (props, ref) {
45
45
  cancelButtonProps = _Object$assign$cancel === void 0 ? {} : _Object$assign$cancel,
46
46
  filterButtonColSpan = _Object$assign.filterButtonColSpan,
47
47
  filterButtonConfig = _Object$assign.filterButtonConfig,
48
- formLayout = _Object$assign.formLayout,
48
+ _Object$assign$formLa = _Object$assign.formLayout,
49
+ formLayout = _Object$assign$formLa === void 0 ? 'inline' : _Object$assign$formLa,
49
50
  gridLayout = _Object$assign.gridLayout,
51
+ _Object$assign$button3 = _Object$assign.buttonGroupPlacement,
52
+ buttonGroupPlacement = _Object$assign$button3 === void 0 ? 'left' : _Object$assign$button3,
50
53
  filterFormStyle = _Object$assign.filterFormStyle,
51
54
  filterBtnsStyle = _Object$assign.filterBtnsStyle,
52
55
  _Object$assign$colon = _Object$assign.colon,
@@ -202,7 +205,7 @@ var StandardFilter = /*#__PURE__*/React.forwardRef(function (props, ref) {
202
205
  };
203
206
  var renderButtonGroup = function renderButtonGroup() {
204
207
  return buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/React.createElement("div", {
205
- className: "filter-btns filter-btns-".concat(gridLayout),
208
+ className: "filter-btns filter-btns-".concat(gridLayout, " filter-btns-").concat(gridLayout, "-").concat(buttonGroupPlacement),
206
209
  style: filterBtnsStyle
207
210
  }, /*#__PURE__*/React.createElement(ButtonGroup, Object.assign({
208
211
  options: buttonGroup,
@@ -32,6 +32,12 @@
32
32
  width: 100%;
33
33
  text-align: left;
34
34
 
35
+ &.filter-btns-horizontal-right {
36
+ .spec-button-group {
37
+ text-align: right;
38
+ //justify-content: end;
39
+ }
40
+ }
35
41
  .spec-button-group {
36
42
  display: block;
37
43
  padding-left: 0;
@@ -122,13 +122,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
122
122
  placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入',
123
123
  autoComplete: "off",
124
124
  title: fieldStatus === 'disabled' || defaultProps.disabled ? value : null,
125
- maxLength: defaultProps.maxLength || 50,
126
- onKeyDown: function onKeyDown(evt) {
127
- if (evt.key === 'Enter') {
128
- // 表单只有一个输入框时,焦点定到输入框后按下Enter会触发提交事件
129
- evt.preventDefault(); // 禁止默认行为
130
- }
131
- }
125
+ maxLength: defaultProps.maxLength || 50
132
126
  }, defaultProps)));
133
127
  break;
134
128
  case 'password':
@@ -54,7 +54,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
54
54
  // const isEnough = wrapHeight % baseItemHeight === 0; // 剩余的是否足够容纳一个单元格
55
55
  var isInsideEnoughWidth = navList.length * baseItemWidth <= _this.mainWrap.current.clientWidth;
56
56
  var wrapWidth = _this.mainWrap.current.clientWidth - (isInsideEnoughWidth ? 0 : 30 * 2);
57
- console.log('this.mainWrap.current.clientWidth', _this.mainWrap.current.clientWidth, wrapWidth, isInsideEnoughWidth);
57
+ // console.log('this.mainWrap.current.clientWidth', this.mainWrap.current.clientWidth, wrapWidth, isInsideEnoughWidth)
58
58
  var floorWidth = _this.leafNav.current.clientWidth; // 所有楼层占用的宽度
59
59
  if (type === 'horizontal') {
60
60
  // 判断有效区域与单元格高度:若小于,则直接使用单元格高度,否则将内容区高度去除不足一个单元格高度
@@ -293,7 +293,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
293
293
  floorWidth = _this$state3$floorRel.floorWidth,
294
294
  stepSize = _this$state3.stepSize;
295
295
  if (type === 'horizontal') {}
296
- if (JSON.stringify(navList) !== JSON.stringify(prevProps.navList) || (type === 'horizontal' ? baseItemWidth !== prevProps.baseItemWidth : baseItemHeight !== prevProps.baseItemHeight) || align !== prevProps.align) {
296
+ if (navList !== prevProps.navList || (type === 'horizontal' ? baseItemWidth !== prevProps.baseItemWidth : baseItemHeight !== prevProps.baseItemHeight) || align !== prevProps.align) {
297
297
  this.initFloorValues();
298
298
  }
299
299
  if (forbidScroll !== prevProps.forbidScroll) {
@@ -72,10 +72,10 @@ var RefactorTree = function RefactorTree(props) {
72
72
  e.selectedNodes.map(function (item) {
73
73
  return multiSelectedData.push(item);
74
74
  }); // 多选条件下,当前选中所有节点数据
75
- onSelect && onSelect(key, {
75
+ onSelect && onSelect(key, Object.assign({
76
76
  currentData: currentData,
77
77
  multiData: multiSelectedData
78
- }, e);
78
+ }, e), e);
79
79
  };
80
80
  var handleToCheckTreeNode = function handleToCheckTreeNode(keys, e) {
81
81
  var currentData = e.node;
@@ -54,8 +54,11 @@ var StandardFilter = /*#__PURE__*/_react.default.forwardRef(function (props, ref
54
54
  cancelButtonProps = _Object$assign$cancel === void 0 ? {} : _Object$assign$cancel,
55
55
  filterButtonColSpan = _Object$assign.filterButtonColSpan,
56
56
  filterButtonConfig = _Object$assign.filterButtonConfig,
57
- formLayout = _Object$assign.formLayout,
57
+ _Object$assign$formLa = _Object$assign.formLayout,
58
+ formLayout = _Object$assign$formLa === void 0 ? 'inline' : _Object$assign$formLa,
58
59
  gridLayout = _Object$assign.gridLayout,
60
+ _Object$assign$button3 = _Object$assign.buttonGroupPlacement,
61
+ buttonGroupPlacement = _Object$assign$button3 === void 0 ? 'left' : _Object$assign$button3,
59
62
  filterFormStyle = _Object$assign.filterFormStyle,
60
63
  filterBtnsStyle = _Object$assign.filterBtnsStyle,
61
64
  _Object$assign$colon = _Object$assign.colon,
@@ -211,7 +214,7 @@ var StandardFilter = /*#__PURE__*/_react.default.forwardRef(function (props, ref
211
214
  };
212
215
  var renderButtonGroup = function renderButtonGroup() {
213
216
  return buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/_react.default.createElement("div", {
214
- className: "filter-btns filter-btns-".concat(gridLayout),
217
+ className: "filter-btns filter-btns-".concat(gridLayout, " filter-btns-").concat(gridLayout, "-").concat(buttonGroupPlacement),
215
218
  style: filterBtnsStyle
216
219
  }, /*#__PURE__*/_react.default.createElement(_index.default, Object.assign({
217
220
  options: buttonGroup,
@@ -32,6 +32,12 @@
32
32
  width: 100%;
33
33
  text-align: left;
34
34
 
35
+ &.filter-btns-horizontal-right {
36
+ .spec-button-group {
37
+ text-align: right;
38
+ //justify-content: end;
39
+ }
40
+ }
35
41
  .spec-button-group {
36
42
  display: block;
37
43
  padding-left: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fan-standard-comp",
3
- "version": "3.2.5",
3
+ "version": "3.2.7",
4
4
  "description": "FZ standard-comp,basic of antd4.0 and custom component.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -21,7 +21,8 @@
21
21
  "package:build:publish": "father-build && webpack && npm version patch && npm publish",
22
22
  "package:build:no-dist:publish": "father-build && npm version patch && npm publish",
23
23
  "build:package:to-rgz": "npm run package:build && node copyPackage.js && npm run package-to-tgz",
24
- "package-to-tgz": "tar -czf fan-standard-comp-3.2.3-beta.1.tgz package"
24
+ "package-to-tgz": "tar -czf fan-standard-comp-3.2.7.tgz package",
25
+ "doc-to-tgz": "tar -czf doc-v3.zip doc-v3"
25
26
  },
26
27
  "author": "shomychen",
27
28
  "license": "ISC",
@@ -51,5 +52,8 @@
51
52
  "react-html-parser": "^2.0.2",
52
53
  "style-loader": "1.3.0",
53
54
  "webpack": "4.44.1"
55
+ },
56
+ "engines": {
57
+ "node": "=16.0.0"
54
58
  }
55
59
  }