ff-ui-plus 2.0.7

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.
Files changed (319) hide show
  1. package/.nvmrc +1 -0
  2. package/.prettierrc.cjs +41 -0
  3. package/.stylelintignore +5 -0
  4. package/LICENSE +21 -0
  5. package/README.md +265 -0
  6. package/commitlint.config.cjs +162 -0
  7. package/global.d.ts +27 -0
  8. package/index.html +16 -0
  9. package/lib.sh +9 -0
  10. package/lint-staged.config.cjs +8 -0
  11. package/package.json +149 -0
  12. package/packages/components/adaptive-page/index.ts +5 -0
  13. package/packages/components/adaptive-page/src/index.vue +85 -0
  14. package/packages/components/adaptive-page/src/type.ts +9 -0
  15. package/packages/components/adaptive-page/style/css.ts +1 -0
  16. package/packages/components/adaptive-page/style/index.ts +1 -0
  17. package/packages/components/button/index.ts +5 -0
  18. package/packages/components/button/src/index.vue +41 -0
  19. package/packages/components/button/src/type.ts +11 -0
  20. package/packages/components/button/style/css.ts +1 -0
  21. package/packages/components/button/style/index.ts +1 -0
  22. package/packages/components/chart/index.ts +5 -0
  23. package/packages/components/chart/src/index.vue +121 -0
  24. package/packages/components/chart/src/type.ts +7 -0
  25. package/packages/components/chart/style/css.ts +1 -0
  26. package/packages/components/chart/style/index.ts +1 -0
  27. package/packages/components/checkbox/index.ts +3 -0
  28. package/packages/components/checkbox/src/checkbox.d.ts +5 -0
  29. package/packages/components/checkbox/src/index.vue +67 -0
  30. package/packages/components/checkbox/style/css.ts +1 -0
  31. package/packages/components/checkbox/style/index.ts +1 -0
  32. package/packages/components/date-picker/index.ts +5 -0
  33. package/packages/components/date-picker/src/index.vue +228 -0
  34. package/packages/components/date-picker/src/type.ts +22 -0
  35. package/packages/components/date-picker/style/css.ts +1 -0
  36. package/packages/components/date-picker/style/index.ts +1 -0
  37. package/packages/components/detail/index.ts +5 -0
  38. package/packages/components/detail/src/index.vue +102 -0
  39. package/packages/components/detail/src/renderLabel.vue +15 -0
  40. package/packages/components/detail/src/renderTooltip.vue +15 -0
  41. package/packages/components/detail/src/type.ts +28 -0
  42. package/packages/components/detail/style/css.ts +1 -0
  43. package/packages/components/detail/style/index.ts +1 -0
  44. package/packages/components/form/index.ts +5 -0
  45. package/packages/components/form/src/index.vue +407 -0
  46. package/packages/components/form/src/renderBtn.vue +15 -0
  47. package/packages/components/form/src/renderComp.vue +15 -0
  48. package/packages/components/form/src/type.ts +26 -0
  49. package/packages/components/form/style/css.ts +1 -0
  50. package/packages/components/form/style/index.ts +1 -0
  51. package/packages/components/index.ts +20 -0
  52. package/packages/components/input/index.ts +5 -0
  53. package/packages/components/input/src/index.vue +225 -0
  54. package/packages/components/input/src/type.ts +14 -0
  55. package/packages/components/input/style/css.ts +1 -0
  56. package/packages/components/input/style/index.ts +1 -0
  57. package/packages/components/layout-page/index.ts +4 -0
  58. package/packages/components/layout-page/src/index.vue +74 -0
  59. package/packages/components/layout-page/style/css.ts +1 -0
  60. package/packages/components/layout-page/style/index.ts +1 -0
  61. package/packages/components/layout-page-item/index.ts +3 -0
  62. package/packages/components/layout-page-item/src/index.vue +16 -0
  63. package/packages/components/layout-page-item/style/css.ts +1 -0
  64. package/packages/components/layout-page-item/style/index.ts +1 -0
  65. package/packages/components/module-form/index.ts +4 -0
  66. package/packages/components/module-form/src/index.vue +243 -0
  67. package/packages/components/module-form/src/moduleDetail.vue +61 -0
  68. package/packages/components/module-form/src/moduleForm.vue +88 -0
  69. package/packages/components/module-form/src/type.ts +16 -0
  70. package/packages/components/module-form/style/css.ts +1 -0
  71. package/packages/components/module-form/style/index.ts +1 -0
  72. package/packages/components/package.json +9 -0
  73. package/packages/components/query-condition/index.ts +4 -0
  74. package/packages/components/query-condition/src/index.vue +478 -0
  75. package/packages/components/query-condition/src/moreChoose.vue +159 -0
  76. package/packages/components/query-condition/src/renderComp.vue +15 -0
  77. package/packages/components/query-condition/src/type.ts +22 -0
  78. package/packages/components/query-condition/src/useComputed.ts +94 -0
  79. package/packages/components/query-condition/style/css.ts +1 -0
  80. package/packages/components/query-condition/style/index.ts +1 -0
  81. package/packages/components/radio/index.ts +3 -0
  82. package/packages/components/radio/src/index.vue +73 -0
  83. package/packages/components/radio/src/radio.d.ts +12 -0
  84. package/packages/components/radio/style/css.ts +1 -0
  85. package/packages/components/radio/style/index.ts +1 -0
  86. package/packages/components/select/index.ts +4 -0
  87. package/packages/components/select/src/index.vue +240 -0
  88. package/packages/components/select/src/type.ts +43 -0
  89. package/packages/components/select/style/css.ts +1 -0
  90. package/packages/components/select/style/index.ts +1 -0
  91. package/packages/components/select-icon/index.ts +4 -0
  92. package/packages/components/select-icon/src/index.vue +128 -0
  93. package/packages/components/select-icon/style/css.ts +1 -0
  94. package/packages/components/select-icon/style/index.ts +1 -0
  95. package/packages/components/select-table/index.ts +4 -0
  96. package/packages/components/select-table/src/ClickOutside.ts +106 -0
  97. package/packages/components/select-table/src/index.vue +851 -0
  98. package/packages/components/select-table/src/renderCol.vue +20 -0
  99. package/packages/components/select-table/src/type.ts +56 -0
  100. package/packages/components/select-table/src/useVirtualized.ts +86 -0
  101. package/packages/components/select-table/style/css.ts +1 -0
  102. package/packages/components/select-table/style/index.ts +1 -0
  103. package/packages/components/step-wizard/index.ts +4 -0
  104. package/packages/components/step-wizard/src/index.vue +99 -0
  105. package/packages/components/step-wizard/src/type.ts +17 -0
  106. package/packages/components/step-wizard/style/css.ts +1 -0
  107. package/packages/components/step-wizard/style/index.ts +1 -0
  108. package/packages/components/table/index.ts +5 -0
  109. package/packages/components/table/src/ColumnSet.vue +176 -0
  110. package/packages/components/table/src/TTableColumn.vue +100 -0
  111. package/packages/components/table/src/densitySet.vue +91 -0
  112. package/packages/components/table/src/firstColumn.vue +132 -0
  113. package/packages/components/table/src/index.vue +926 -0
  114. package/packages/components/table/src/operator.vue +246 -0
  115. package/packages/components/table/src/renderCol.vue +20 -0
  116. package/packages/components/table/src/renderHeader.vue +18 -0
  117. package/packages/components/table/src/singleEdit.vue +354 -0
  118. package/packages/components/table/src/singleEditCell.vue +303 -0
  119. package/packages/components/table/src/tableProps.ts +162 -0
  120. package/packages/components/table/src/useExpose.ts +74 -0
  121. package/packages/components/table/src/useVirtualized.ts +70 -0
  122. package/packages/components/table/style/css.ts +1 -0
  123. package/packages/components/table/style/index.ts +1 -0
  124. package/packages/components/tabs/index.ts +4 -0
  125. package/packages/components/tabs/src/index.vue +50 -0
  126. package/packages/components/tabs/style/css.ts +1 -0
  127. package/packages/components/tabs/style/index.ts +1 -0
  128. package/packages/components/timer-btn/index.ts +4 -0
  129. package/packages/components/timer-btn/src/index.vue +57 -0
  130. package/packages/components/timer-btn/style/css.ts +1 -0
  131. package/packages/components/timer-btn/style/index.ts +1 -0
  132. package/packages/components/utils/index.ts +142 -0
  133. package/packages/components/utils/install.ts +16 -0
  134. package/packages/eslint-config/build.config.ts +16 -0
  135. package/packages/eslint-config/dist/index.cjs +122 -0
  136. package/packages/eslint-config/dist/index.d.cts +92 -0
  137. package/packages/eslint-config/dist/index.d.mts +92 -0
  138. package/packages/eslint-config/dist/index.d.ts +92 -0
  139. package/packages/eslint-config/dist/index.mjs +120 -0
  140. package/packages/eslint-config/package.json +34 -0
  141. package/packages/eslint-config/src/index.ts +121 -0
  142. package/packages/ff-ui-plus/component.ts +55 -0
  143. package/packages/ff-ui-plus/defaults.ts +4 -0
  144. package/packages/ff-ui-plus/index.ts +9 -0
  145. package/packages/ff-ui-plus/make-installer.ts +10 -0
  146. package/packages/ff-ui-plus/package.json +117 -0
  147. package/packages/ff-ui-plus/version.ts +1 -0
  148. package/packages/hooks/index.ts +1 -0
  149. package/packages/hooks/package.json +9 -0
  150. package/packages/hooks/useLocale.ts +53 -0
  151. package/packages/locale/index.ts +11 -0
  152. package/packages/locale/lang/en.ts +157 -0
  153. package/packages/locale/lang/zh-cn.ts +155 -0
  154. package/packages/locale/package.json +12 -0
  155. package/packages/resolver/package.json +23 -0
  156. package/packages/resolver/src/index.ts +99 -0
  157. package/packages/theme-chalk/build.ts +76 -0
  158. package/packages/theme-chalk/dist/index.css +1 -0
  159. package/packages/theme-chalk/dist/src/adaptive-page.scss +48 -0
  160. package/packages/theme-chalk/dist/src/button.scss +23 -0
  161. package/packages/theme-chalk/dist/src/chart.scss +10 -0
  162. package/packages/theme-chalk/dist/src/checkbox.scss +0 -0
  163. package/packages/theme-chalk/dist/src/date-picker.scss +3 -0
  164. package/packages/theme-chalk/dist/src/detail.scss +7 -0
  165. package/packages/theme-chalk/dist/src/form.scss +104 -0
  166. package/packages/theme-chalk/dist/src/index.scss +19 -0
  167. package/packages/theme-chalk/dist/src/input.scss +0 -0
  168. package/packages/theme-chalk/dist/src/layout-page-item.scss +10 -0
  169. package/packages/theme-chalk/dist/src/layout-page.scss +37 -0
  170. package/packages/theme-chalk/dist/src/module-form.scss +335 -0
  171. package/packages/theme-chalk/dist/src/query-condition.scss +132 -0
  172. package/packages/theme-chalk/dist/src/radio.scss +0 -0
  173. package/packages/theme-chalk/dist/src/select-icon.scss +61 -0
  174. package/packages/theme-chalk/dist/src/select-table.scss +71 -0
  175. package/packages/theme-chalk/dist/src/select.scss +7 -0
  176. package/packages/theme-chalk/dist/src/step-wizard.scss +51 -0
  177. package/packages/theme-chalk/dist/src/table.scss +381 -0
  178. package/packages/theme-chalk/dist/src/tabs.scss +20 -0
  179. package/packages/theme-chalk/dist/src/timer-btn.scss +21 -0
  180. package/packages/theme-chalk/dist/t-adaptive-page.css +1 -0
  181. package/packages/theme-chalk/dist/t-button.css +1 -0
  182. package/packages/theme-chalk/dist/t-chart.css +1 -0
  183. package/packages/theme-chalk/dist/t-checkbox.css +0 -0
  184. package/packages/theme-chalk/dist/t-date-picker.css +1 -0
  185. package/packages/theme-chalk/dist/t-detail.css +1 -0
  186. package/packages/theme-chalk/dist/t-form.css +1 -0
  187. package/packages/theme-chalk/dist/t-input.css +0 -0
  188. package/packages/theme-chalk/dist/t-layout-page-item.css +1 -0
  189. package/packages/theme-chalk/dist/t-layout-page.css +1 -0
  190. package/packages/theme-chalk/dist/t-module-form.css +1 -0
  191. package/packages/theme-chalk/dist/t-query-condition.css +1 -0
  192. package/packages/theme-chalk/dist/t-radio.css +0 -0
  193. package/packages/theme-chalk/dist/t-select-icon.css +1 -0
  194. package/packages/theme-chalk/dist/t-select-table.css +1 -0
  195. package/packages/theme-chalk/dist/t-select.css +1 -0
  196. package/packages/theme-chalk/dist/t-step-wizard.css +1 -0
  197. package/packages/theme-chalk/dist/t-table.css +1 -0
  198. package/packages/theme-chalk/dist/t-tabs.css +1 -0
  199. package/packages/theme-chalk/dist/t-timer-btn.css +1 -0
  200. package/packages/theme-chalk/mixins/config.scss +8 -0
  201. package/packages/theme-chalk/mixins/function.scss +71 -0
  202. package/packages/theme-chalk/mixins/mixins.scss +79 -0
  203. package/packages/theme-chalk/package.json +21 -0
  204. package/packages/theme-chalk/src/adaptive-page.scss +48 -0
  205. package/packages/theme-chalk/src/button.scss +23 -0
  206. package/packages/theme-chalk/src/chart.scss +10 -0
  207. package/packages/theme-chalk/src/checkbox.scss +0 -0
  208. package/packages/theme-chalk/src/date-picker.scss +3 -0
  209. package/packages/theme-chalk/src/detail.scss +7 -0
  210. package/packages/theme-chalk/src/form.scss +104 -0
  211. package/packages/theme-chalk/src/index.scss +19 -0
  212. package/packages/theme-chalk/src/input.scss +0 -0
  213. package/packages/theme-chalk/src/layout-page-item.scss +10 -0
  214. package/packages/theme-chalk/src/layout-page.scss +37 -0
  215. package/packages/theme-chalk/src/module-form.scss +335 -0
  216. package/packages/theme-chalk/src/query-condition.scss +132 -0
  217. package/packages/theme-chalk/src/radio.scss +0 -0
  218. package/packages/theme-chalk/src/select-icon.scss +61 -0
  219. package/packages/theme-chalk/src/select-table.scss +71 -0
  220. package/packages/theme-chalk/src/select.scss +7 -0
  221. package/packages/theme-chalk/src/step-wizard.scss +51 -0
  222. package/packages/theme-chalk/src/table.scss +381 -0
  223. package/packages/theme-chalk/src/tabs.scss +20 -0
  224. package/packages/theme-chalk/src/timer-btn.scss +21 -0
  225. package/packages/types/global.ts +34 -0
  226. package/packages/types/index.ts +1 -0
  227. package/packages/types/package.json +10 -0
  228. package/packages/utils/build.config.ts +23 -0
  229. package/packages/utils/dist/cookie.cjs +1 -0
  230. package/packages/utils/dist/cookie.d.cts +16 -0
  231. package/packages/utils/dist/cookie.d.mts +16 -0
  232. package/packages/utils/dist/cookie.d.ts +16 -0
  233. package/packages/utils/dist/cookie.mjs +1 -0
  234. package/packages/utils/dist/day.cjs +1 -0
  235. package/packages/utils/dist/day.d.cts +37 -0
  236. package/packages/utils/dist/day.d.mts +37 -0
  237. package/packages/utils/dist/day.d.ts +37 -0
  238. package/packages/utils/dist/day.mjs +1 -0
  239. package/packages/utils/dist/file.cjs +1 -0
  240. package/packages/utils/dist/file.d.cts +61 -0
  241. package/packages/utils/dist/file.d.mts +61 -0
  242. package/packages/utils/dist/file.d.ts +61 -0
  243. package/packages/utils/dist/file.mjs +1 -0
  244. package/packages/utils/dist/index.cjs +1 -0
  245. package/packages/utils/dist/index.d.cts +13 -0
  246. package/packages/utils/dist/index.d.mts +13 -0
  247. package/packages/utils/dist/index.d.ts +13 -0
  248. package/packages/utils/dist/index.mjs +1 -0
  249. package/packages/utils/dist/is.cjs +1 -0
  250. package/packages/utils/dist/is.d.cts +117 -0
  251. package/packages/utils/dist/is.d.mts +117 -0
  252. package/packages/utils/dist/is.d.ts +117 -0
  253. package/packages/utils/dist/is.mjs +1 -0
  254. package/packages/utils/dist/letter.cjs +1 -0
  255. package/packages/utils/dist/letter.d.cts +12 -0
  256. package/packages/utils/dist/letter.d.mts +12 -0
  257. package/packages/utils/dist/letter.d.ts +12 -0
  258. package/packages/utils/dist/letter.mjs +1 -0
  259. package/packages/utils/dist/number.cjs +1 -0
  260. package/packages/utils/dist/number.d.cts +23 -0
  261. package/packages/utils/dist/number.d.mts +23 -0
  262. package/packages/utils/dist/number.d.ts +23 -0
  263. package/packages/utils/dist/number.mjs +1 -0
  264. package/packages/utils/dist/openExe.cjs +1 -0
  265. package/packages/utils/dist/openExe.d.cts +9 -0
  266. package/packages/utils/dist/openExe.d.mts +9 -0
  267. package/packages/utils/dist/openExe.d.ts +9 -0
  268. package/packages/utils/dist/openExe.mjs +1 -0
  269. package/packages/utils/dist/storage.cjs +1 -0
  270. package/packages/utils/dist/storage.d.cts +46 -0
  271. package/packages/utils/dist/storage.d.mts +46 -0
  272. package/packages/utils/dist/storage.d.ts +46 -0
  273. package/packages/utils/dist/storage.mjs +1 -0
  274. package/packages/utils/dist/validate.cjs +1 -0
  275. package/packages/utils/dist/validate.d.cts +32 -0
  276. package/packages/utils/dist/validate.d.mts +32 -0
  277. package/packages/utils/dist/validate.d.ts +32 -0
  278. package/packages/utils/dist/validate.mjs +1 -0
  279. package/packages/utils/dist/ws.cjs +1 -0
  280. package/packages/utils/dist/ws.d.cts +86 -0
  281. package/packages/utils/dist/ws.d.mts +86 -0
  282. package/packages/utils/dist/ws.d.ts +86 -0
  283. package/packages/utils/dist/ws.mjs +1 -0
  284. package/packages/utils/package.json +42 -0
  285. package/packages/utils/src/cookie.ts +24 -0
  286. package/packages/utils/src/day.ts +66 -0
  287. package/packages/utils/src/file.ts +173 -0
  288. package/packages/utils/src/index.ts +10 -0
  289. package/packages/utils/src/is.ts +159 -0
  290. package/packages/utils/src/letter.ts +15 -0
  291. package/packages/utils/src/number.ts +37 -0
  292. package/packages/utils/src/openExe.ts +45 -0
  293. package/packages/utils/src/storage.ts +77 -0
  294. package/packages/utils/src/validate.ts +55 -0
  295. package/packages/utils/src/ws.ts +191 -0
  296. package/pnpm-workspace.yaml +3 -0
  297. package/publish.sh +37 -0
  298. package/resolver.sh +9 -0
  299. package/scripts/build/all.ts +152 -0
  300. package/scripts/build/build.config.ts +10 -0
  301. package/scripts/build/dist/index.cjs +7 -0
  302. package/scripts/build/dist/index.d.ts +2 -0
  303. package/scripts/build/dist/index.mjs +12 -0
  304. package/scripts/build/index.ts +63 -0
  305. package/scripts/build/modules.ts +141 -0
  306. package/scripts/build/package.json +14 -0
  307. package/scripts/release/gen-version.ts +12 -0
  308. package/scripts/release/index.ts +209 -0
  309. package/scripts/utils/excludeFiles.ts +14 -0
  310. package/scripts/utils/index.ts +88 -0
  311. package/scripts/utils/main.ts +14 -0
  312. package/scripts/utils/paths.ts +40 -0
  313. package/scripts/utils/plugin.ts +61 -0
  314. package/tsconfig.base.json +23 -0
  315. package/tsconfig.vitest.json +11 -0
  316. package/tsconfig.web.json +18 -0
  317. package/typings/env.d.ts +22 -0
  318. package/typings/index.d.ts +161 -0
  319. package/vitest.config.ts +22 -0
