ztxkui 4.3.32 → 4.3.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/dist/Demo.js CHANGED
@@ -110,16 +110,17 @@ function Demo() {
110
110
  React.createElement("p", null, "\u8FDC\u7A0B\u641C\u7D22"),
111
111
  React.createElement(EnhanceSelect, { style: selectStyle,
112
112
  // defaultList={list}
113
- placeholder: "\u53EF\u8FDC\u7A0B\u6A21\u7CCA\u641C\u7D22", url: "http://192.168.0.83:8000/api/zmdms-system/employee/page", request: request, remoteSearch: true, isHandAddItem: true, isRemoteSearchDataKey: false, dataKey: "id", titleKey: "empName", value: value, showAll: true,
113
+ placeholder: "\u53EF\u8FDC\u7A0B\u6A21\u7CCA\u641C\u7D22", url: "http://192.168.0.83:8000/api/zmdms-system/employee/page", request: request, remoteSearch: true,
114
+ // isHandAddItem
115
+ isRemoteSearchDataKey: false, dataKey: "id", titleKey: "empName", value: value,
116
+ // showAll
114
117
  // isPaste
115
118
  onChange: function (value, option, fullData) {
116
119
  console.log(value);
117
120
  setValue(value);
118
121
  }, params: JSON.stringify(params),
119
122
  // value={value}
120
- mode: "multiple", isPage: true,
121
- // defaultList={defaultList}
122
- isClickRequest: true }),
123
+ mode: "multiple", isPage: true }),
123
124
  React.createElement("p", null, "\u4E00\u6B21\u6027\u52A0\u8F7D\u6570\u636E"),
