@hzab/utils 1.1.0 → 1.1.1

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/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # @hzab/utils@1.1.1
2
+
3
+ fix: fileName 添加 hash 判断
4
+
1
5
  # @hzab/utils@1.1.0
2
6
 
3
7
  refactor: lodash 改为 lodash-es
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/utils",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "utils",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -78,7 +78,7 @@ export const getFileNameByFileObj = (file, opt: any) => {
78
78
 
79
79
 
80
80
  const hashStr = useHashName ? nanoidNumALetters() : "";
81
- const nm = mergeFileName(_fileName + "." + _ext, (_fileName.indexOf("~kid-") ? "" : `~kid-${hashStr}-${file.createTime || dayjs().valueOf()}-${ext}`));
81
+ const nm = mergeFileName(_fileName + "." + _ext, (_fileName.indexOf("~kid-") < 0 ? `~kid-${hashStr}-${file.createTime || dayjs().valueOf()}-${ext}` : ""));
82
82
 
83
83
  return nm;
84
84
  };