fan-standard-comp 3.2.10 → 3.2.11

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.
@@ -52,6 +52,10 @@ var RefactorTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
52
52
  _useState2 = _slicedToArray(_useState, 2),
53
53
  fullLevelName = _useState2[0],
54
54
  setFullLevelName = _useState2[1];
55
+ var _useState3 = useState({}),
56
+ _useState4 = _slicedToArray(_useState3, 2),
57
+ fullLevelStyle = _useState4[0],
58
+ setFullLevelStyle = _useState4[1];
55
59
  /*
56
60
  // 下拉浮层显示"全选"功能(未完善)
57
61
  const [indeterminate, setIndeterminate] = useState(false)
@@ -186,6 +190,20 @@ var RefactorTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
186
190
  });
187
191
  setFullLevelName(renderParenName(newNodeInfo));
188
192
  if (_onSelect) _onSelect(value, _objectSpread(_objectSpread({}, node), newNodeInfo.matchNode[0]), extra, newNodeInfo.nodeParent);
193
+ },
194
+ onDropdownVisibleChange: function onDropdownVisibleChange(open) {
195
+ var _otherProps$onDropdow;
196
+ setFullLevelStyle({
197
+ opacity: open ? 0.3 : ''
198
+ });
199
+ otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$onDropdow = otherProps.onDropdownVisibleChange) === null || _otherProps$onDropdow === void 0 ? void 0 : _otherProps$onDropdow.call(otherProps, open);
200
+ },
201
+ onSearch: function onSearch(value) {
202
+ var _otherProps$onSearch;
203
+ setFullLevelStyle({
204
+ opacity: value ? 0 : ''
205
+ });
206
+ otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$onSearch = otherProps.onSearch) === null || _otherProps$onSearch === void 0 ? void 0 : _otherProps$onSearch.call(otherProps, value);
189
207
  }
190
208
  // 下拉浮层中显示"全选"按钮
191
209
  // dropdownRender={(originNode) => {
@@ -198,10 +216,10 @@ var RefactorTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
198
216
  // }}
199
217
  }), _renderTreeNode(treeData, treeOptionName, protoTreeNode || {}));
200
218
  };
201
- var _useState3 = useState(false),
202
- _useState4 = _slicedToArray(_useState3, 2),
203
- showAllPath = _useState4[0],
204
- setShowAllPath = _useState4[1]; // 显示所有树选择路径
219
+ var _useState5 = useState(false),
220
+ _useState6 = _slicedToArray(_useState5, 2),
221
+ showAllPath = _useState6[0],
222
+ setShowAllPath = _useState6[1]; // 显示所有树选择路径
205
223
  var renderTreeSelectNodePath = function renderTreeSelectNodePath() {
206
224
  //获取节点路径
207
225
  var pathNodes = getNodePaths(treeData, value, {
@@ -260,7 +278,8 @@ var RefactorTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
260
278
  className: "refactor-tree-select ".concat(disabled ? 'refactor-disabled' : '').concat(otherProps.size === 'small' ? ' refactor-tree-select-sm' : ''),
261
279
  title: fullLevelName || ''
262
280
  }, renderTreeSelectNode(), /*#__PURE__*/React.createElement("span", {
263
- className: "refactor-tree-select-extra"
281
+ className: "refactor-tree-select-extra",
282
+ style: fullLevelStyle
264
283
  }, fullLevelName)) : renderTreeSelectNode());
265
284
  });
266
285
  export default RefactorTreeSelect;
@@ -61,6 +61,10 @@ var RefactorTreeSelect = /*#__PURE__*/_react.default.forwardRef(function (props,
61
61
  _useState2 = _slicedToArray(_useState, 2),
62
62
  fullLevelName = _useState2[0],
63
63
  setFullLevelName = _useState2[1];
64
+ var _useState3 = (0, _react.useState)({}),
65
+ _useState4 = _slicedToArray(_useState3, 2),
66
+ fullLevelStyle = _useState4[0],
67
+ setFullLevelStyle = _useState4[1];
64
68
  /*
65
69
  // 下拉浮层显示"全选"功能(未完善)
66
70
  const [indeterminate, setIndeterminate] = useState(false)
@@ -195,6 +199,20 @@ var RefactorTreeSelect = /*#__PURE__*/_react.default.forwardRef(function (props,
195
199
  });
196
200
  setFullLevelName(renderParenName(newNodeInfo));
197
201
  if (_onSelect) _onSelect(value, _objectSpread(_objectSpread({}, node), newNodeInfo.matchNode[0]), extra, newNodeInfo.nodeParent);
202
+ },
203
+ onDropdownVisibleChange: function onDropdownVisibleChange(open) {
204
+ var _otherProps$onDropdow;
205
+ setFullLevelStyle({
206
+ opacity: open ? 0.3 : ''
207
+ });
208
+ otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$onDropdow = otherProps.onDropdownVisibleChange) === null || _otherProps$onDropdow === void 0 ? void 0 : _otherProps$onDropdow.call(otherProps, open);
209
+ },
210
+ onSearch: function onSearch(value) {
211
+ var _otherProps$onSearch;
212
+ setFullLevelStyle({
213
+ opacity: value ? 0 : ''
214
+ });
215
+ otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$onSearch = otherProps.onSearch) === null || _otherProps$onSearch === void 0 ? void 0 : _otherProps$onSearch.call(otherProps, value);
198
216
  }
199
217
  // 下拉浮层中显示"全选"按钮
200
218
  // dropdownRender={(originNode) => {
@@ -207,10 +225,10 @@ var RefactorTreeSelect = /*#__PURE__*/_react.default.forwardRef(function (props,
207
225
  // }}
208
226
  }), _renderTreeNode(treeData, treeOptionName, protoTreeNode || {}));
209
227
  };
210
- var _useState3 = (0, _react.useState)(false),
211
- _useState4 = _slicedToArray(_useState3, 2),
212
- showAllPath = _useState4[0],
213
- setShowAllPath = _useState4[1]; // 显示所有树选择路径
228
+ var _useState5 = (0, _react.useState)(false),
229
+ _useState6 = _slicedToArray(_useState5, 2),
230
+ showAllPath = _useState6[0],
231
+ setShowAllPath = _useState6[1]; // 显示所有树选择路径
214
232
  var renderTreeSelectNodePath = function renderTreeSelectNodePath() {
215
233
  //获取节点路径
216
234
  var pathNodes = (0, _utils.getNodePaths)(treeData, value, {
@@ -269,7 +287,8 @@ var RefactorTreeSelect = /*#__PURE__*/_react.default.forwardRef(function (props,
269
287
  className: "refactor-tree-select ".concat(disabled ? 'refactor-disabled' : '').concat(otherProps.size === 'small' ? ' refactor-tree-select-sm' : ''),
270
288
  title: fullLevelName || ''
271
289
  }, renderTreeSelectNode(), /*#__PURE__*/_react.default.createElement("span", {
272
- className: "refactor-tree-select-extra"
290
+ className: "refactor-tree-select-extra",
291
+ style: fullLevelStyle
273
292
  }, fullLevelName)) : renderTreeSelectNode());
274
293
  });
275
294
  var _default = exports.default = RefactorTreeSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fan-standard-comp",
3
- "version": "3.2.10",
3
+ "version": "3.2.11",
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",