124
125
  React.createElement(EnhanceSelect, { style: selectStyle, placeholder: "\u4E00\u6B21\u6027\u52A0\u8F7D\u6570\u636E", url: "http://192.168.0.83:8000/api/zmdms-system/company/list", request: request, dataKey: "id", titleKey: "name", isClickRequest: true, isPaste: true, mode: "multiple", isHandAddItem: true, value: value3, onChange: function (value, option, fullData) {
125
126
  console.log(value, fullData);
@@ -1,12 +1,50 @@
1
- /// <reference types="react" />
2
1
  import { Dayjs } from 'dayjs';
3
2
  import 'antd/es/date-picker/style/index';
4
- declare const DatePicker: import("react").ComponentClass<import("antd/es/date-picker/generatePicker").PickerProps<Dayjs>, any> & {
5
- WeekPicker: import("react").ComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerDateProps<Dayjs>, "picker">, any>;
6
- MonthPicker: import("react").ComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerDateProps<Dayjs>, "picker">, any>;
7
- YearPicker: import("react").ComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerDateProps<Dayjs>, "picker">, any>;
8
- RangePicker: import("react").ComponentClass<import("antd/es/date-picker/generatePicker").RangePickerProps<Dayjs>, any>;
9
- TimePicker: import("react").ComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerTimeProps<Dayjs>, "picker">, any>;
10
- QuarterPicker: import("react").ComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerTimeProps<Dayjs>, "picker">, any>;
3
+ declare const DatePicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<import("antd/es/date-picker/generatePicker").PickerProps<Dayjs> & {
4
+ status?: "" | "error" | "warning";
5
+ dropdownClassName?: string;
6
+ popupClassName?: string;
7
+ }, unknown> & {
8
+ WeekPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerProps<Dayjs> & {
9
+ status?: "" | "error" | "warning";
10
+ dropdownClassName?: string;
11
+ popupClassName?: string;
12
+ }, "picker">, unknown>;
13
+ MonthPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerProps<Dayjs> & {
14
+ status?: "" | "error" | "warning";
15
+ dropdownClassName?: string;
16
+ popupClassName?: string;
17
+ }, "picker">, unknown>;
18
+ YearPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerProps<Dayjs> & {
19
+ status?: "" | "error" | "warning";
20
+ dropdownClassName?: string;
21
+ popupClassName?: string;
22
+ }, "picker">, unknown>;
23
+ RangePicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<import("antd/es/date-picker/generatePicker").RangePickerProps<Dayjs> & {
24
+ dropdownClassName?: string;
25
+ popupClassName?: string;
26
+ }, unknown>;
27
+ TimePicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<Omit<import("rc-picker/lib/Picker").PickerTimeProps<Dayjs>, "hideHeader" | "locale" | "generateConfig" | "components"> & {
28
+ locale?: import("antd/es/date-picker/generatePicker").PickerLocale;
29
+ size?: import("antd/es/button").ButtonSize;
30
+ placement?: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
31
+ bordered?: boolean;
32
+ status?: "" | "error" | "warning";
33
+ } & {
34
+ status?: "" | "error" | "warning";
35
+ dropdownClassName?: string;
36
+ popupClassName?: string;
37
+ }, "picker">, unknown>;
38
+ QuarterPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<Omit<import("rc-picker/lib/Picker").PickerTimeProps<Dayjs>, "hideHeader" | "locale" | "generateConfig" | "components"> & {
39
+ locale?: import("antd/es/date-picker/generatePicker").PickerLocale;
40
+ size?: import("antd/es/button").ButtonSize;
41
+ placement?: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
42
+ bordered?: boolean;
43
+ status?: "" | "error" | "warning";
44
+ } & {
45
+ status?: "" | "error" | "warning";
46
+ dropdownClassName?: string;
47
+ popupClassName?: string;
48
+ }, "picker">, unknown>;
11
49
  };
12
50
  export default DatePicker;
@@ -147,6 +147,7 @@ export interface IProps<T> extends Omit<SelectProps<T>, 'onChange'> {
147
147
  */
148
148
  isPaste?: boolean;
149
149
  pasteRule?: string[];
150
+ dropdownRenderBtns?: any;
150
151
  }
151
152
  export declare function clearCatchData(url: string): void;
152
153
  /**
@@ -164,6 +165,6 @@ export declare function clearCatchData(url: string): void;
164
165
  * { code: 200, data: { records: [] } } || { status: 200, data: { code: 200, data: { records: [] } } }
165
166
  * 如果数据不能在接口层面满足以上形式,那么组件提供transformData属性,转换接口数据格式
166
167
  */
167
- declare function EnhanceSelect<VT extends SelectValue = SelectValue>({ list, defaultList, params, url, method, timeout, dataKey, componentKey, titleKey, showAll, isCatch, onCompleted, onChange, onSearch, request, remoteSearch, remoteSearchKey, remoteSearchDataKey, isRemoteSearchDataKey, transformData, transformRenderData, joinKey, joinStr, lineFeedKey, lineFeedStr, mustHasParams, disabledValues, searchDeleteKeys, isHandAddItem, isPage, currentSize, isCopy, onFocus, isClickRequest, handleRef, isPaste, pasteRule, ...restProps }: IProps<VT>): JSX.Element;
168
+ declare function EnhanceSelect<VT extends SelectValue = SelectValue>({ list, defaultList, params, url, method, timeout, dataKey, componentKey, titleKey, showAll, isCatch, onCompleted, onChange, onSearch, request, remoteSearch, remoteSearchKey, remoteSearchDataKey, isRemoteSearchDataKey, transformData, transformRenderData, joinKey, joinStr, lineFeedKey, lineFeedStr, mustHasParams, disabledValues, searchDeleteKeys, isHandAddItem, isPage, currentSize, isCopy, onBlur, onFocus, isClickRequest, handleRef, isPaste, pasteRule, dropdownRenderBtns, dropdownMatchSelectWidth, ...restProps }: IProps<VT>): JSX.Element;
168
169
  declare const _default: React.MemoExoticComponent<typeof EnhanceSelect>;
169
170
  export default _default;
@@ -36,6 +36,7 @@ import { useFetchState } from 'ztxkutils/dist/hooks';
36
36
  import debounce from 'lodash/debounce';
37
37
  import { dangerouslySetXss } from 'ztxkutils/dist/tools';
38
38
  import { copyValue } from '../utils';
39
+ import { pinyin } from 'pinyin-pro';
39
40
  /**
40
41
  * 组件缓存的数据格式,在当前浏览器运行内,能保证是唯一的引用,用来缓存数据用
41
42
  * {
@@ -105,6 +106,7 @@ function getData(request, options) {
105
106
  Reflect.deleteProperty(options, 'params');
106
107
  }
107
108
  options.isCatch = true;
109
+ options.isCancelNoCompleteRequest = true;
108
110
  return request(options);
109
111
  }
110
112
  return Promise.resolve({
@@ -150,77 +152,6 @@ function clearNullData(arr, dataKey, titleKey) {
150
152
  return arr;
151
153
  }
152
154
  }
153
- var defaultPasteRule = [',', '-', '\r\n', '\r', '\n', ' '];
154
- // 数据合并
155
- function concatData(originalData, newData, otherParams) {
156
- if (!newData) {
157
- return originalData;
158
- }
159
- var dataKey = otherParams.dataKey, titleKey = otherParams.titleKey;
160
- var resultData = originalData.slice() || [];
161
- if (Array.isArray(newData)) {
162
- newData.forEach(function (item) {
163
- if (!item) {
164
- console.error("\u9047\u5230\u4E86\u6570\u7EC4\u4E2D\u5B58\u5728\u7A7A\u503C\u5F97\u60C5\u51B5\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\u51C6\u786E\u6027!\u5B58\u5728\u95EE\u9898\u5F97\u6570\u636E \u53EF\u80FD\u5728defaultList\u4E2D " + dataKey + "==" + titleKey);
165
- return;
166
- }
167
- // 如果item是手动输入的 不做任何处理
168
- if (item.__is_hand_add) {
169
- resultData.push(item);
170
- }
171
- else {
172
- // 如果源数组中找到了该条数据,那么不添加
173
- // 否则添加
174
- // if (
175
- // !resultData.find(
176
- // (resultItem) =>
177
- // resultItem && item && resultItem[dataKey] === item[dataKey]
178
- // )
179
- // ) {
180
- // resultData.push(item);
181
- // }
182
- // 2022-03-01修改此处逻辑,外部参数可能会传递一些不同的逻辑,可能需要禁用此项
183
- var index = resultData.findIndex(function (resultItem) {
184
- return resultItem && item && resultItem[dataKey] === item[dataKey];
185
- });
186
- if (index === -1) {
187
- // 没有找到直接添加
188
- resultData.push(item);
189
- }
190
- else {
191
- // 找到了,需要替换
192
- var newItem = __assign({}, item);
193
- if (!newItem[titleKey]) {
194
- Reflect.deleteProperty(newItem, titleKey);
195
- }
196
- resultData.splice(index, 1, __assign(__assign({}, resultData[index]), newItem));
197
- }
198
- }
199
- });
200
- }
201
- return resultData;
202
- }
203
- function onMouseDownHandle(e) {
204
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
205
- if (e.button === 2) {
206
- var currentNode_1 = e.target;
207
- var contextmenuHandle_1 = function (e) {
208
- e.preventDefault();
209
- e.stopPropagation();
210
- currentNode_1.removeEventListener('contextmenu', contextmenuHandle_1);
211
- };
212
- currentNode_1.addEventListener('contextmenu', contextmenuHandle_1);
213
- if ((_b = (_a = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.classList) === null || _a === void 0 ? void 0 : _a.contains) === null || _b === void 0 ? void 0 : _b.call(_a, 'ant-select-item-option-content')) {
214
- copyValue((_d = (_c = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.parentNode) === null || _c === void 0 ? void 0 : _c.getAttribute) === null || _d === void 0 ? void 0 : _d.call(_c, 'title'));
215
- }
216
- else if ((_f = (_e = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.classList) === null || _e === void 0 ? void 0 : _e.contains) === null || _f === void 0 ? void 0 : _f.call(_e, 'zt-select--feed-item')) {
217
- copyValue((_j = (_h = (_g = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.parentNode) === null || _g === void 0 ? void 0 : _g.parentNode) === null || _h === void 0 ? void 0 : _h.getAttribute) === null || _j === void 0 ? void 0 : _j.call(_h, 'title'));
218
- }
219
- else {
220
- copyValue(currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.innerText);
221
- }
222
- }
223
- }
224
155
  /**
225
156
  * 增强下拉框功能组件
226
157
  * 添加远程搜索
@@ -237,27 +168,30 @@ function onMouseDownHandle(e) {
237
168
  * 如果数据不能在接口层面满足以上形式,那么组件提供transformData属性,转换接口数据格式
238
169
  */
239
170
  function EnhanceSelect(_a) {
240
- var list = _a.list, defaultList = _a.defaultList, params = _a.params, url = _a.url, _b = _a.method, method = _b === void 0 ? 'GET' : _b, _c = _a.timeout, timeout = _c === void 0 ? 60000 : _c, _d = _a.dataKey, dataKey = _d === void 0 ? 'id' : _d, componentKey = _a.componentKey, _e = _a.titleKey, titleKey = _e === void 0 ? 'name' : _e, showAll = _a.showAll, isCatch = _a.isCatch, onCompleted = _a.onCompleted, onChange = _a.onChange, onSearch = _a.onSearch, request = _a.request, remoteSearch = _a.remoteSearch, remoteSearchKey = _a.remoteSearchKey, remoteSearchDataKey = _a.remoteSearchDataKey, _f = _a.isRemoteSearchDataKey, isRemoteSearchDataKey = _f === void 0 ? true : _f, transformData = _a.transformData, transformRenderData = _a.transformRenderData, joinKey = _a.joinKey, _g = _a.joinStr, joinStr = _g === void 0 ? '-' : _g, lineFeedKey = _a.lineFeedKey, _h = _a.lineFeedStr, lineFeedStr = _h === void 0 ? '-' : _h, mustHasParams = _a.mustHasParams, disabledValues = _a.disabledValues, searchDeleteKeys = _a.searchDeleteKeys, isHandAddItem = _a.isHandAddItem, isPage = _a.isPage, _j = _a.currentSize, currentSize = _j === void 0 ? 30 : _j, isCopy = _a.isCopy, onFocus = _a.onFocus, isClickRequest = _a.isClickRequest, handleRef = _a.handleRef, isPaste = _a.isPaste, _k = _a.pasteRule, pasteRule = _k === void 0 ? defaultPasteRule : _k, restProps = __rest(_a, ["list", "defaultList", "params", "url", "method", "timeout", "dataKey", "componentKey", "titleKey", "showAll", "isCatch", "onCompleted", "onChange", "onSearch", "request", "remoteSearch", "remoteSearchKey", "remoteSearchDataKey", "isRemoteSearchDataKey", "transformData", "transformRenderData", "joinKey", "joinStr", "lineFeedKey", "lineFeedStr", "mustHasParams", "disabledValues", "searchDeleteKeys", "isHandAddItem", "isPage", "currentSize", "isCopy", "onFocus", "isClickRequest", "handleRef", "isPaste", "pasteRule"]);
171
+ var list = _a.list, defaultList = _a.defaultList, params = _a.params, url = _a.url, _b = _a.method, method = _b === void 0 ? 'GET' : _b, _c = _a.timeout, timeout = _c === void 0 ? 60000 : _c, _d = _a.dataKey, dataKey = _d === void 0 ? 'id' : _d, componentKey = _a.componentKey, _e = _a.titleKey, titleKey = _e === void 0 ? 'name' : _e, showAll = _a.showAll, isCatch = _a.isCatch, onCompleted = _a.onCompleted, onChange = _a.onChange, onSearch = _a.onSearch, request = _a.request, remoteSearch = _a.remoteSearch, remoteSearchKey = _a.remoteSearchKey, remoteSearchDataKey = _a.remoteSearchDataKey, _f = _a.isRemoteSearchDataKey, isRemoteSearchDataKey = _f === void 0 ? true : _f, transformData = _a.transformData, transformRenderData = _a.transformRenderData, joinKey = _a.joinKey, _g = _a.joinStr, joinStr = _g === void 0 ? '-' : _g, lineFeedKey = _a.lineFeedKey, _h = _a.lineFeedStr, lineFeedStr = _h === void 0 ? '-' : _h, mustHasParams = _a.mustHasParams, disabledValues = _a.disabledValues, searchDeleteKeys = _a.searchDeleteKeys, isHandAddItem = _a.isHandAddItem, isPage = _a.isPage, _j = _a.currentSize, currentSize = _j === void 0 ? 30 : _j, isCopy = _a.isCopy, onBlur = _a.onBlur, onFocus = _a.onFocus, isClickRequest = _a.isClickRequest, handleRef = _a.handleRef, isPaste = _a.isPaste, _k = _a.pasteRule, pasteRule = _k === void 0 ? [',', '-', '\r\n', '\r', '\n', ' '] : _k, dropdownRenderBtns = _a.dropdownRenderBtns, _l = _a.dropdownMatchSelectWidth, dropdownMatchSelectWidth = _l === void 0 ? 150 : _l, restProps = __rest(_a, ["list", "defaultList", "params", "url", "method", "timeout", "dataKey", "componentKey", "titleKey", "showAll", "isCatch", "onCompleted", "onChange", "onSearch", "request", "remoteSearch", "remoteSearchKey", "remoteSearchDataKey", "isRemoteSearchDataKey", "transformData", "transformRenderData", "joinKey", "joinStr", "lineFeedKey", "lineFeedStr", "mustHasParams", "disabledValues", "searchDeleteKeys", "isHandAddItem", "isPage", "currentSize", "isCopy", "onBlur", "onFocus", "isClickRequest", "handleRef", "isPaste", "pasteRule", "dropdownRenderBtns", "dropdownMatchSelectWidth"]);
172
+ // TODO: 注释动态设置open逻辑 start
173
+ // const currentClick = useRef<boolean>(true);
174
+ // TODO: 注释动态设置open逻辑 end
241
175
  // 下拉数据源
242
- var _l = useFetchState([]), selectList = _l[0], setSelectList = _l[1];
176
+ var _m = useFetchState([]), selectList = _m[0], setSelectList = _m[1];
243
177
  // 手动添加的数据源
244
- var _m = useState([]), handleAddItems = _m[0], setHandleAddItems = _m[1];
178
+ var _o = useState([]), handleAddItems = _o[0], setHandleAddItems = _o[1];
245
179
  // 多选时,自己需要合并的数据
246
- var _o = useFetchState([]), multipleList = _o[0], setMultipleList = _o[1];
247
- var _p = useFetchState(false), loading = _p[0], setLoading = _p[1];
180
+ var _p = useFetchState([]), multipleList = _p[0], setMultipleList = _p[1];
181
+ var _q = useFetchState(false), loading = _q[0], setLoading = _q[1];
248
182
  var fetchId = useRef(0); // 请求Id,每次请求都会加1
249
183
  // 是否使用过远程搜索主键key
250
- var _q = useFetchState(false), firstLoading = _q[0], setFirstLoading = _q[1];
184
+ var _r = useFetchState(false), firstLoading = _r[0], setFirstLoading = _r[1];
251
185
  // 第一次清空时,才做远程查询
252
- var _r = useFetchState(false), firstClearData = _r[0], setFirstClearData = _r[1];
186
+ var _s = useFetchState(false), firstClearData = _s[0], setFirstClearData = _s[1];
253
187
  // 获得焦点选中
254
- var _s = useState(false), isOpen = _s[0], setIsOpen = _s[1];
188
+ var _t = useState(false), isOpen = _t[0], setIsOpen = _t[1];
255
189
  // 当前搜索文本
256
- var _t = useState(), searchValue = _t[0], setSearchValue = _t[1];
190
+ var _u = useState(), searchValue = _u[0], setSearchValue = _u[1];
257
191
  // 当前页
258
- var _u = useState(1), currentPage = _u[0], setCurrentPage = _u[1];
192
+ var _v = useState(1), currentPage = _v[0], setCurrentPage = _v[1];
259
193
  // 总条数
260
- var _v = useState(0), count = _v[0], setCount = _v[1];
194
+ var _w = useState(0), count = _w[0], setCount = _w[1];
261
195
  // 是否自动请求
262
196
  var isAutoRequest = useRef(false); // 请求过了
263
197
  // 自动填词
@@ -335,7 +269,17 @@ function EnhanceSelect(_a) {
335
269
  setSelectList(result);
336
270
  if (otherObj === null || otherObj === void 0 ? void 0 : otherObj.appointObj) {
337
271
  var _c = otherObj === null || otherObj === void 0 ? void 0 : otherObj.appointObj, obj = _c.obj, key = _c.key;
338
- obj[key] = result;
272
+ // 排除数据量过大的数据 不进入缓存
273
+ if (result.length > 2000) {
274
+ try {
275
+ obj[key] = null;
276
+ Reflect.deleteProperty(obj, key);
277
+ }
278
+ catch (err) { }
279
+ }
280
+ else {
281
+ obj[key] = result;
282
+ }
339
283
  }
340
284
  })
341
285
  .catch(function (err) {
@@ -344,7 +288,43 @@ function EnhanceSelect(_a) {
344
288
  setLoading(false);
345
289
  console.log(err);
346
290
  });
347
- }, [setSelectList, setLoading, transformData, mustHasParams]);
291
+ },
292
+ // 去掉 transformData 作为依赖,这个会触发副作用
293
+ // eslint-disable-next-line react-hooks/exhaustive-deps
294
+ [setSelectList, setLoading, mustHasParams]);
295
+ // 分词粘贴
296
+ function pasteHandle(value) {
297
+ if (isPaste && restProps.mode === 'multiple') {
298
+ var pasteRuleIndex = pasteRule.findIndex(function (item) { return value.indexOf(item) !== -1; });
299
+ if (pasteRuleIndex !== -1) {
300
+ var splitStr = pasteRule[pasteRuleIndex];
301
+ var resultValue = value.split(splitStr);
302
+ resultValue = Array.from(new Set(resultValue));
303
+ if (Array.isArray(restProps.value)) {
304
+ try {
305
+ resultValue = restProps.value.concat(resultValue.filter(function (v) {
306
+ return (restProps.value.findIndex(function (i) { var _a; return ((_a = i === null || i === void 0 ? void 0 : i.toString) === null || _a === void 0 ? void 0 : _a.call(i)) === v; }) === -1);
307
+ }));
308
+ }
309
+ catch (err) { }
310
+ }
311
+ autoPasteListRef.current = resultValue.map(function (v) {
312
+ var _a;
313
+ return (_a = {},
314
+ _a[dataKey] = v,
315
+ _a[titleKey] = v,
316
+ _a);
317
+ });
318
+ onChangeHandle(resultValue, resultValue);
319
+ setTimeout(function () {
320
+ var _a, _b;
321
+ (_b = (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.blur) === null || _b === void 0 ? void 0 : _b.call(_a);
322
+ }, 300);
323
+ return true;
324
+ }
325
+ }
326
+ return false;
327
+ }
348
328
  // 远程搜索
349
329
  var getRemoteDataHandle = useCallback(function (value, dataKeyValue, otherObj) {
350
330
  if (otherObj === void 0) { otherObj = {}; }
@@ -385,7 +365,7 @@ function EnhanceSelect(_a) {
385
365
  ? dataKeyValue.length
386
366
  : currentSize, current: (otherObj === null || otherObj === void 0 ? void 0 : otherObj.currentPage) ? otherObj === null || otherObj === void 0 ? void 0 : otherObj.currentPage : 1 }, outParams), searchParams) }, ((otherObj === null || otherObj === void 0 ? void 0 : otherObj.options) || {})))