@@ -0,0 +1,61 @@
1
+ import { FileSaverOptions } from 'file-saver';
2
+
3
+ /**
4
+ *
5
+ * @desc 限制文件类型
6
+ * @param {file|Blob} file 源文件
7
+ * "默认限制图"片
8
+ * @return 合法文件返回true否则返回false
9
+ */
10
+ declare const isLegalFile: (file: File | Blob, types: string[]) => boolean;
11
+ /**
12
+ * @desc 限制文件上传大小
13
+ * @param {file|Blob} file 源文件
14
+ * @param {number} fileMaxSize 图片限制大小单位(MB)
15
+ * @return 在限制内返回true否则返回false
16
+ */
17
+ declare const isMaxFileSize: (file: File | Blob, fileMaxSize?: number) => boolean;
18
+ /**
19
+ *
20
+ * @desc 读取文件为DataURL文件格式 (base64)
21
+ * @param {file|Blob} file 源文件
22
+ * @return 返回DataURL文件 (base64)
23
+ */
24
+ declare const fileToDataURL: (file: File | Blob) => Promise<string>;
25
+ /**
26
+ * @desc 读取文件为text文件格式
27
+ * @param {file} file 源文件
28
+ * @return 返回text文件
29
+ */
30
+ declare const fileToText: (file: File | Blob) => Promise<string>;
31
+ /**
32
+ * @desc 加载真实图片,读取成功返回图片真实宽高和图片本身对象 ag: { width: 100,height: 100,image: '' }
33
+ * @param {string} src 图片地址
34
+ * @return `{ width: ,height: , image: }`
35
+ */
36
+ declare const loadImage: (src: string) => Promise<{
37
+ width: number;
38
+ height: number;
39
+ image: HTMLImageElement;
40
+ }>;
41
+ /**
42
+ * @desc 判断图片文件的分辨率是否在限定范围之内,分辨率不在限定范围之内则抛出异常
43
+ * @param {file} file 源文件
44
+ * @param {object} props 文件分辨率的宽和高 ag: props={width:100, height :100}
45
+ */
46
+ declare const isLegalResolutionRatio: (file: File | Blob, props: {
47
+ width: number;
48
+ height: number;
49
+ }) => Promise<boolean>;
50
+ interface Download<T = Blob | string> {
51
+ (data: T, filename: string, options?: FileSaverOptions): Promise<T>;
52
+ }
53
+ /**
54
+ * @description 下载文件
55
+ * @param {Blob | string} data 文件 Blob
56
+ * @param {string} filename 文件名称
57
+ * @param {object} options 可选参数
58
+ */
59
+ declare const download: Download;
60
+
61
+ export { download, fileToDataURL, fileToText, isLegalFile, isLegalResolutionRatio, isMaxFileSize, loadImage };
@@ -0,0 +1,61 @@
1
+ import { FileSaverOptions } from 'file-saver';
2
+
3
+ /**
4
+ *
5
+ * @desc 限制文件类型
6
+ * @param {file|Blob} file 源文件
7
+ * "默认限制图"片
8
+ * @return 合法文件返回true否则返回false
9
+ */
10
+ declare const isLegalFile: (file: File | Blob, types: string[]) => boolean;
11
+ /**
12
+ * @desc 限制文件上传大小
13
+ * @param {file|Blob} file 源文件
14
+ * @param {number} fileMaxSize 图片限制大小单位(MB)
15
+ * @return 在限制内返回true否则返回false
16
+ */
17
+ declare const isMaxFileSize: (file: File | Blob, fileMaxSize?: number) => boolean;
18
+ /**
19
+ *
20
+ * @desc 读取文件为DataURL文件格式 (base64)
21
+ * @param {file|Blob} file 源文件
22
+ * @return 返回DataURL文件 (base64)
23
+ */
24
+ declare const fileToDataURL: (file: File | Blob) => Promise<string>;
25
+ /**
26
+ * @desc 读取文件为text文件格式
27
+ * @param {file} file 源文件
28
+ * @return 返回text文件
29
+ */
30
+ declare const fileToText: (file: File | Blob) => Promise<string>;
31
+ /**
32
+ * @desc 加载真实图片,读取成功返回图片真实宽高和图片本身对象 ag: { width: 100,height: 100,image: '' }
33
+ * @param {string} src 图片地址
34
+ * @return `{ width: ,height: , image: }`
35
+ */
36
+ declare const loadImage: (src: string) => Promise<{
37
+ width: number;
38
+ height: number;
39
+ image: HTMLImageElement;
40
+ }>;
41
+ /**
42
+ * @desc 判断图片文件的分辨率是否在限定范围之内,分辨率不在限定范围之内则抛出异常
43
+ * @param {file} file 源文件
44
+ * @param {object} props 文件分辨率的宽和高 ag: props={width:100, height :100}
45
+ */
46
+ declare const isLegalResolutionRatio: (file: File | Blob, props: {
47
+ width: number;
48
+ height: number;
49
+ }) => Promise<boolean>;
50
+ interface Download<T = Blob | string> {
51
+ (data: T, filename: string, options?: FileSaverOptions): Promise<T>;
52
+ }
53
+ /**
54
+ * @description 下载文件
55
+ * @param {Blob | string} data 文件 Blob
56
+ * @param {string} filename 文件名称
57
+ * @param {object} options 可选参数
58
+ */
59
+ declare const download: Download;
60
+
61
+ export { download, fileToDataURL, fileToText, isLegalFile, isLegalResolutionRatio, isMaxFileSize, loadImage };
@@ -0,0 +1,61 @@
1
+ import { FileSaverOptions } from 'file-saver';
2
+
3
+ /**
4
+ *
5
+ * @desc 限制文件类型
6
+ * @param {file|Blob} file 源文件
7
+ * "默认限制图"片
8
+ * @return 合法文件返回true否则返回false
9
+ */
10
+ declare const isLegalFile: (file: File | Blob, types: string[]) => boolean;
11
+ /**
12
+ * @desc 限制文件上传大小
13
+ * @param {file|Blob} file 源文件
14
+ * @param {number} fileMaxSize 图片限制大小单位(MB)
15
+ * @return 在限制内返回true否则返回false
16
+ */
17
+ declare const isMaxFileSize: (file: File | Blob, fileMaxSize?: number) => boolean;
18
+ /**
19
+ *
20
+ * @desc 读取文件为DataURL文件格式 (base64)
21
+ * @param {file|Blob} file 源文件
22
+ * @return 返回DataURL文件 (base64)
23
+ */
24
+ declare const fileToDataURL: (file: File | Blob) => Promise<string>;
25
+ /**
26
+ * @desc 读取文件为text文件格式
27
+ * @param {file} file 源文件
28
+ * @return 返回text文件
29
+ */
30
+ declare const fileToText: (file: File | Blob) => Promise<string>;
31
+ /**
32
+ * @desc 加载真实图片,读取成功返回图片真实宽高和图片本身对象 ag: { width: 100,height: 100,image: '' }
33
+ * @param {string} src 图片地址
34
+ * @return `{ width: ,height: , image: }`
35
+ */
36
+ declare const loadImage: (src: string) => Promise<{
37
+ width: number;
38
+ height: number;
39
+ image: HTMLImageElement;
40
+ }>;
41
+ /**
42
+ * @desc 判断图片文件的分辨率是否在限定范围之内,分辨率不在限定范围之内则抛出异常
43
+ * @param {file} file 源文件
44
+ * @param {object} props 文件分辨率的宽和高 ag: props={width:100, height :100}
45
+ */
46
+ declare const isLegalResolutionRatio: (file: File | Blob, props: {
47
+ width: number;
48
+ height: number;
49
+ }) => Promise<boolean>;
50
+ interface Download<T = Blob | string> {
51
+ (data: T, filename: string, options?: FileSaverOptions): Promise<T>;
52
+ }
53
+ /**
54
+ * @description 下载文件
55
+ * @param {Blob | string} data 文件 Blob
56
+ * @param {string} filename 文件名称
57
+ * @param {object} options 可选参数
58
+ */
59
+ declare const download: Download;
60
+
61
+ export { download, fileToDataURL, fileToText, isLegalFile, isLegalResolutionRatio, isMaxFileSize, loadImage };
@@ -0,0 +1 @@
1
+ const i=e=>e.toLowerCase(),c=e=>e&&e.slice(e.lastIndexOf(".")),d=(e,o)=>{const a=o.filter(t=>t&&t!=="*").map(t=>i(t));if(!a.length)return!0;const r=c(e.name);return!!a.includes(i(r))},w=(e,o)=>o?e.size/1024/1024<o:!0,s=e=>new Promise((o,a)=>{const r=new FileReader;r.onload=t=>{const n=t.target.result;o(n)},r.onerror=t=>{a(new Error(t))},r.readAsDataURL(e)}),h=e=>new Promise((o,a)=>{const r=new FileReader;r.onload=t=>{const n=t.target.result;o(n)},r.onerror=t=>{a(new Error(t))},r.readAsText(e,"utf-8")}),l=e=>new Promise((o,a)=>{const r=new Image;r.src=e,r.onload=()=>{const t={width:r.width,height:r.height,image:r};o(t)},r.onerror=()=>{const t=new Error("load file error");a(t)}}),m=async(e,o)=>{try{const{width:a,height:r}=o,t=await s(e),n=await l(t);return n.width!==a||n.height!==r?Promise.reject(!1):!0}catch{return Promise.reject(!1)}},u=async(e,o,a)=>{if(!e)return Promise.reject("download fail: data is empt!");try{const r=await e.text();if(JSON.parse(r))return Promise.reject("download fail: server error!")}catch{}try{const{default:r}=await import("file-saver");return r.saveAs(e,o,a),Promise.resolve(e)}catch{return Promise.reject("download fail: server error!")}};export{u as download,s as fileToDataURL,h as fileToText,d as isLegalFile,m as isLegalResolutionRatio,w as isMaxFileSize,l as loadImage};
@@ -0,0 +1 @@
1
+ "use strict";const cookie=require("./cookie.cjs"),day=require("./day.cjs"),file=require("./file.cjs"),is=require("./is.cjs"),letter=require("./letter.cjs"),number=require("./number.cjs"),openExe=require("./openExe.cjs"),storage=require("./storage.cjs"),validate=require("./validate.cjs"),ws=require("./ws.cjs");require("js-cookie"),require("dayjs"),require("numeral"),require("accounting"),require("good-storage"),require("crypto-js"),require("qs"),exports.getCookie=cookie.getCookie,exports.removeCookie=cookie.removeCookie,exports.setCookie=cookie.setCookie,exports.diffDate=day.diffDate,exports.diffDateFromCurrent=day.diffDateFromCurrent,exports.formatDate=day.formatDate,exports.formatDateToDay=day.formatDateToDay,exports.formatDateToMinute=day.formatDateToMinute,exports.download=file.download,exports.fileToDataURL=file.fileToDataURL,exports.fileToText=file.fileToText,exports.isLegalFile=file.isLegalFile,exports.isLegalResolutionRatio=file.isLegalResolutionRatio,exports.isMaxFileSize=file.isMaxFileSize,exports.loadImage=file.loadImage,exports.isArray=is.isArray,exports.isBoolean=is.isBoolean,exports.isComponent=is.isComponent,exports.isDate=is.isDate,exports.isEmptyObject=is.isEmptyObject,exports.isFunction=is.isFunction,exports.isIOS=is.isIOS,exports.isMap=is.isMap,exports.isObject=is.isObject,exports.isPlainObject=is.isPlainObject,exports.isPromise=is.isPromise,exports.isRegExp=is.isRegExp,exports.isSVGElement=is.isSVGElement,exports.isSet=is.isSet,exports.isString=is.isString,exports.isSymbol=is.isSymbol,exports.isUrl=is.isUrl,exports.objectToString=is.objectToString,exports.toRawType=is.toRawType,exports.toTypeString=is.toTypeString,exports.getBigLetter=letter.getBigLetter,exports.getSmallLetter=letter.getSmallLetter,exports.formatMoney=number.formatMoney,exports.formatNumber=number.formatNumber,exports.formatNumberFixed=number.formatNumberFixed,exports.openExe=openExe.openExe,exports.decrypt=storage.decrypt,exports.encrypt=storage.encrypt,exports.getStorage=storage.getStorage,exports.getToken=storage.getToken,exports.removeStorage=storage.removeStorage,exports.removeToken=storage.removeToken,exports.setStorage=storage.setStorage,exports.setToken=storage.setToken,exports.validateEmail=validate.validateEmail,exports.validateExternal=validate.validateExternal,exports.validateLocalPhone=validate.validateLocalPhone,exports.validatePhone=validate.validatePhone,exports.validateRegexUrl=validate.validateRegexUrl,exports.WS=ws.WS;
@@ -0,0 +1,13 @@
1
+ export { getCookie, removeCookie, setCookie } from './cookie.cjs';
2
+ export { diffDate, diffDateFromCurrent, formatDate, formatDateToDay, formatDateToMinute } from './day.cjs';
3
+ export { download, fileToDataURL, fileToText, isLegalFile, isLegalResolutionRatio, isMaxFileSize, loadImage } from './file.cjs';
4
+ export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.cjs';
5
+ export { getBigLetter, getSmallLetter } from './letter.cjs';
6
+ export { formatMoney, formatNumber, formatNumberFixed } from './number.cjs';
7
+ export { openExe } from './openExe.cjs';
8
+ export { decrypt, encrypt, getStorage, getToken, removeStorage, removeToken, setStorage, setToken } from './storage.cjs';
9
+ export { validateEmail, validateExternal, validateLocalPhone, validatePhone, validateRegexUrl } from './validate.cjs';
10
+ export { WS, WSOptions } from './ws.cjs';
11
+ import 'dayjs';
12
+ import 'file-saver';
13
+ import 'crypto-js';
@@ -0,0 +1,13 @@
1
+ export { getCookie, removeCookie, setCookie } from './cookie.mjs';
2
+ export { diffDate, diffDateFromCurrent, formatDate, formatDateToDay, formatDateToMinute } from './day.mjs';
3
+ export { download, fileToDataURL, fileToText, isLegalFile, isLegalResolutionRatio, isMaxFileSize, loadImage } from './file.mjs';
4
+ export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.mjs';
5
+ export { getBigLetter, getSmallLetter } from './letter.mjs';
6
+ export { formatMoney, formatNumber, formatNumberFixed } from './number.mjs';
7
+ export { openExe } from './openExe.mjs';
8
+ export { decrypt, encrypt, getStorage, getToken, removeStorage, removeToken, setStorage, setToken } from './storage.mjs';
9
+ export { validateEmail, validateExternal, validateLocalPhone, validatePhone, validateRegexUrl } from './validate.mjs';
10
+ export { WS, WSOptions } from './ws.mjs';
11
+ import 'dayjs';
12
+ import 'file-saver';
13
+ import 'crypto-js';
@@ -0,0 +1,13 @@
1
+ export { getCookie, removeCookie, setCookie } from './cookie.js';
2
+ export { diffDate, diffDateFromCurrent, formatDate, formatDateToDay, formatDateToMinute } from './day.js';
3
+ export { download, fileToDataURL, fileToText, isLegalFile, isLegalResolutionRatio, isMaxFileSize, loadImage } from './file.js';
4
+ export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.js';
5
+ export { getBigLetter, getSmallLetter } from './letter.js';
6
+ export { formatMoney, formatNumber, formatNumberFixed } from './number.js';
7
+ export { openExe } from './openExe.js';
8
+ export { decrypt, encrypt, getStorage, getToken, removeStorage, removeToken, setStorage, setToken } from './storage.js';
9
+ export { validateEmail, validateExternal, validateLocalPhone, validatePhone, validateRegexUrl } from './validate.js';
10
+ export { WS, WSOptions } from './ws.js';
11
+ import 'dayjs';
12
+ import 'file-saver';
13
+ import 'crypto-js';
@@ -0,0 +1 @@
1
+ export{getCookie,removeCookie,setCookie}from"./cookie.mjs";export{diffDate,diffDateFromCurrent,formatDate,formatDateToDay,formatDateToMinute}from"./day.mjs";export{download,fileToDataURL,fileToText,isLegalFile,isLegalResolutionRatio,isMaxFileSize,loadImage}from"./file.mjs";export{isArray,isBoolean,isComponent,isDate,isEmptyObject,isFunction,isIOS,isMap,isObject,isPlainObject,isPromise,isRegExp,isSVGElement,isSet,isString,isSymbol,isUrl,objectToString,toRawType,toTypeString}from"./is.mjs";export{getBigLetter,getSmallLetter}from"./letter.mjs";export{formatMoney,formatNumber,formatNumberFixed}from"./number.mjs";export{openExe}from"./openExe.mjs";export{decrypt,encrypt,getStorage,getToken,removeStorage,removeToken,setStorage,setToken}from"./storage.mjs";export{validateEmail,validateExternal,validateLocalPhone,validatePhone,validateRegexUrl}from"./validate.mjs";export{WS}from"./ws.mjs";import"js-cookie";import"dayjs";import"numeral";import"accounting";import"good-storage";import"crypto-js";import"qs";
@@ -0,0 +1 @@
1
+ "use strict";const objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isArray=Array.isArray,isMap=e=>toTypeString(e)==="[object Map]",isSet=e=>toTypeString(e)==="[object Set]",isDate=e=>toTypeString(e)==="[object Date]",isRegExp=e=>toTypeString(e)==="[object RegExp]",isFunction=e=>typeof e=="function",isString=e=>typeof e=="string",isSymbol=e=>typeof e=="symbol",isBoolean=e=>typeof e=="boolean",isObject=e=>e!==null&&typeof e=="object",isPromise=e=>isObject(e)&&isFunction(e.then)&&isFunction(e.catch),isPlainObject=e=>toTypeString(e)==="[object Object]",isEmptyObject=e=>isPlainObject(e)&&Object.keys(e).length===0;function isUrl(e){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}const isSVGElement=e=>typeof SVGElement<"u"&&e instanceof SVGElement,isComponent=e=>isPlainObject(e)&&(isFunction(e.render)||isFunction(e.setup));function isIOS(){const e=navigator.userAgent.includes("iPhone"),t=navigator.userAgent.includes("iPad");return e||t}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isComponent=isComponent,exports.isDate=isDate,exports.isEmptyObject=isEmptyObject,exports.isFunction=isFunction,exports.isIOS=isIOS,exports.isMap=isMap,exports.isObject=isObject,exports.isPlainObject=isPlainObject,exports.isPromise=isPromise,exports.isRegExp=isRegExp,exports.isSVGElement=isSVGElement,exports.isSet=isSet,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUrl=isUrl,exports.objectToString=objectToString,exports.toRawType=toRawType,exports.toTypeString=toTypeString;
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Object.prototype.toString 别名
3
+ */
4
+ declare const objectToString: () => string;
5
+ /**
6
+ * 获取类型
7
+ * @param value
8
+ * @returns
9
+ */
10
+ declare const toTypeString: (value: any) => string;
11
+ /**
12
+ * 拿到类型字符串
13
+ * @param value
14
+ * @returns
15
+ */
16
+ declare const toRawType: (value: any) => string;
17
+ /**
18
+ * 判断是否是数组
19
+ */
20
+ declare const isArray: (arg: any) => arg is any[];
21
+ /**
22
+ * 判断是否是Map
23
+ * @param val
24
+ * @returns
25
+ */
26
+ declare const isMap: (val: any) => val is Map<any, any>;
27
+ /**
28
+ * 判断是否是Set
29
+ * @param val
30
+ * @returns
31
+ */
32
+ declare const isSet: (val: any) => val is Set<any>;
33
+ /**
34
+ * 判断是否是Date
35
+ * @param val
36
+ * @returns
37
+ */
38
+ declare const isDate: (val: any) => val is Date;
39
+ /**
40
+ * 判断是否是Reg
41
+ * @param val
42
+ * @returns
43
+ */
44
+ declare const isRegExp: (val: any) => val is RegExp;
45
+ /**
46
+ * 判断是否是函数
47
+ * @param val
48
+ * @returns
49
+ */
50
+ declare const isFunction: (val: any) => val is Function;
51
+ /**
52
+ * 判断是否是字符串
53
+ * @param val
54
+ * @returns
55
+ */
56
+ declare const isString: (val: any) => val is string;
57
+ /**
58
+ * 判断是否是Symbol
59
+ * @param val
60
+ * @returns
61
+ */
62
+ declare const isSymbol: (val: any) => val is symbol;
63
+ /**
64
+ * 判断是否是boolean
65
+ * @param val
66
+ * @returns
67
+ */
68
+ declare const isBoolean: (val: any) => val is boolean;
69
+ /**
70
+ * 判断是否是object
71
+ * @param val
72
+ * @returns
73
+ */
74
+ declare const isObject: (val: any) => val is Record<keyof any, any>;
75
+ /**
76
+ * 判断是否是Promise
77
+ * @param val
78
+ * @returns
79
+ */
80
+ declare const isPromise: <T = any>(val: any) => val is Promise<T>;
81
+ /**
82
+ * 判断是否是 纯对象 object
83
+ * @param val
84
+ * @returns
85
+ */
86
+ declare const isPlainObject: (val: any) => val is Record<keyof any, any>;
87
+ /**
88
+ * 是否是空对象
89
+ * @param val
90
+ * @returns
91
+ */
92
+ declare const isEmptyObject: (val: any) => val is Record<keyof any, any>;
93
+ /**
94
+ * 是否是链接
95
+ * @param url
96
+ * @returns
97
+ */
98
+ declare function isUrl(url: string): url is string;
99
+ /**
100
+ * 是否是SVGElement
101
+ * @param tag
102
+ * @returns
103
+ */
104
+ declare const isSVGElement: (tag: any) => tag is SVGElement;
105
+ /**
106
+ * 是否是vue 组件
107
+ * @param val
108
+ * @returns
109
+ */
110
+ declare const isComponent: (val: any) => boolean;
111
+ /**
112
+ * 是否是ios
113
+ * @returns {boolean}
114
+ */
115
+ declare function isIOS(): boolean;
116
+
117
+ export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isSymbol, isUrl, objectToString, toRawType, toTypeString };
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Object.prototype.toString 别名
3
+ */
4
+ declare const objectToString: () => string;
5
+ /**
6
+ * 获取类型
7
+ * @param value
8
+ * @returns
9
+ */
10
+ declare const toTypeString: (value: any) => string;
11
+ /**
12
+ * 拿到类型字符串
13
+ * @param value
14
+ * @returns
15
+ */
16
+ declare const toRawType: (value: any) => string;
17
+ /**
18
+ * 判断是否是数组
19
+ */
20
+ declare const isArray: (arg: any) => arg is any[];
21
+ /**
22
+ * 判断是否是Map
23
+ * @param val
24
+ * @returns
25
+ */
26
+ declare const isMap: (val: any) => val is Map<any, any>;
27
+ /**
28
+ * 判断是否是Set
29
+ * @param val
30
+ * @returns
31
+ */
32
+ declare const isSet: (val: any) => val is Set<any>;
33
+ /**
34
+ * 判断是否是Date
35
+ * @param val
36
+ * @returns
37
+ */
38
+ declare const isDate: (val: any) => val is Date;
39
+ /**
40
+ * 判断是否是Reg
41
+ * @param val
42
+ * @returns
43
+ */
44
+ declare const isRegExp: (val: any) => val is RegExp;
45
+ /**
46
+ * 判断是否是函数
47
+ * @param val
48
+ * @returns
49
+ */
50
+ declare const isFunction: (val: any) => val is Function;
51
+ /**
52
+ * 判断是否是字符串
53
+ * @param val
54
+ * @returns
55
+ */
56
+ declare const isString: (val: any) => val is string;
57
+ /**
58
+ * 判断是否是Symbol
59
+ * @param val
60
+ * @returns
61
+ */
62
+ declare const isSymbol: (val: any) => val is symbol;
63
+ /**
64
+ * 判断是否是boolean
65
+ * @param val
66
+ * @returns
67
+ */
68
+ declare const isBoolean: (val: any) => val is boolean;
69
+ /**
70
+ * 判断是否是object
71
+ * @param val
72
+ * @returns
73
+ */
74
+ declare const isObject: (val: any) => val is Record<keyof any, any>;
75
+ /**
76
+ * 判断是否是Promise
77
+ * @param val
78
+ * @returns
79
+ */
80
+ declare const isPromise: <T = any>(val: any) => val is Promise<T>;
81
+ /**
82
+ * 判断是否是 纯对象 object
83
+ * @param val
84
+ * @returns
85
+ */
86
+ declare const isPlainObject: (val: any) => val is Record<keyof any, any>;
87
+ /**
88
+ * 是否是空对象
89
+ * @param val
90
+ * @returns
91
+ */
92
+ declare const isEmptyObject: (val: any) => val is Record<keyof any, any>;
93
+ /**
94
+ * 是否是链接
95
+ * @param url
96
+ * @returns
97
+ */
98
+ declare function isUrl(url: string): url is string;
99
+ /**
100
+ * 是否是SVGElement
101
+ * @param tag
102
+ * @returns
103
+ */
104
+ declare const isSVGElement: (tag: any) => tag is SVGElement;
105
+ /**
106
+ * 是否是vue 组件
107
+ * @param val
108
+ * @returns
109
+ */
110
+ declare const isComponent: (val: any) => boolean;
111
+ /**
112
+ * 是否是ios
113
+ * @returns {boolean}
114
+ */
115
+ declare function isIOS(): boolean;
116
+
117
+ export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isSymbol, isUrl, objectToString, toRawType, toTypeString };
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Object.prototype.toString 别名
3
+ */
4
+ declare const objectToString: () => string;
5
+ /**
6
+ * 获取类型
7
+ * @param value
8
+ * @returns
9
+ */
10
+ declare const toTypeString: (value: any) => string;
11
+ /**
12
+ * 拿到类型字符串
13
+ * @param value
14
+ * @returns
15
+ */
16
+ declare const toRawType: (value: any) => string;
17
+ /**
18
+ * 判断是否是数组
19
+ */
20
+ declare const isArray: (arg: any) => arg is any[];
21
+ /**
22
+ * 判断是否是Map
23
+ * @param val
24
+ * @returns
25
+ */
26
+ declare const isMap: (val: any) => val is Map<any, any>;
27
+ /**
28
+ * 判断是否是Set
29
+ * @param val
30
+ * @returns
31
+ */
32
+ declare const isSet: (val: any) => val is Set<any>;
33
+ /**
34
+ * 判断是否是Date
35
+ * @param val
36
+ * @returns
37
+ */
38
+ declare const isDate: (val: any) => val is Date;
39
+ /**
40
+ * 判断是否是Reg
41
+ * @param val
42
+ * @returns
43
+ */
44
+ declare const isRegExp: (val: any) => val is RegExp;
45
+ /**
46
+ * 判断是否是函数
47
+ * @param val
48
+ * @returns
49
+ */
50
+ declare const isFunction: (val: any) => val is Function;
51
+ /**
52
+ * 判断是否是字符串
53
+ * @param val
54
+ * @returns
55
+ */
56
+ declare const isString: (val: any) => val is string;
57
+ /**
58
+ * 判断是否是Symbol
59
+ * @param val
60
+ * @returns
61
+ */
62
+ declare const isSymbol: (val: any) => val is symbol;
63
+ /**
64
+ * 判断是否是boolean
65
+ * @param val
66
+ * @returns
67
+ */
68
+ declare const isBoolean: (val: any) => val is boolean;
69
+ /**
70
+ * 判断是否是object
71
+ * @param val
72
+ * @returns
73
+ */
74
+ declare const isObject: (val: any) => val is Record<keyof any, any>;
75
+ /**
76
+ * 判断是否是Promise
77
+ * @param val
78
+ * @returns
79
+ */
80
+ declare const isPromise: <T = any>(val: any) => val is Promise<T>;
81
+ /**
82
+ * 判断是否是 纯对象 object
83
+ * @param val
84
+ * @returns
85
+ */
86
+ declare const isPlainObject: (val: any) => val is Record<keyof any, any>;
87
+ /**
88
+ * 是否是空对象
89
+ * @param val
90
+ * @returns
91
+ */
92
+ declare const isEmptyObject: (val: any) => val is Record<keyof any, any>;
93
+ /**
94
+ * 是否是链接
95
+ * @param url
96
+ * @returns
97
+ */
98
+ declare function isUrl(url: string): url is string;
99
+ /**
100
+ * 是否是SVGElement
101
+ * @param tag
102
+ * @returns
103
+ */
104
+ declare const isSVGElement: (tag: any) => tag is SVGElement;
105
+ /**
106
+ * 是否是vue 组件
107
+ * @param val
108
+ * @returns
109
+ */
110
+ declare const isComponent: (val: any) => boolean;
111
+ /**
112
+ * 是否是ios
113
+ * @returns {boolean}
114
+ */
115
+ declare function isIOS(): boolean;
116
+
117
+ export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isSymbol, isUrl, objectToString, toRawType, toTypeString };
@@ -0,0 +1 @@
1
+ const i=Object.prototype.toString,t=e=>i.call(e),a=e=>t(e).slice(8,-1),r=Array.isArray,p=e=>t(e)==="[object Map]",l=e=>t(e)==="[object Set]",b=e=>t(e)==="[object Date]",y=e=>t(e)==="[object RegExp]",n=e=>typeof e=="function",d=e=>typeof e=="string",g=e=>typeof e=="symbol",j=e=>typeof e=="boolean",s=e=>e!==null&&typeof e=="object",u=e=>s(e)&&n(e.then)&&n(e.catch),o=e=>t(e)==="[object Object]",S=e=>o(e)&&Object.keys(e).length===0;function f(e){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}const m=e=>typeof SVGElement<"u"&&e instanceof SVGElement,z=e=>o(e)&&(n(e.render)||n(e.setup));function E(){const e=navigator.userAgent.includes("iPhone"),c=navigator.userAgent.includes("iPad");return e||c}export{r as isArray,j as isBoolean,z as isComponent,b as isDate,S as isEmptyObject,n as isFunction,E as isIOS,p as isMap,s as isObject,o as isPlainObject,u as isPromise,y as isRegExp,m as isSVGElement,l as isSet,d as isString,g as isSymbol,f as isUrl,i as objectToString,a as toRawType,t as toTypeString};
@@ -0,0 +1 @@
1
+ "use strict";const getBigLetter=()=>Array.from({length:26}).map((e,t)=>String.fromCharCode(65+t)),getSmallLetter=()=>Array.from({length:26}).map((e,t)=>String.fromCharCode(97+t));exports.getBigLetter=getBigLetter,exports.getSmallLetter=getSmallLetter;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @desc 生成大写字母
3
+ * @returns
4
+ */
5
+ declare const getBigLetter: () => string[];
6
+ /**
7
+ * @desc 生成小写字母
8
+ * @returns
9
+ */
10
+ declare const getSmallLetter: () => string[];
11
+
12
+ export { getBigLetter, getSmallLetter };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @desc 生成大写字母
3
+ * @returns
4
+ */
5
+ declare const getBigLetter: () => string[];
6
+ /**
7
+ * @desc 生成小写字母
8
+ * @returns
9
+ */
10
+ declare const getSmallLetter: () => string[];
11
+
12
+ export { getBigLetter, getSmallLetter };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @desc 生成大写字母
3
+ * @returns
4
+ */
5
+ declare const getBigLetter: () => string[];
6
+ /**
7
+ * @desc 生成小写字母
8
+ * @returns
9
+ */
10
+ declare const getSmallLetter: () => string[];
11
+
12
+ export { getBigLetter, getSmallLetter };
@@ -0,0 +1 @@
1
+ const e=()=>Array.from({length:26}).map((t,r)=>String.fromCharCode(65+r)),o=()=>Array.from({length:26}).map((t,r)=>String.fromCharCode(97+r));export{e as getBigLetter,o as getSmallLetter};
@@ -0,0 +1 @@
1
+ "use strict";const i=require("numeral"),e=require("accounting");function _interopDefaultCompat(t){return t&&typeof t=="object"&&"default"in t?t.default:t}const i__default=_interopDefaultCompat(i),e__default=_interopDefaultCompat(e);function formatMoney(t,n="\uFFE5"){return e__default.formatMoney(t,n)}function formatNumber(t,n="0.00"){return i__default(t).format(n)}function formatNumberFixed(t,n=2){let r=String(t);String(t).includes(".")&&(r=t.slice(0,t.indexOf(".")+n+1));const o="0."+"0".repeat(n);return formatNumber(r,o)}exports.formatMoney=formatMoney,exports.formatNumber=formatNumber,exports.formatNumberFixed=formatNumberFixed;