@zat-design/sisyphus-react 3.4.5-beta.28 → 3.4.5-beta.29
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.
|
@@ -21,7 +21,7 @@ var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames",
|
|
|
21
21
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
23
|
import { SearchOutlined } from '@ant-design/icons';
|
|
24
|
-
import { useMount, useSetState } from 'ahooks';
|
|
24
|
+
import { useDeepCompareEffect, useMount, useSetState } from 'ahooks';
|
|
25
25
|
import { cloneDeep, debounce, isArray, isEqual, isFunction, omit } from 'lodash';
|
|
26
26
|
import { ReactSVG } from 'react-svg';
|
|
27
27
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
|
|
@@ -757,6 +757,11 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
759
|
}, [value, isTooltip]);
|
|
760
|
+
useDeepCompareEffect(function () {
|
|
761
|
+
setState({
|
|
762
|
+
options: tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource
|
|
763
|
+
});
|
|
764
|
+
}, [tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource]);
|
|
760
765
|
// 当搜索条件只有一个时,且为输入框,默认设置suffix
|
|
761
766
|
if ((formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) === 1 && (formColumns === null || formColumns === void 0 ? void 0 : (_formColumns$ = formColumns[0]) === null || _formColumns$ === void 0 ? void 0 : _formColumns$.type) === 'Input') {
|
|
762
767
|
var _formColumns$2, _formColumns$3, _formColumns$3$fieldP;
|
package/es/ProUpload/index.js
CHANGED
|
@@ -175,6 +175,10 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
175
175
|
* @return {*}
|
|
176
176
|
*/
|
|
177
177
|
var handleBeforeUpload = function handleBeforeUpload(file, fileList) {
|
|
178
|
+
if (!isFunction(beforeUpload)) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
// TODO
|
|
178
182
|
if (!validateFileExt(extExt, file)) {
|
|
179
183
|
var _locale$ProUpload2;
|
|
180
184
|
_message.error("".concat(locale === null || locale === void 0 ? void 0 : (_locale$ProUpload2 = locale.ProUpload) === null || _locale$ProUpload2 === void 0 ? void 0 : _locale$ProUpload2.errorInfoExt, "\u3010").concat(extExt.join('、'), "\u3011"));
|
|
@@ -185,9 +189,7 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
185
189
|
_message.error("".concat(locale === null || locale === void 0 ? void 0 : (_locale$ProUpload3 = locale.ProUpload) === null || _locale$ProUpload3 === void 0 ? void 0 : _locale$ProUpload3.errorInfoSize).concat(size, "M"));
|
|
186
190
|
return false;
|
|
187
191
|
}
|
|
188
|
-
|
|
189
|
-
return beforeUpload(file, fileList);
|
|
190
|
-
}
|
|
192
|
+
return beforeUpload(file, fileList);
|
|
191
193
|
};
|
|
192
194
|
var handleRemove = function handleRemove(file) {
|
|
193
195
|
var nextList = _fileList.slice();
|
|
@@ -754,6 +754,11 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
756
|
}, [value, isTooltip]);
|
|
757
|
+
(0, _ahooks.useDeepCompareEffect)(function () {
|
|
758
|
+
setState({
|
|
759
|
+
options: tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource
|
|
760
|
+
});
|
|
761
|
+
}, [tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource]);
|
|
757
762
|
// 当搜索条件只有一个时,且为输入框,默认设置suffix
|
|
758
763
|
if ((formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) === 1 && (formColumns === null || formColumns === void 0 ? void 0 : (_formColumns$ = formColumns[0]) === null || _formColumns$ === void 0 ? void 0 : _formColumns$.type) === 'Input') {
|
|
759
764
|
var _formColumns$2, _formColumns$3, _formColumns$3$fieldP;
|
package/lib/ProUpload/index.js
CHANGED
|
@@ -182,6 +182,10 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
182
182
|
* @return {*}
|
|
183
183
|
*/
|
|
184
184
|
var handleBeforeUpload = function handleBeforeUpload(file, fileList) {
|
|
185
|
+
if (!(0, _lodash.isFunction)(beforeUpload)) {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
// TODO
|
|
185
189
|
if (!(0, _uitls.validateFileExt)(extExt, file)) {
|
|
186
190
|
var _locale$ProUpload2;
|
|
187
191
|
_antd.message.error("".concat(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProUpload2 = _locale.default.ProUpload) === null || _locale$ProUpload2 === void 0 ? void 0 : _locale$ProUpload2.errorInfoExt, "\u3010").concat(extExt.join('、'), "\u3011"));
|
|
@@ -192,9 +196,7 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
192
196
|
_antd.message.error("".concat(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProUpload3 = _locale.default.ProUpload) === null || _locale$ProUpload3 === void 0 ? void 0 : _locale$ProUpload3.errorInfoSize).concat(size, "M"));
|
|
193
197
|
return false;
|
|
194
198
|
}
|
|
195
|
-
|
|
196
|
-
return beforeUpload(file, fileList);
|
|
197
|
-
}
|
|
199
|
+
return beforeUpload(file, fileList);
|
|
198
200
|
};
|
|
199
201
|
var handleRemove = function handleRemove(file) {
|
|
200
202
|
var nextList = _fileList.slice();
|