387
367
  .then(function (resData) {
388
- var _a, _b, _c, _d, _e, _f;
368
+ var _a, _b, _c, _d, _e, _f, _g, _h;
389
369
  (_a = otherObj === null || otherObj === void 0 ? void 0 : otherObj.sucessCallback) === null || _a === void 0 ? void 0 : _a.call(otherObj);
390
370
  if (fetchIdClosure < fetchId.current) {
391
371
  return;
@@ -407,7 +387,7 @@ function EnhanceSelect(_a) {
407
387
  result = ((_e = (_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.records) || [];
408
388
  }
409
389
  }
410
- setCount(((_f = res === null || res === void 0 ? void 0 : res.data) === null || _f === void 0 ? void 0 : _f.total) || 0);
390
+ setCount(((_f = res === null || res === void 0 ? void 0 : res.data) === null || _f === void 0 ? void 0 : _f.total) || ((_h = (_g = res === null || res === void 0 ? void 0 : res.data) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.total) || 0);
411
391
  // 如果根据id查过了,那么需要把这些数据添加到自定义合并数组中
412
392
  if (dataKeyValue) {
413
393
  var values = (dataKeyValue + '').split(',');
@@ -430,7 +410,10 @@ function EnhanceSelect(_a) {
430
410
  setLoading(false);
431
411
  console.log(err);
432
412
  });
433
- }, [
413
+ },
414
+ // 去掉 transformData 作为依赖,这个会触发副作用,开发再使用的时候 不会注意这点
415
+ // eslint-disable-next-line react-hooks/exhaustive-deps
416
+ [
434
417
  url,
435
418
  params,
436
419
  method,
@@ -440,159 +423,15 @@ function EnhanceSelect(_a) {
440
423
  titleKey,
441
424
  dataKey,
442
425
  setSelectList,
443
- transformData,
444
426
  setLoading,
445
427
  setMultipleList,
446
428
  searchDeleteKeys,
447
429
  currentSize,
448
430
  ]);
449
- // onChange 方法
450
- var onChangeHandle = useCallback(function (value, option) {
451
- setFirstLoading(true);
452
- if (((Array.isArray(value) && value.length === 0) || !value) &&
453
- remoteSearch &&
454
- !firstClearData) {
455
- console.log('第一次清空数据时,做一次远程查询');
456
- setFirstClearData(true);
457
- getRemoteDataHandle('', '');
458
- }
459
- // const _defaultList = Array.isArray(defaultList) ? defaultList : [];
460
- var _defaultList = clearNullData(Array.isArray(defaultList) ? defaultList : [], dataKey, titleKey);
461
- var currentList = concatData(concatData(concatData(concatData(selectList || [], _defaultList, { dataKey: dataKey, titleKey: titleKey }), multipleList || [], { dataKey: dataKey, titleKey: titleKey }), handleAddItems, { dataKey: dataKey, titleKey: titleKey }), autoPasteListRef.current, { dataKey: dataKey, titleKey: titleKey });
462
- if (currentList && Array.isArray(currentList)) {
463
- var key_1 = dataKey;
464
- // 支持多选模式
465
- var currentData = void 0;
466
- if (Array.isArray(value)) {
467
- currentData = value.map(function (valueItem) {
468
- return currentList.find(function (item) {
469
- var _a, _b;
470
- if (!item) {
471
- return false;
472
- }
473
- if (item[key_1] == null) {
474
- return false;
475
- }
476
- else {
477
- return ((_b = (_a = item[key_1]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === valueItem;
478
- }
479
- });
480
- });
481
- currentData = currentData === null || currentData === void 0 ? void 0 : currentData.filter(function (item) { return item; });
482
- if (remoteSearch) {
483
- setMultipleList(currentData === null || currentData === void 0 ? void 0 : currentData.filter(function (item) { return !item.__is_hand_add; }));
484
- }
485
- }
486
- else {
487
- currentData = currentList.find(function (item) {
488
- var _a, _b;
489
- if (!item) {
490
- return false;
491
- }
492
- if (item[key_1] == null) {
493
- return false;
494
- }
495
- else {
496
- return ((_b = (_a = item[key_1]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === value;
497
- }
498
- });
499
- }
500
- // 因为将数据类型转成了字符串,可能导致value的数据类型跟原数据数据类型不一致
501
- // 这里将value赋值成原数据中的数据
502
- var __value = value;
503
- if (showAll) {
504
- // 表示选中了全部
505
- if (Array.isArray(__value) && __value.length > 0) {
506
- // 如果最后一个选的是全部 那就是只要全部
507
- if (__value[__value.length - 1] === '') {
508
- __value = [''];
509
- }
510
- else {
511
- // 否则 最后一个不是全部,那就去掉全部
512
- __value = currentData.map(function (item) { return item[key_1]; });
513
- }
514
- }
515
- else if (!Array.isArray(__value) &&
516
- __value != null &&
517
- currentData) {
518
- __value = currentData[key_1];
519
- }
520
- }
521
- else {
522
- if (currentData) {
523
- if (Array.isArray(__value) && __value.length > 0) {
524
- __value = currentData.map(function (item) { return item[key_1]; });
525
- }
526
- else if (!Array.isArray(__value) && __value != null) {
527
- __value = currentData[key_1];
528
- }
529
- }
530
- }
531
- onChange && onChange(__value, option, currentData);
532
- }
533
- else {
534
- onChange && onChange(value, option);
535
- }
536
- }, [
537
- dataKey,
538
- defaultList,
539
- firstClearData,
540
- getRemoteDataHandle,
541
- multipleList,
542
- onChange,
543
- remoteSearch,
544
- selectList,
545
- setFirstClearData,
546
- setFirstLoading,
547
- setMultipleList,
548
- showAll,
549
- titleKey,
550
- handleAddItems,
551
- ]);
552
- // 分词粘贴
553
- var pasteHandle = useCallback(function (value) {
554
- if (isPaste && restProps.mode === 'multiple') {
555
- var pasteRuleIndex = pasteRule.findIndex(function (item) { return value.indexOf(item) !== -1; });
556
- if (pasteRuleIndex !== -1) {
557
- var splitStr = pasteRule[pasteRuleIndex];
558
- var resultValue = value.split(splitStr);
559
- resultValue = Array.from(new Set(resultValue));
560
- if (Array.isArray(restProps.value)) {
561
- try {
562
- resultValue = restProps.value.concat(resultValue.filter(function (v) {
563
- return (restProps.value.findIndex(function (i) { var _a; return ((_a = i === null || i === void 0 ? void 0 : i.toString) === null || _a === void 0 ? void 0 : _a.call(i)) === v; }) === -1);
564
- }));
565
- }
566
- catch (err) { }
567
- }
568
- autoPasteListRef.current = resultValue.map(function (v) {
569
- var _a;
570
- return (_a = {},
571
- _a[dataKey] = v,
572
- _a[titleKey] = v,
573
- _a);
574
- });
575
- onChangeHandle(resultValue, resultValue);
576
- setTimeout(function () {
577
- var _a, _b;
578
- (_b = (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.blur) === null || _b === void 0 ? void 0 : _b.call(_a);
579
- }, 300);
580
- return true;
581
- }
582
- }
583
- return false;
584
- }, [
585
- dataKey,
586
- isPaste,
587
- onChangeHandle,
588
- pasteRule,
589
- restProps.mode,
590
- restProps.value,
591
- titleKey,
592
- ]);
593
- var searchHandle = useCallback(function (value) {
431
+ var searchHandle = function (value) {
594
432
  var _a;
595
433
  // 当value有值时才进行搜索
434
+ // if (value) {
596
435
  var result = pasteHandle(value);
597
436
  if (result) {
598
437
  return;
@@ -614,16 +453,10 @@ function EnhanceSelect(_a) {
614
453
  }
615
454
  onSearch && onSearch(value);
616
455
  getRemoteDataHandle(value, '');
617
- }, [
618
- dataKey,
619
- getRemoteDataHandle,
620
- isHandAddItem,
621
- onSearch,
622
- pasteHandle,
623
- titleKey,
624
- ]);
456
+ // }
457
+ };
625
458
  var onSearchHandle = debounce(searchHandle, 500);
626
- var onSearchHandleInner = useCallback(function (value) {
459
+ var onSearchHandleInner = function (value) {
627
460
  var _a;
628
461
  // console.log(value);
629
462
  var result = pasteHandle(value);
@@ -646,7 +479,7 @@ function EnhanceSelect(_a) {
646
479
  }
647
480
  }
648
481
  onSearch && onSearch(value);
649
- }, [dataKey, isHandAddItem, onSearch, pasteHandle, titleKey]);
482
+ };
650
483
  // 1、如果传入list的话,那么直接使用list数据
651
484
  useEffect(function () {
652
485
  if (Array.isArray(list)) {
@@ -693,7 +526,7 @@ function EnhanceSelect(_a) {
693
526
  url,
694
527
  remoteSearch,
695
528
  ]);
696
- var sendRequestNoCatch = useCallback(function () {
529
+ var sendRequestNoCatch = function () {
697
530
  if (!url || remoteSearch) {
698
531
  return;
699
532
  }
@@ -720,16 +553,7 @@ function EnhanceSelect(_a) {
720
553
  isForceRequest: true,
721
554
  });
722
555
  }
723
- }, [
724
- getDataHandle,
725
- isCatch,
726
- method,
727
- params,
728
- remoteSearch,
729
- request,
730
- timeout,
731
- url,
732
- ]);
556
+ };
733
557
  useEffect(function () {
734
558
  if (!url || remoteSearch) {
735
559
  return;
@@ -743,7 +567,7 @@ function EnhanceSelect(_a) {
743
567
  var catchDataKey = params ? JSON.stringify(params) : 'single';
744
568
  if (catchData[catchDataKey]) {
745
569
  // 读取缓存数据
746
- fetchId.current++;
570
+ fetchId.current++; // fetchId +1 防止之前的请求覆盖之后的数据
747
571
  setLoading(false);
748
572
  setSelectList(catchData[catchDataKey]);
749
573
  }
@@ -814,7 +638,8 @@ function EnhanceSelect(_a) {
814
638
  setFirstLoading(true);
815
639
  return;
816
640
  }
817
- if (!restProps.value) {
641
+ if (!restProps.value ||
642
+ (Array.isArray(restProps.value) && restProps.value.length === 0)) {
818
643
  // console.log('第一次请求数据');
819
644
  getRemoteDataHandle('', '');
820
645
  }
@@ -855,7 +680,8 @@ function EnhanceSelect(_a) {
855
680
  isAutoRequest.current = false;
856
681
  return;
857
682
  }
858
- if (!restProps.value) {
683
+ if (!restProps.value ||
684
+ (Array.isArray(restProps.value) && restProps.value.length === 0)) {
859
685
  // console.log('第一次请求数据');
860
686
  getRemoteDataHandle('', '');
861
687
  }
@@ -916,15 +742,58 @@ function EnhanceSelect(_a) {
916
742
  isRemoteSearchDataKey,
917
743
  isClickRequest,
918
744
  ]);
745
+ // 数据合并
746
+ function concatData(originalData, newData) {
747
+ if (!newData) {
748
+ return originalData;
749
+ }
750
+ var resultData = originalData.slice() || [];
751
+ if (Array.isArray(newData)) {
752
+ newData.forEach(function (item) {
753
+ if (!item) {
754
+ console.error("\u9047\u5230\u4E86\u6570\u7EC4\u4E2D\u5B58\u5728\u7A7A\u503C\u5F97\u60C5\u51B5\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\u51C6\u786E\u6027!\u5B58\u5728\u95EE\u9898\u5F97\u6570\u636E \u53EF\u80FD\u5728defaultList\u4E2D " + url + "==" + dataKey + "==" + titleKey);
755
+ return;
756
+ }
757
+ // 如果item是手动输入的 不做任何处理
758
+ if (item.__is_hand_add) {
759
+ resultData.push(item);
760
+ }
761
+ // 如果源数组中找到了该条数据,那么不添加
762
+ // 否则添加
763
+ // if (
764
+ // !resultData.find(
765
+ // (resultItem) =>
766
+ // resultItem && item && resultItem[dataKey] === item[dataKey]
767
+ // )
768
+ // ) {
769
+ // resultData.push(item);
770
+ // }
771
+ // 2022-03-01修改此处逻辑,外部参数可能会传递一些不同的逻辑,可能需要禁用此项
772
+ var index = resultData.findIndex(function (resultItem) {
773
+ return resultItem && item && resultItem[dataKey] === item[dataKey];
774
+ });
775
+ if (index === -1) {
776
+ // 没有找到直接添加
777
+ resultData.push(item);
778
+ }
779
+ else {
780
+ // 找到了,需要替换
781
+ var newItem = __assign({}, item);
782
+ if (!newItem[titleKey]) {
783
+ Reflect.deleteProperty(newItem, titleKey);
784
+ }
785
+ resultData.splice(index, 1, __assign(__assign({}, resultData[index]), newItem));
786
+ }
787
+ });
788
+ }
789
+ return resultData;
790
+ }
919
791
  // 渲染数据
920
- var renderSelectOption = useMemo(function () {
792
+ function renderSelectOption() {
921
793
  // const _defaultList = Array.isArray(defaultList) ? defaultList : [];
922
794
  var _defaultList = clearNullData(Array.isArray(defaultList) ? defaultList : [], dataKey, titleKey);
923
795
  var resultList = Array.isArray(selectList)
924
- ? concatData(concatData(concatData(selectList, _defaultList, { dataKey: dataKey, titleKey: titleKey }), multipleList, {
925
- dataKey: dataKey,
926
- titleKey: titleKey,
927
- }), handleAddItems, { dataKey: dataKey, titleKey: titleKey })
796
+ ? concatData(concatData(concatData(selectList, _defaultList), multipleList), handleAddItems)
928
797
  : [];
929
798
  var newResultList = transformRenderData
930
799
  ? transformRenderData(resultList)
@@ -979,25 +848,9 @@ function EnhanceSelect(_a) {
979
848
  Array.isArray(joinTitle) ? joinTitle === null || joinTitle === void 0 ? void 0 : joinTitle.join(joinStr) : '',
980
849
  Array.isArray(linefeedTitle) && linefeedTitle.length > 0 ? (React.createElement("div", { className: "zt-select--feed-item" }, linefeedTitle === null || linefeedTitle === void 0 ? void 0 : linefeedTitle.join(lineFeedStr))) : ('')));
981
850
  })));
982
- }, [
983
- componentKey,
984
- dataKey,
985
- defaultList,
986
- disabledValues,
987
- handleAddItems,
988
- joinKey,
989
- joinStr,
990
- lineFeedKey,
991
- lineFeedStr,
992
- multipleList,
993
- selectList,
994
- showAll,
995
- titleKey,
996
- transformRenderData,
997
- url,
998
- ]);
851
+ }
999
852
  // 本地搜索
1000
- var filterOptionHandle = useCallback(function (input, option) {
853
+ var filterOptionHandle = function (input, option) {
1001
854
  if (isPaste && restProps.mode === 'multiple') {
1002
855
  var pasteRuleIndex = pasteRule.findIndex(function (item) { return input.indexOf(item) !== -1; });
1003
856
  if (pasteRuleIndex !== -1) {
@@ -1005,35 +858,127 @@ function EnhanceSelect(_a) {
1005
858
  }
1006
859
  }
1007
860
  var text = textContent(option === null || option === void 0 ? void 0 : option.children);
1008
- return (text === null || text === void 0 ? void 0 : text.toLowerCase().indexOf(input.toLowerCase().trim())) >= 0;
1009
- }, [isPaste, pasteRule, restProps.mode]);
861
+ // 全拼
862
+ var textPinyin = pinyin(text, { toneType: 'none' }).replace(/\s+/g, '');
863
+ // 首字母
864
+ var textPinyinInitial = pinyin(text, {
865
+ pattern: 'first',
866
+ toneType: 'none',
867
+ }).replace(/\s+/g, '');
868
+ return [text, textPinyin, textPinyinInitial].some(function (item) { return (item === null || item === void 0 ? void 0 : item.toLowerCase().indexOf(input.toLowerCase().trim())) >= 0; });
869
+ };
870
+ // onChange 方法
871
+ function onChangeHandle(value, option) {
872
+ setFirstLoading(true);
873
+ if (((Array.isArray(value) && value.length === 0) || !value) &&
874
+ remoteSearch &&
875
+ !firstClearData) {
876
+ console.log('第一次清空数据时,做一次远程查询');
877
+ setFirstClearData(true);
878
+ getRemoteDataHandle('', '');
879
+ }
880
+ // const _defaultList = Array.isArray(defaultList) ? defaultList : [];
881
+ var _defaultList = clearNullData(Array.isArray(defaultList) ? defaultList : [], dataKey, titleKey);
882
+ var currentList = concatData(concatData(concatData(selectList || [], _defaultList), multipleList || []), autoPasteListRef.current);
883
+ if (currentList && Array.isArray(currentList)) {
884
+ var key_1 = dataKey;
885
+ // 支持多选模式
886
+ var currentData = void 0;
887
+ if (Array.isArray(value)) {
888
+ currentData = value.map(function (valueItem) {
889
+ return currentList.find(function (item) {
890
+ var _a, _b;
891
+ if (!item) {
892
+ return false;
893
+ }
894
+ if (item[key_1] == null) {
895
+ return false;
896
+ }
897
+ else {
898
+ return ((_b = (_a = item[key_1]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === valueItem;
899
+ }
900
+ });
901
+ });
902
+ currentData = currentData === null || currentData === void 0 ? void 0 : currentData.filter(function (item) { return item; });
903
+ if (remoteSearch) {
904
+ setMultipleList(currentData);
905
+ }
906
+ }
907
+ else {
908
+ currentData = currentList.find(function (item) {
909
+ var _a, _b;
910
+ if (!item) {
911
+ return false;
912
+ }
913
+ if (item[key_1] == null) {
914
+ return false;
915
+ }
916
+ else {
917
+ return ((_b = (_a = item[key_1]) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) === value;
918
+ }
919
+ });
920
+ }
921
+ // 因为将数据类型转成了字符串,可能导致value的数据类型跟原数据数据类型不一致
922
+ // 这里将value赋值成原数据中的数据
923
+ var __value = value;
924
+ if (showAll) {
925
+ // 表示选中了全部
926
+ if (Array.isArray(__value) && __value.length > 0) {
927
+ // 如果最后一个选的是全部 那就是只要全部
928
+ if (__value[__value.length - 1] === '') {
929
+ __value = [''];
930
+ }
931
+ else {
932
+ // 否则 最后一个不是全部,那就去掉全部
933
+ __value = currentData.map(function (item) { return item[key_1]; });
934
+ }
935
+ }
936
+ else if (!Array.isArray(__value) && __value != null && currentData) {
937
+ __value = currentData[key_1];
938
+ }
939
+ }
940
+ else {
941
+ if (currentData) {
942
+ if (Array.isArray(__value) && __value.length > 0) {
943
+ __value = currentData.map(function (item) { return item[key_1]; });
944
+ }
945
+ else if (!Array.isArray(__value) && __value != null) {
946
+ __value = currentData[key_1];
947
+ }
948
+ }
949
+ }
950
+ onChange && onChange(__value, option, currentData);
951
+ }
952
+ else {
953
+ onChange && onChange(value, option);
954
+ }
955
+ }
1010
956
  // 焦点事件
1011
- var onFocusHandle = useCallback(function (e) {
957
+ var onFocusHandle = function (e) {
1012
958
  // console.log('焦点事件');
1013
- if (!clearClick.current) {
1014
- clearClick.current = false;
1015
- setIsOpen(true);
1016
- }
959
+ setIsOpen(true);
1017
960
  onFocus && onFocus(e);
1018
- }, [onFocus]);
1019
- // 清空事件
1020
- // TODO: 注释动态设置open逻辑 start
1021
- var clearClick = useRef(false);
1022
- // TODO: 注释动态设置open逻辑 end
1023
- var onClearHandle = useCallback(function () {
1024
- // 清空
1025
- clearClick.current = true;
1026
- }, []);
961
+ };
962
+ var onBlurHandle = function (e) {
963
+ onBlur && onBlur(e);
964
+ if (restProps.mode === 'multiple' && remoteSearch) {
965
+ searchHandle('');
966
+ }
967
+ };
968
+ // 清空数据时
969
+ var onClearHandle = function () {
970
+ // console.log('清空数据事件');
971
+ };
1027
972
  // 选中时
1028
- var onSelectHandle = useCallback(function (value, obj) {
973
+ var onSelectHandle = function (value, obj) {
1029
974
  // console.log('选中数据事件');
1030
975
  if (restProps.mode !== 'multiple' && isCopy) {
1031
976
  var text = textContent(obj.children);
1032
977
  copyValue(text);
1033
978
  }
1034
- }, [isCopy, restProps.mode]);
979
+ };
1035
980
  // 点击时
1036
- var onClickHandle = useCallback(function (e) {
981
+ var onClickHandle = function (e) {
1037
982
  // console.log('点击事件', currentClick.current);
1038
983
  if (!isAutoRequest.current && isClickRequest) {
1039
984
  isAutoRequest.current = true;
@@ -1041,9 +986,9 @@ function EnhanceSelect(_a) {
1041
986
  sendRemoteRequest();
1042
987
  sendRemoteRequest1();
1043
988
  }
1044
- }, [isClickRequest, sendRemoteRequest, sendRemoteRequest1, sendRequest]);
989
+ };
1045
990
  // 滚动加载
1046
- var onPopupScrollHandle = useCallback(function (e) {
991
+ var onPopupScrollHandle = function (e) {
1047
992
  var target = e.target;
1048
993
  // console.log(target.scrollTop + target.offsetHeight, target.scrollHeight);
1049
994
  if (target.scrollTop + target.offsetHeight >= target.scrollHeight - 100) {
@@ -1054,16 +999,7 @@ function EnhanceSelect(_a) {
1054
999
  });
1055
1000
  }
1056
1001
  }
1057
- }, [
1058
- count,
1059
- currentPage,
1060
- getRemoteDataHandle,
1061
- isPage,
1062
- loading,
1063
- remoteSearch,
1064
- searchValue,
1065
- selectList.length,
1066
- ]);
1002
+ };
1067
1003
  // 暴露一些方法给外部使用
1068
1004
  useImperativeHandle(handleRef, function () { return ({
1069
1005
  sendRequestNoCatch: sendRequestNoCatch,
@@ -1135,7 +1071,28 @@ function EnhanceSelect(_a) {
1135
1071
  }
1136
1072
  },
1137
1073
  }); });
1138
- return (React.createElement(Select, __assign({ defaultValue: showAll ? '' : undefined, allowClear: true, onClear: onClearHandle, showSearch: true, filterOption: remoteSearch ? false : filterOptionHandle, onSearch: remoteSearch ? onSearchHandle : onSearchHandleInner, onChange: onChangeHandle, optionLabelProp: "title", loading: loading, onFocus: onFocusHandle, onSelect: onSelectHandle, onClick: onClickHandle, onMouseDown: onMouseDownHandle,
1074
+ var onMouseDownHandle = function (e) {
1075
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1076
+ if (e.button === 2) {
1077
+ var currentNode_1 = e.target;
1078
+ var contextmenuHandle_1 = function (e) {
1079
+ e.preventDefault();
1080
+ e.stopPropagation();
1081
+ currentNode_1.removeEventListener('contextmenu', contextmenuHandle_1);
1082
+ };
1083
+ currentNode_1.addEventListener('contextmenu', contextmenuHandle_1);
1084
+ if ((_b = (_a = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.classList) === null || _a === void 0 ? void 0 : _a.contains) === null || _b === void 0 ? void 0 : _b.call(_a, 'ant-select-item-option-content')) {
1085
+ copyValue((_d = (_c = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.parentNode) === null || _c === void 0 ? void 0 : _c.getAttribute) === null || _d === void 0 ? void 0 : _d.call(_c, 'title'));
1086
+ }
1087
+ else if ((_f = (_e = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.classList) === null || _e === void 0 ? void 0 : _e.contains) === null || _f === void 0 ? void 0 : _f.call(_e, 'zt-select--feed-item')) {
1088
+ copyValue((_j = (_h = (_g = currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.parentNode) === null || _g === void 0 ? void 0 : _g.parentNode) === null || _h === void 0 ? void 0 : _h.getAttribute) === null || _j === void 0 ? void 0 : _j.call(_h, 'title'));
1089
+ }
1090
+ else {
1091
+ copyValue(currentNode_1 === null || currentNode_1 === void 0 ? void 0 : currentNode_1.innerText);
1092
+ }
1093
+ }
1094
+ };
1095
+ return (React.createElement(Select, __assign({ defaultValue: showAll ? '' : undefined, allowClear: true, showSearch: true, filterOption: remoteSearch ? false : filterOptionHandle, onSearch: remoteSearch ? onSearchHandle : onSearchHandleInner, onChange: onChangeHandle, optionLabelProp: "title", loading: loading, onFocus: onFocusHandle, onBlur: onBlurHandle, onClear: onClearHandle, onSelect: onSelectHandle, onClick: onClickHandle, onMouseDown: onMouseDownHandle,
1139
1096
  // getPopupContainer={(trigger) => trigger || document.body}
1140
1097
  open: isOpen, onDropdownVisibleChange: function (visible) { return setIsOpen(visible); }, onPopupScroll: onPopupScrollHandle, dropdownRender: url && !remoteSearch && isCatch
1141
1098
  ? function (menu) { return (React.createElement(React.Fragment, null,
@@ -1149,6 +1106,7 @@ function EnhanceSelect(_a) {
1149
1106
  padding: '0 6px',
1150
1107
  } },
1151
1108
  React.createElement("span", null),
1109
+ dropdownRenderBtns && dropdownRenderBtns(),
1152
1110
  React.createElement(Button, { onClick: function (e) {
1153
1111
  e.preventDefault();
1154
1112
  sendRequestNoCatch();
@@ -1157,6 +1115,6 @@ function EnhanceSelect(_a) {
1157
1115
  // 这里需要注释掉,因为修改了一部分逻辑
1158
1116
  disabled: remoteSearch || isClickRequest
1159
1117
  ? restProps.disabled
1160
- : loading || restProps.disabled, ref: selectRef }), renderSelectOption));
1118
+ : loading || restProps.disabled, ref: selectRef, dropdownMatchSelectWidth: dropdownMatchSelectWidth }), renderSelectOption()));
1161
1119
  }
1162
1120
  export default memo(EnhanceSelect);
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { Input as AntInput } from 'antd';
3
2
  import { InputProps, TextAreaProps } from 'antd/lib/input';
4
3
  export interface IProps extends InputProps {
5
4
  }
@@ -9,8 +8,8 @@ export interface ITextAreaProps extends TextAreaProps {
9
8
  declare function Input(props: IProps): JSX.Element;
10
9
  declare namespace Input {
11
10
  var Group: React.FC<import("antd/lib/input").GroupProps>;
12
- var Search: React.ForwardRefExoticComponent<import("antd/lib/input").SearchProps & React.RefAttributes<AntInput>>;
11
+ var Search: React.ForwardRefExoticComponent<import("antd/lib/input").SearchProps & React.RefAttributes<import("antd").InputRef>>;
13
12
  var TextArea: React.ForwardRefExoticComponent<ITextAreaProps & React.RefAttributes<unknown>>;
14
- var Password: React.ForwardRefExoticComponent<import("antd/lib/input").PasswordProps & React.RefAttributes<any>>;
13
+ var Password: React.ForwardRefExoticComponent<import("antd/lib/input").PasswordProps & React.RefAttributes<import("antd").InputRef>>;
15
14
  }
16
15
  export default Input;
@@ -4,9 +4,9 @@ interface IProps extends LayoutProps {
4
4
  }
5
5
  declare function Layout(props: IProps): JSX.Element;
6
6
  declare namespace Layout {
7
- var Header: React.FC<LayoutProps>;
8
- var Footer: React.FC<LayoutProps>;
9
- var Content: React.FC<LayoutProps>;
10
- var Sider: React.ForwardRefExoticComponent<import("antd/lib/layout").SiderProps & React.RefAttributes<HTMLDivElement>>;
7
+ var Header: React.ForwardRefExoticComponent<LayoutProps & React.RefAttributes<HTMLElement>>;
8
+ var Footer: React.ForwardRefExoticComponent<LayoutProps & React.RefAttributes<HTMLElement>>;
9
+ var Content: React.ForwardRefExoticComponent<LayoutProps & React.RefAttributes<HTMLElement>>;
10
+ var Sider: React.ForwardRefExoticComponent<import("antd").SiderProps & React.RefAttributes<HTMLDivElement>>;
11
11
  }
12
12
  export default Layout;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { MenuProps } from 'antd/lib/menu';
3
3
  interface IProps extends MenuProps {
4
4
  }
@@ -7,6 +7,6 @@ declare namespace Menu {
7
7
  var Item: typeof import("antd/lib/menu/MenuItem").default;
8
8
  var SubMenu: typeof import("antd/lib/menu/SubMenu").default;
9
9
  var ItemGroup: typeof import("rc-menu").MenuItemGroup;
10
- var Divider: typeof import("rc-menu").Divider;
10
+ var Divider: React.FC<import("antd/lib/menu").MenuDividerProps>;
11
11
  }
12
12
  export default Menu;
@@ -549,14 +549,14 @@ function Table(props) {
549
549
  summaryFixed,
550
550
  ]);
551
551
  // 多选
552
- var rowSelectionObj = useMemo(function () { return (__assign(__assign({}, rowSelection), { onChange: function (selectedRowKeys, selectedRows) {
552
+ var rowSelectionObj = useMemo(function () { return (__assign(__assign({}, rowSelection), { onChange: function (selectedRowKeys, selectedRows, info) {
553
553
  rowSelectionDataSource.current = {
554
554
  selectedRows: selectedRows,
555
555
  selectedRowKeys: selectedRowKeys,
556
556
  isChange: true,
557
557
  };
558
558
  (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) &&
559
- rowSelection.onChange(selectedRowKeys, selectedRows);
559
+ rowSelection.onChange(selectedRowKeys, selectedRows, info);
560
560
  } })); }, [rowSelection]);
561
561
  return (React.createElement("div", { style: isFlex
562
562
  ? { position: 'relative', overflow: 'hidden', flex: 1 }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TabsProps } from 'antd/lib/tabs';
3
3
  interface IProps extends TabsProps {
4
4
  isHeader?: boolean;
@@ -11,6 +11,6 @@ interface IProps extends TabsProps {
11
11
  }
12
12
  declare function Tabs(props: IProps): JSX.Element;
13
13
  declare namespace Tabs {
14
- var TabPane: typeof import("rc-tabs").TabPane;
14
+ var TabPane: React.FC<import("antd").TabPaneProps>;
15
15
  }
16
16
  export default Tabs;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const IconFont: import("react").SFC<import("@ant-design/icons/lib/components/IconFont").IconFontProps>;
2
+ declare const IconFont: import("react").FC<import("@ant-design/icons/lib/components/IconFont").IconFontProps<string>>;
3
3
  export default IconFont;
@@ -1 +1 @@
1
- export declare const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJtZW1iZXJfdHlwZSI6MSwiaGFuZGxlX2hyX3Bob25lIjpudWxsLCJyZXN1bWVfZGF0ZSI6bnVsbCwidXNlcl9uYW1lIjoi6ZmI5Lqa6ZuEdGVzdCIsImVtcF9uYW1lIjoi6ZmI5Lqa6ZuEdGVzdCIsImVtcF9udW1iZXIiOiJZRzIyMDQwNjQiLCJpbXRfaWQiOiIiLCJyZWFsX25hbWUiOiLpmYjkuprpm4R0ZXN0IiwiY2xpZW50X3R5cGUiOiJ3ZWIiLCJkYXRhX3JvbGVfaWQiOiIxMzQ1OTc4NTA1MzAyMDU2OTYyLDE0MTI2MTU5NDI2NTIyNjQ0NDksMTQ0ODEyMTA4NjUwNDMwMDU0NiwxNDY4MDM1MzUxNjI1Mjg1NjM0IiwiY2xpZW50X2lkIjoic3dvcmQiLCJ1c2VyX3R5cGUiOiJ3ZWIiLCJyb2xlX2lkIjoiMTEyMzU5ODgxNjczODY3NTIwMSwxNDA1MDU3MjE4NTMwMjE3OTg2LDE0MzgzMjI1NDMyOTU5MjYyNzQsMTQ0MzQ3NTQ3NTk3MjczNDk3NywxNDQ2ODE5NDYzNjkzODQ0NDgyLDE0NjgwMzQ0MzcxNTc5NjE3MjkiLCJwb3N0X25hbWUiOm51bGwsInNjb3BlIjpbImFsbCJdLC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MS1hMDc2LTU5ZWMxMTJiYzg5NiIsIm1lbWJlcl9pZCI6IjEiLCJjb21wYW55X2lkIjoiIiwic3lzdGVtX2lkIjpudWxsLCJkZXB0X25hbWUiOm51bGwsImF2YXRhciI6IiIsImRhdGFfcm9sZV9uYW1lIjoiYWRtaW4sYWRtaW4sYWRtaW4sYWRtaW4sYWRtaW4sdXNlciIsImF1dGhvcml0aWVzIjpbImFkbWluIiwiYWRtaW5pc3RyYXRvciJdLCJyb2xlX25hbWUiOiJhZG1pbixhZG1pbmlzdHJhdG9yLGFkbWluaXN0cmF0b3IsYWRtaW4sYWRtaW4sYWRtaW4iLCJyZXN1bWVfdGVtcGxhdGUiOm51bGwsImxpY2Vuc2UiOiJwb3dlcmVkIGJ5IHptZG1zIiwicG9zdF9pZCI6IiIsInVzZXJfaWQiOiIxNDEyOTUzODA0MzMzNTU1NzE0Iiwib3JnX2lkIjoiIiwibmlja19uYW1lIjoi6ZmI5Lqa6ZuEIiwiY29tcGFueV9uYW1lIjpudWxsLCJkZXB0X2lkIjoiIiwiaGFuZGxlX2hyX25hbWUiOm51bGwsImFjY291bnQiOiJjaGVueXgiLCJyZXN1bWVfaWQiOiIifQ.lqwAlD_LHpV5ncnEz4zj5XuKDoUecxR59ZV9r4xHL9I';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "4.3.32",
3
+ "version": "4.3.33",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",
@@ -24,6 +24,7 @@
24
24
  "react-infinite-scroll-component": "^6.1.0",
25
25
  "react-resizable": "^3.0.4",
26
26
  "react-to-print": "^2.14.7",
27
+ "pinyin-pro": "^3.14.0",
27
28
  "ztxkutils": "^2.10.29"
28
29
  },
29
30
  "scripts": {
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { FormProps } from 'antd/lib/form';
3
- export interface IProps extends FormProps {
4
- }
5
- declare function Form(props: IProps): JSX.Element;
6
- declare namespace Form {
7
- var Item: typeof import("antd/lib/form/FormItem").default;
8
- var List: React.FC<import("antd/lib/form").FormListProps>;
9
- var ErrorList: typeof import("antd/lib/form/ErrorList").default;
10
- var useForm: typeof import("antd/lib/form/Form").useForm;
11
- var Provider: React.FC<import("antd/lib/form/context").FormProviderProps>;
12
- }
13
- export default Form;