zmdms-utils 0.0.28 → 0.0.30

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.
@@ -11,7 +11,7 @@ function getBaseUrl(processObj) {
11
11
  // file 服务器
12
12
  var fileBaseUrlObj = {
13
13
  dev: processObj.REACT_APP_FILE_DEV || "http://192.168.0.134:89",
14
- test: processObj.REACT_APP_FILE_TEST || "http://172.55.5.101:33013",
14
+ test: processObj.REACT_APP_FILE_TEST || "http://file.cico.com.cn:30601",
15
15
  stage: processObj.REACT_APP_FILE_STAGE || "https://dzfile-prod.zmd.com.cn",
16
16
  product: processObj.REACT_APP_FILE_PRODUCT || "https://dzfile.zmd.com.cn:8012",
17
17
  };
@@ -67,5 +67,11 @@ declare function isNonEmpty(number: any): boolean;
67
67
  * 遍历一个对象,将值是数组的项,用逗号拼接起来
68
68
  */
69
69
  declare function parseJoin(params?: any): any;
70
+ /**
71
+ * 判断字符串是否是中文文本
72
+ * @param char 字符
73
+ * @returns
74
+ */
75
+ declare function isChinese(char?: string): boolean;
70
76
 
71
- export { addThousedSeparator, copyToClipboard, dangerouslyXss, delay, emitter, getFileExtension, isImageExtension, isNonEmpty, parseJoin, parseQueryParams, specialString, unescapeString };
77
+ export { addThousedSeparator, copyToClipboard, dangerouslyXss, delay, emitter, getFileExtension, isChinese, isImageExtension, isNonEmpty, parseJoin, parseQueryParams, specialString, unescapeString };
package/dist/es/common.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { __assign } from './_virtual/_tslib.js';
2
2
  import mitt from './node_modules/mitt/dist/mitt.js';
3
+ import { isChineseValidate } from './validate.js';
3
4
 
4
5
  /**
5
6
  * 同步阻断
@@ -225,5 +226,16 @@ function parseJoin(params) {
225
226
  }
226
227
  return params;
227
228
  }
229
+ /**
230
+ * 判断字符串是否是中文文本
231
+ * @param char 字符
232
+ * @returns
233
+ */
234
+ function isChinese(char) {
235
+ if (!char) {
236
+ return false;
237
+ }
238
+ return isChineseValidate.regex.test(char);
239
+ }
228
240
 
229
- export { addThousedSeparator, copyToClipboard, dangerouslyXss, delay, emitter, getFileExtension, isImageExtension, isNonEmpty, parseJoin, parseQueryParams, specialString, unescapeString };
241
+ export { addThousedSeparator, copyToClipboard, dangerouslyXss, delay, emitter, getFileExtension, isChinese, isImageExtension, isNonEmpty, parseJoin, parseQueryParams, specialString, unescapeString };