fan-standard-comp 4.1.20 → 4.1.21
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/fan-standard-comp.min.js +1 -1
- package/es/FormComp/Uploader/index.js +1 -1
- package/es/data/general.config.js +1 -1
- package/es/utils/index.js +1 -1
- package/lib/FormComp/Uploader/index.js +1 -1
- package/lib/data/general.config.js +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -83,7 +83,7 @@ var Uploader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
83
83
|
return maxCount || limit;
|
|
84
84
|
}, [isOnly, limit, maxCount]);
|
|
85
85
|
var splitAccept = useMemo(function () {
|
|
86
|
-
var res = getAccept(fileType);
|
|
86
|
+
var res = getAccept(fileType); // 默认返回*,即不做限制
|
|
87
87
|
if (extraExt) {
|
|
88
88
|
res = res + ',' + extraExt;
|
|
89
89
|
}
|
package/es/utils/index.js
CHANGED
|
@@ -198,7 +198,7 @@ export var formatNumber = function formatNumber(num) {
|
|
|
198
198
|
* @returns {boolean} - 是否通过验证
|
|
199
199
|
*/
|
|
200
200
|
export var isFileTypeAccepted = function isFileTypeAccepted(file, accept) {
|
|
201
|
-
if (!accept) return true; // 未限制类型时直接通过
|
|
201
|
+
if (!accept || accept === '*') return true; // 未限制类型时直接通过
|
|
202
202
|
|
|
203
203
|
// 拆分并处理所有Accept规则
|
|
204
204
|
var rules = accept.split(',').map(function (rule) {
|
|
@@ -92,7 +92,7 @@ var Uploader = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
92
92
|
return maxCount || limit;
|
|
93
93
|
}, [isOnly, limit, maxCount]);
|
|
94
94
|
var splitAccept = (0, _react.useMemo)(function () {
|
|
95
|
-
var res = (0, _util.getAccept)(fileType);
|
|
95
|
+
var res = (0, _util.getAccept)(fileType); // 默认返回*,即不做限制
|
|
96
96
|
if (extraExt) {
|
|
97
97
|
res = res + ',' + extraExt;
|
|
98
98
|
}
|
package/lib/utils/index.js
CHANGED
|
@@ -300,7 +300,7 @@ var formatNumber = exports.formatNumber = function formatNumber(num) {
|
|
|
300
300
|
* @returns {boolean} - 是否通过验证
|
|
301
301
|
*/
|
|
302
302
|
var isFileTypeAccepted = exports.isFileTypeAccepted = function isFileTypeAccepted(file, accept) {
|
|
303
|
-
if (!accept) return true; // 未限制类型时直接通过
|
|
303
|
+
if (!accept || accept === '*') return true; // 未限制类型时直接通过
|
|
304
304
|
|
|
305
305
|
// 拆分并处理所有Accept规则
|
|
306
306
|
var rules = accept.split(',').map(function (rule) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fan-standard-comp",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.21",
|
|
4
4
|
"description": "FZ standard-comp,basic of antd5.0 and custom component.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"lint": "npm run lint:es && npm run lint:css",
|
|
20
20
|
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
21
21
|
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
22
|
-
"package-to-tgz": "tar -czf fan-standard-comp-4.1.
|
|
22
|
+
"package-to-tgz": "tar -czf fan-standard-comp-4.1.21.tgz package && yarn"
|
|
23
23
|
},
|
|
24
24
|
"authors": [
|
|
25
25
|
"shomychen"
|