yuang-framework-ui-pc 1.0.19 → 1.2.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.
Files changed (398) hide show
  1. package/README.md +17 -41
  2. package/es/ele-admin-layout/components/layout-skeleton.d.ts +10 -0
  3. package/es/ele-admin-layout/components/layout-skeleton.js +47 -0
  4. package/es/ele-admin-layout/components/layout-tabs.d.ts +64 -0
  5. package/es/ele-admin-layout/components/layout-tabs.js +132 -0
  6. package/es/ele-admin-layout/components/layout-tool.d.ts +2 -0
  7. package/es/ele-admin-layout/components/layout-tool.js +21 -0
  8. package/es/ele-admin-layout/index.d.ts +293 -0
  9. package/es/ele-admin-layout/index.js +693 -0
  10. package/es/ele-admin-layout/props.d.ts +182 -0
  11. package/es/ele-admin-layout/props.js +169 -0
  12. package/es/ele-admin-layout/style/css-var.scss +14 -0
  13. package/es/ele-admin-layout/style/header.scss +192 -0
  14. package/es/ele-admin-layout/style/index.d.ts +1 -0
  15. package/es/ele-admin-layout/style/index.js +9 -0
  16. package/es/ele-admin-layout/style/index.scss +313 -0
  17. package/es/ele-admin-layout/style/sidebar.scss +187 -0
  18. package/es/ele-admin-layout/style/tabs.scss +59 -0
  19. package/es/ele-admin-layout/types.d.ts +54 -0
  20. package/es/ele-app/components/message-body.d.ts +46 -0
  21. package/es/ele-app/components/message-body.js +98 -0
  22. package/es/ele-app/components/message-box-icon.d.ts +31 -0
  23. package/es/ele-app/components/message-box-icon.js +63 -0
  24. package/es/ele-app/el.d.ts +304 -0
  25. package/es/ele-app/index.d.ts +4 -0
  26. package/es/ele-app/index.js +13 -0
  27. package/es/ele-app/plus.d.ts +181 -0
  28. package/es/ele-app/style/common/index.d.ts +1 -0
  29. package/es/ele-app/style/common/index.js +1 -0
  30. package/es/ele-app/style/common/index.scss +55 -0
  31. package/es/ele-app/style/css-var.scss +11 -0
  32. package/es/ele-app/style/index.d.ts +1 -0
  33. package/es/ele-app/style/index.js +4 -0
  34. package/es/ele-app/style/index.scss +4 -0
  35. package/es/ele-app/style/message/css-var.scss +8 -0
  36. package/es/ele-app/style/message/index.d.ts +1 -0
  37. package/es/ele-app/style/message/index.js +2 -0
  38. package/es/ele-app/style/message/index.scss +261 -0
  39. package/es/ele-app/style/overwrite/autocomplete/css-var.scss +8 -0
  40. package/es/ele-app/style/overwrite/autocomplete/index.d.ts +1 -0
  41. package/es/ele-app/style/overwrite/autocomplete/index.js +1 -0
  42. package/es/ele-app/style/overwrite/autocomplete/index.scss +33 -0
  43. package/es/ele-app/style/overwrite/backtop/index.d.ts +1 -0
  44. package/es/ele-app/style/overwrite/backtop/index.js +1 -0
  45. package/es/ele-app/style/overwrite/backtop/index.scss +8 -0
  46. package/es/ele-app/style/overwrite/cascader/css-var.scss +8 -0
  47. package/es/ele-app/style/overwrite/cascader/index.d.ts +1 -0
  48. package/es/ele-app/style/overwrite/cascader/index.js +1 -0
  49. package/es/ele-app/style/overwrite/cascader/index.scss +166 -0
  50. package/es/ele-app/style/overwrite/checkbox/css-var.scss +8 -0
  51. package/es/ele-app/style/overwrite/checkbox/index.d.ts +1 -0
  52. package/es/ele-app/style/overwrite/checkbox/index.js +1 -0
  53. package/es/ele-app/style/overwrite/checkbox/index.scss +161 -0
  54. package/es/ele-app/style/overwrite/color-picker/index.d.ts +1 -0
  55. package/es/ele-app/style/overwrite/color-picker/index.js +1 -0
  56. package/es/ele-app/style/overwrite/color-picker/index.scss +42 -0
  57. package/es/ele-app/style/overwrite/css-var.scss +33 -0
  58. package/es/ele-app/style/overwrite/date-picker/css-var.scss +16 -0
  59. package/es/ele-app/style/overwrite/date-picker/index.d.ts +1 -0
  60. package/es/ele-app/style/overwrite/date-picker/index.js +1 -0
  61. package/es/ele-app/style/overwrite/date-picker/index.scss +895 -0
  62. package/es/ele-app/style/overwrite/descriptions/css-var.scss +8 -0
  63. package/es/ele-app/style/overwrite/descriptions/index.d.ts +1 -0
  64. package/es/ele-app/style/overwrite/descriptions/index.js +1 -0
  65. package/es/ele-app/style/overwrite/descriptions/index.scss +52 -0
  66. package/es/ele-app/style/overwrite/index.d.ts +1 -0
  67. package/es/ele-app/style/overwrite/index.js +16 -0
  68. package/es/ele-app/style/overwrite/index.scss +16 -0
  69. package/es/ele-app/style/overwrite/input/css-var.scss +34 -0
  70. package/es/ele-app/style/overwrite/input/index.d.ts +1 -0
  71. package/es/ele-app/style/overwrite/input/index.js +1 -0
  72. package/es/ele-app/style/overwrite/input/index.scss +540 -0
  73. package/es/ele-app/style/overwrite/message-box/css-var.scss +8 -0
  74. package/es/ele-app/style/overwrite/message-box/index.d.ts +1 -0
  75. package/es/ele-app/style/overwrite/message-box/index.js +2 -0
  76. package/es/ele-app/style/overwrite/message-box/index.scss +148 -0
  77. package/es/ele-app/style/overwrite/notification/css-var.scss +8 -0
  78. package/es/ele-app/style/overwrite/notification/index.d.ts +1 -0
  79. package/es/ele-app/style/overwrite/notification/index.js +2 -0
  80. package/es/ele-app/style/overwrite/notification/index.scss +65 -0
  81. package/es/ele-app/style/overwrite/popper/css-var.scss +14 -0
  82. package/es/ele-app/style/overwrite/popper/index.d.ts +1 -0
  83. package/es/ele-app/style/overwrite/popper/index.js +1 -0
  84. package/es/ele-app/style/overwrite/popper/index.scss +9 -0
  85. package/es/ele-app/style/overwrite/radio/css-var.scss +8 -0
  86. package/es/ele-app/style/overwrite/radio/index.d.ts +1 -0
  87. package/es/ele-app/style/overwrite/radio/index.js +1 -0
  88. package/es/ele-app/style/overwrite/radio/index.scss +128 -0
  89. package/es/ele-app/style/overwrite/select/css-var.scss +8 -0
  90. package/es/ele-app/style/overwrite/select/index.d.ts +1 -0
  91. package/es/ele-app/style/overwrite/select/index.js +1 -0
  92. package/es/ele-app/style/overwrite/select/index.scss +203 -0
  93. package/es/ele-app/style/overwrite/tag/css-var.scss +8 -0
  94. package/es/ele-app/style/overwrite/tag/index.d.ts +1 -0
  95. package/es/ele-app/style/overwrite/tag/index.js +1 -0
  96. package/es/ele-app/style/overwrite/tag/index.scss +346 -0
  97. package/es/ele-app/style/overwrite/tree/css-var.scss +8 -0
  98. package/es/ele-app/style/overwrite/tree/index.d.ts +1 -0
  99. package/es/ele-app/style/overwrite/tree/index.js +1 -0
  100. package/es/ele-app/style/overwrite/tree/index.scss +106 -0
  101. package/es/ele-app/style/overwrite/tree-select/css-var.scss +8 -0
  102. package/es/ele-app/style/overwrite/tree-select/index.d.ts +1 -0
  103. package/es/ele-app/style/overwrite/tree-select/index.js +1 -0
  104. package/es/ele-app/style/overwrite/tree-select/index.scss +108 -0
  105. package/es/ele-app/style/scrollbar/css-var.scss +71 -0
  106. package/es/ele-app/style/scrollbar/index.d.ts +1 -0
  107. package/es/ele-app/style/scrollbar/index.js +1 -0
  108. package/es/ele-app/style/scrollbar/index.scss +9 -0
  109. package/es/ele-app/types.d.ts +48 -0
  110. package/es/ele-pro-layout/components/pro-iframe.vue +120 -0
  111. package/es/ele-pro-layout/index.vue +1277 -0
  112. package/es/ele-pro-layout/props.ts +255 -0
  113. package/es/ele-pro-layout/style/index.scss +41 -0
  114. package/es/ele-pro-layout/style/index.ts +2 -0
  115. package/es/ele-pro-layout/types.ts +212 -0
  116. package/es/ele-pro-layout/util.ts +277 -0
  117. package/es/ele-tabs/index.d.ts +149 -0
  118. package/es/ele-tabs/index.js +480 -0
  119. package/es/ele-tabs/props.d.ts +82 -0
  120. package/es/ele-tabs/props.js +46 -0
  121. package/es/ele-tabs/style/css-var.scss +8 -0
  122. package/es/ele-tabs/style/index.d.ts +1 -0
  123. package/es/ele-tabs/style/index.js +5 -0
  124. package/es/ele-tabs/style/index.scss +1074 -0
  125. package/es/ele-tabs/types.d.ts +70 -0
  126. package/es/icons/AnalysisOutlined.d.ts +2 -0
  127. package/es/icons/AnalysisOutlined.js +35 -0
  128. package/es/icons/ApplicationOutlined.d.ts +2 -0
  129. package/es/icons/ApplicationOutlined.js +26 -0
  130. package/es/icons/AppstoreAddOutlined.d.ts +2 -0
  131. package/es/icons/AppstoreAddOutlined.js +35 -0
  132. package/es/icons/AppstoreOutlined.d.ts +2 -0
  133. package/es/icons/AppstoreOutlined.js +35 -0
  134. package/es/icons/ArrowDown.d.ts +2 -0
  135. package/es/icons/ArrowDown.js +31 -0
  136. package/es/icons/ArrowDownOutlined.d.ts +2 -0
  137. package/es/icons/ArrowDownOutlined.js +30 -0
  138. package/es/icons/ArrowLeft.d.ts +2 -0
  139. package/es/icons/ArrowLeft.js +31 -0
  140. package/es/icons/ArrowLeftOutlined.d.ts +2 -0
  141. package/es/icons/ArrowLeftOutlined.js +30 -0
  142. package/es/icons/ArrowRight.d.ts +2 -0
  143. package/es/icons/ArrowRight.js +31 -0
  144. package/es/icons/ArrowRightOutlined.d.ts +2 -0
  145. package/es/icons/ArrowRightOutlined.js +30 -0
  146. package/es/icons/ArrowUp.d.ts +2 -0
  147. package/es/icons/ArrowUp.js +31 -0
  148. package/es/icons/ArrowUpOutlined.d.ts +2 -0
  149. package/es/icons/ArrowUpOutlined.js +30 -0
  150. package/es/icons/BellOutlined.d.ts +2 -0
  151. package/es/icons/BellOutlined.js +29 -0
  152. package/es/icons/BookOutlined.d.ts +2 -0
  153. package/es/icons/BookOutlined.js +29 -0
  154. package/es/icons/CalendarOutlined.d.ts +2 -0
  155. package/es/icons/CalendarOutlined.js +29 -0
  156. package/es/icons/CaretDownFilled.d.ts +2 -0
  157. package/es/icons/CaretDownFilled.js +26 -0
  158. package/es/icons/CaretUpFilled.d.ts +2 -0
  159. package/es/icons/CaretUpFilled.js +26 -0
  160. package/es/icons/CheckCircleFilled.d.ts +2 -0
  161. package/es/icons/CheckCircleFilled.js +26 -0
  162. package/es/icons/CheckCircleOutlined.d.ts +2 -0
  163. package/es/icons/CheckCircleOutlined.js +32 -0
  164. package/es/icons/CheckOutlined.d.ts +2 -0
  165. package/es/icons/CheckOutlined.js +30 -0
  166. package/es/icons/CityOutlined.d.ts +2 -0
  167. package/es/icons/CityOutlined.js +35 -0
  168. package/es/icons/ClockCircleOutlined.d.ts +2 -0
  169. package/es/icons/ClockCircleOutlined.js +32 -0
  170. package/es/icons/CloseCircleFilled.d.ts +2 -0
  171. package/es/icons/CloseCircleFilled.js +26 -0
  172. package/es/icons/CloseCircleOutlined.d.ts +2 -0
  173. package/es/icons/CloseCircleOutlined.js +31 -0
  174. package/es/icons/CloseOutlined.d.ts +2 -0
  175. package/es/icons/CloseOutlined.js +30 -0
  176. package/es/icons/CloudUploadOutlined.d.ts +2 -0
  177. package/es/icons/CloudUploadOutlined.js +32 -0
  178. package/es/icons/ClusterOutlined.d.ts +2 -0
  179. package/es/icons/ClusterOutlined.js +29 -0
  180. package/es/icons/CodeOutlined.d.ts +2 -0
  181. package/es/icons/CodeOutlined.js +34 -0
  182. package/es/icons/ColumnHeightOutlined.d.ts +2 -0
  183. package/es/icons/ColumnHeightOutlined.js +35 -0
  184. package/es/icons/CompassOutlined.d.ts +2 -0
  185. package/es/icons/CompassOutlined.js +34 -0
  186. package/es/icons/CompressOutlined.d.ts +2 -0
  187. package/es/icons/CompressOutlined.js +36 -0
  188. package/es/icons/ConnectionOutlined.d.ts +2 -0
  189. package/es/icons/ConnectionOutlined.js +31 -0
  190. package/es/icons/ControlOutlined.d.ts +2 -0
  191. package/es/icons/ControlOutlined.js +33 -0
  192. package/es/icons/CopyOutlined.d.ts +2 -0
  193. package/es/icons/CopyOutlined.js +35 -0
  194. package/es/icons/CornerLeftFilled.d.ts +2 -0
  195. package/es/icons/CornerLeftFilled.js +26 -0
  196. package/es/icons/CornerRightFilled.d.ts +2 -0
  197. package/es/icons/CornerRightFilled.js +26 -0
  198. package/es/icons/CpuOutlined.d.ts +2 -0
  199. package/es/icons/CpuOutlined.js +30 -0
  200. package/es/icons/DashboardOutlined.d.ts +2 -0
  201. package/es/icons/DashboardOutlined.js +37 -0
  202. package/es/icons/DatabaseOutlined.d.ts +2 -0
  203. package/es/icons/DatabaseOutlined.js +35 -0
  204. package/es/icons/DeleteOutlined.d.ts +2 -0
  205. package/es/icons/DeleteOutlined.js +34 -0
  206. package/es/icons/DesktopOutlined.d.ts +2 -0
  207. package/es/icons/DesktopOutlined.js +29 -0
  208. package/es/icons/DownloadOutlined.d.ts +2 -0
  209. package/es/icons/DownloadOutlined.js +32 -0
  210. package/es/icons/DragOutlined.d.ts +2 -0
  211. package/es/icons/DragOutlined.js +30 -0
  212. package/es/icons/EditOutlined.d.ts +2 -0
  213. package/es/icons/EditOutlined.js +32 -0
  214. package/es/icons/EllipsisOutlined.d.ts +2 -0
  215. package/es/icons/EllipsisOutlined.js +42 -0
  216. package/es/icons/EnvironmentOutlined.d.ts +2 -0
  217. package/es/icons/EnvironmentOutlined.js +31 -0
  218. package/es/icons/ExclamationCircleFilled.d.ts +2 -0
  219. package/es/icons/ExclamationCircleFilled.js +26 -0
  220. package/es/icons/ExpandOutlined.d.ts +2 -0
  221. package/es/icons/ExpandOutlined.js +36 -0
  222. package/es/icons/EyeOutlined.d.ts +2 -0
  223. package/es/icons/EyeOutlined.js +30 -0
  224. package/es/icons/FileOutlined.d.ts +2 -0
  225. package/es/icons/FileOutlined.js +35 -0
  226. package/es/icons/FilterFilled.d.ts +2 -0
  227. package/es/icons/FilterFilled.js +26 -0
  228. package/es/icons/FolderAddOutlined.d.ts +2 -0
  229. package/es/icons/FolderAddOutlined.js +31 -0
  230. package/es/icons/FolderOutlined.d.ts +2 -0
  231. package/es/icons/FolderOutlined.js +29 -0
  232. package/es/icons/FormOutlined.d.ts +2 -0
  233. package/es/icons/FormOutlined.js +31 -0
  234. package/es/icons/FullscreenExitOutlined.d.ts +2 -0
  235. package/es/icons/FullscreenExitOutlined.js +34 -0
  236. package/es/icons/FullscreenOutlined.d.ts +2 -0
  237. package/es/icons/FullscreenOutlined.js +34 -0
  238. package/es/icons/FundOutlined.d.ts +2 -0
  239. package/es/icons/FundOutlined.js +31 -0
  240. package/es/icons/GlobalOutlined.d.ts +2 -0
  241. package/es/icons/GlobalOutlined.js +28 -0
  242. package/es/icons/HolderOutlined.d.ts +2 -0
  243. package/es/icons/HolderOutlined.js +26 -0
  244. package/es/icons/HomeOutlined.d.ts +2 -0
  245. package/es/icons/HomeOutlined.js +29 -0
  246. package/es/icons/IdcardOutlined.d.ts +2 -0
  247. package/es/icons/IdcardOutlined.js +38 -0
  248. package/es/icons/InfoCircleFilled.d.ts +2 -0
  249. package/es/icons/InfoCircleFilled.js +26 -0
  250. package/es/icons/LinkOutlined.d.ts +2 -0
  251. package/es/icons/LinkOutlined.js +32 -0
  252. package/es/icons/LoadingDotOutlined.d.ts +2 -0
  253. package/es/icons/LoadingDotOutlined.js +29 -0
  254. package/es/icons/LoadingOutlined.d.ts +2 -0
  255. package/es/icons/LoadingOutlined.js +29 -0
  256. package/es/icons/LockOutlined.d.ts +2 -0
  257. package/es/icons/LockOutlined.js +32 -0
  258. package/es/icons/LogOutlined.d.ts +2 -0
  259. package/es/icons/LogOutlined.js +35 -0
  260. package/es/icons/LogoutOutlined.d.ts +2 -0
  261. package/es/icons/LogoutOutlined.js +31 -0
  262. package/es/icons/MailOutlined.d.ts +2 -0
  263. package/es/icons/MailOutlined.js +29 -0
  264. package/es/icons/MenuFoldOutlined.d.ts +2 -0
  265. package/es/icons/MenuFoldOutlined.js +28 -0
  266. package/es/icons/MenuOutlined.d.ts +2 -0
  267. package/es/icons/MenuOutlined.js +32 -0
  268. package/es/icons/MenuUnfoldOutlined.d.ts +2 -0
  269. package/es/icons/MenuUnfoldOutlined.js +28 -0
  270. package/es/icons/MessageOutlined.d.ts +2 -0
  271. package/es/icons/MessageOutlined.js +50 -0
  272. package/es/icons/MinusCircleOutlined.d.ts +2 -0
  273. package/es/icons/MinusCircleOutlined.js +31 -0
  274. package/es/icons/MobileOutlined.d.ts +2 -0
  275. package/es/icons/MobileOutlined.js +37 -0
  276. package/es/icons/MoonOutlined.d.ts +2 -0
  277. package/es/icons/MoonOutlined.js +29 -0
  278. package/es/icons/MoreOutlined.d.ts +2 -0
  279. package/es/icons/MoreOutlined.js +42 -0
  280. package/es/icons/PauseFilled.d.ts +2 -0
  281. package/es/icons/PauseFilled.js +30 -0
  282. package/es/icons/PieChartOutlined.d.ts +2 -0
  283. package/es/icons/PieChartOutlined.js +31 -0
  284. package/es/icons/PlayFilled.d.ts +2 -0
  285. package/es/icons/PlayFilled.js +26 -0
  286. package/es/icons/PlusCircleOutlined.d.ts +2 -0
  287. package/es/icons/PlusCircleOutlined.js +31 -0
  288. package/es/icons/PlusOutlined.d.ts +2 -0
  289. package/es/icons/PlusOutlined.js +29 -0
  290. package/es/icons/PrinterOutlined.d.ts +2 -0
  291. package/es/icons/PrinterOutlined.js +29 -0
  292. package/es/icons/ProtectOutlined.d.ts +2 -0
  293. package/es/icons/ProtectOutlined.js +32 -0
  294. package/es/icons/QuestionCircleFilled.d.ts +2 -0
  295. package/es/icons/QuestionCircleFilled.js +26 -0
  296. package/es/icons/QuestionCircleOutlined.d.ts +2 -0
  297. package/es/icons/QuestionCircleOutlined.js +39 -0
  298. package/es/icons/ReloadOutlined.d.ts +2 -0
  299. package/es/icons/ReloadOutlined.js +30 -0
  300. package/es/icons/ResizeOutlined.d.ts +2 -0
  301. package/es/icons/ResizeOutlined.js +30 -0
  302. package/es/icons/SearchOutlined.d.ts +2 -0
  303. package/es/icons/SearchOutlined.js +29 -0
  304. package/es/icons/SettingOutlined.d.ts +2 -0
  305. package/es/icons/SettingOutlined.js +31 -0
  306. package/es/icons/ShoppingOutlined.d.ts +2 -0
  307. package/es/icons/ShoppingOutlined.js +29 -0
  308. package/es/icons/SizeCompactOutlined.d.ts +2 -0
  309. package/es/icons/SizeCompactOutlined.js +34 -0
  310. package/es/icons/SizeMiddleOutlined.d.ts +2 -0
  311. package/es/icons/SizeMiddleOutlined.js +34 -0
  312. package/es/icons/SizeSlackOutlined.d.ts +2 -0
  313. package/es/icons/SizeSlackOutlined.js +34 -0
  314. package/es/icons/SortOutlined.d.ts +2 -0
  315. package/es/icons/SortOutlined.js +32 -0
  316. package/es/icons/StarFilled.d.ts +2 -0
  317. package/es/icons/StarFilled.js +26 -0
  318. package/es/icons/StepBackwardFilled.d.ts +2 -0
  319. package/es/icons/StepBackwardFilled.js +33 -0
  320. package/es/icons/StepForwardFilled.d.ts +2 -0
  321. package/es/icons/StepForwardFilled.js +33 -0
  322. package/es/icons/SuitcaseOutlined.d.ts +2 -0
  323. package/es/icons/SuitcaseOutlined.js +29 -0
  324. package/es/icons/SunOutlined.d.ts +2 -0
  325. package/es/icons/SunOutlined.js +29 -0
  326. package/es/icons/SwapOutlined.d.ts +2 -0
  327. package/es/icons/SwapOutlined.js +32 -0
  328. package/es/icons/SyncOutlined.d.ts +2 -0
  329. package/es/icons/SyncOutlined.js +32 -0
  330. package/es/icons/TableOutlined.d.ts +2 -0
  331. package/es/icons/TableOutlined.js +29 -0
  332. package/es/icons/TagOutlined.d.ts +2 -0
  333. package/es/icons/TagOutlined.js +31 -0
  334. package/es/icons/TimerOutlined.d.ts +2 -0
  335. package/es/icons/TimerOutlined.js +31 -0
  336. package/es/icons/UndoOutlined.d.ts +2 -0
  337. package/es/icons/UndoOutlined.js +30 -0
  338. package/es/icons/UnlockOutlined.d.ts +2 -0
  339. package/es/icons/UnlockOutlined.js +32 -0
  340. package/es/icons/UploadOutlined.d.ts +2 -0
  341. package/es/icons/UploadOutlined.js +32 -0
  342. package/es/icons/UserOutlined.d.ts +2 -0
  343. package/es/icons/UserOutlined.js +29 -0
  344. package/es/icons/VerticalAlignMiddleOutlined.d.ts +2 -0
  345. package/es/icons/VerticalAlignMiddleOutlined.js +32 -0
  346. package/es/icons/VerticalLeftOutlined.d.ts +2 -0
  347. package/es/icons/VerticalLeftOutlined.js +28 -0
  348. package/es/icons/VerticalRightOutlined.d.ts +2 -0
  349. package/es/icons/VerticalRightOutlined.js +28 -0
  350. package/es/icons/WarningOutlined.d.ts +2 -0
  351. package/es/icons/WarningOutlined.js +42 -0
  352. package/es/icons/ZoomInOutlined.d.ts +2 -0
  353. package/es/icons/ZoomInOutlined.js +31 -0
  354. package/es/icons/ZoomOutOutlined.d.ts +2 -0
  355. package/es/icons/ZoomOutOutlined.js +31 -0
  356. package/es/icons/index.d.ts +115 -0
  357. package/es/icons/index.js +232 -0
  358. package/es/utils/chart-theme-dark.d.ts +373 -0
  359. package/es/utils/chart-theme-dark.js +397 -0
  360. package/es/utils/chart-theme.d.ts +368 -0
  361. package/es/utils/chart-theme.js +392 -0
  362. package/es/utils/core.d.ts +168 -0
  363. package/es/utils/core.js +318 -0
  364. package/es/utils/hook.d.ts +113 -0
  365. package/es/utils/hook.js +264 -0
  366. package/es/utils/menu-util.d.ts +14 -0
  367. package/es/utils/menu-util.js +78 -0
  368. package/es/utils/message-box.d.ts +25 -0
  369. package/es/utils/message-box.js +98 -0
  370. package/es/utils/message.d.ts +66 -0
  371. package/es/utils/message.js +267 -0
  372. package/es/utils/resolvers.d.ts +18 -0
  373. package/es/utils/resolvers.js +50 -0
  374. package/es/utils/theme-util.d.ts +6 -0
  375. package/es/utils/theme-util.js +42 -0
  376. package/es/utils/validate.d.ts +182 -0
  377. package/es/utils/validate.js +197 -0
  378. package/package.json +184 -44
  379. package/typings/global.d.ts +64 -0
  380. package/dist/favicon.ico +0 -0
  381. package/dist/style.css +0 -1
  382. package/dist/yuang-framework-ui-pc.es.js +0 -78
  383. package/dist/yuang-framework-ui-pc.umd.js +0 -1
  384. package/src/App.vue +0 -31
  385. package/src/components/YuButton/index.vue +0 -35
  386. package/src/components/YuRow/index.vue +0 -16
  387. package/src/components/index.ts +0 -14
  388. package/src/main.ts +0 -42
  389. package/src/router/index.ts +0 -26
  390. package/src/shims-vue.d.ts +0 -10
  391. package/src/utils/vueRouterUtils.ts +0 -30
  392. package/src/views/components/yu-button/index.vue +0 -15
  393. package/src/views/exception/403/components/icon-svg.vue +0 -276
  394. package/src/views/exception/403/index.vue +0 -25
  395. package/src/views/exception/404/components/icon-svg.vue +0 -288
  396. package/src/views/exception/404/index.vue +0 -25
  397. package/src/views/exception/500/components/icon-svg.vue +0 -331
  398. package/src/views/exception/500/index.vue +0 -25
@@ -0,0 +1,318 @@
1
+ function toTree(option) {
2
+ const data = option.data;
3
+ const idField = option.idField || "id";
4
+ const parentIdField = option.parentIdField || "parentId";
5
+ const childrenField = option.childrenField || "children";
6
+ const parentIdIsNull = option.parentId == null;
7
+ const parentId = parentIdIsNull ? [] : option.parentId;
8
+ const parentIdIsArray = Array.isArray(parentId);
9
+ const addParentIds = option.addParentIds;
10
+ const parentIdsField = option.parentIdsField || "parentIds";
11
+ const parentIds = option.parentIds ?? [];
12
+ if (data == null) {
13
+ return [];
14
+ }
15
+ if (parentIdIsNull) {
16
+ data.forEach((d) => {
17
+ if (!data.some((t) => d[parentIdField] == t[idField]) && !parentId.includes(d[parentIdField])) {
18
+ parentId.push(d[parentIdField]);
19
+ }
20
+ });
21
+ }
22
+ const result = [];
23
+ data.forEach((d) => {
24
+ if (d[idField] == d[parentIdField]) {
25
+ const error = {
26
+ [idField]: d[idField],
27
+ [parentIdField]: d[parentIdField],
28
+ data: d
29
+ };
30
+ console.error("data error:", error);
31
+ throw new Error("data error");
32
+ }
33
+ if (parentIdIsArray ? parentId.includes(d[parentIdField]) : d[parentIdField] == parentId) {
34
+ const t = { ...d };
35
+ const children = toTree({
36
+ data,
37
+ idField,
38
+ parentIdField,
39
+ childrenField,
40
+ parentId: d[idField],
41
+ addParentIds,
42
+ parentIdsField,
43
+ parentIds: [...parentIds, d[idField]]
44
+ });
45
+ if (children.length > 0) {
46
+ t[childrenField] = children;
47
+ }
48
+ if (addParentIds) {
49
+ t[parentIdsField] = parentIds;
50
+ }
51
+ result.push(t);
52
+ }
53
+ });
54
+ return result;
55
+ }
56
+ function eachTree(data, callback, childrenField = "children", parent) {
57
+ if (data) {
58
+ data.forEach((d, i) => {
59
+ var _a;
60
+ if (callback && callback(d, i, parent) !== false && ((_a = d[childrenField]) == null ? void 0 : _a.length)) {
61
+ eachTree(d[childrenField], callback, childrenField, d);
62
+ }
63
+ });
64
+ }
65
+ }
66
+ function mapTree(data, formatter, childrenField = "children", resultChildrenField = "children", parent) {
67
+ const result = [];
68
+ if (data && data.length) {
69
+ data.forEach((d, i) => {
70
+ const item = formatter(d, i, parent);
71
+ if (item) {
72
+ if (d[childrenField] != null) {
73
+ item[resultChildrenField] = mapTree(
74
+ d[childrenField],
75
+ formatter,
76
+ childrenField,
77
+ resultChildrenField,
78
+ item
79
+ );
80
+ }
81
+ result.push(item);
82
+ }
83
+ });
84
+ }
85
+ return result;
86
+ }
87
+ function findTree(data, predicate, childrenField) {
88
+ let temp;
89
+ eachTree(
90
+ data,
91
+ (d, i) => {
92
+ if (predicate(d, i)) {
93
+ temp = d;
94
+ return false;
95
+ }
96
+ },
97
+ childrenField
98
+ );
99
+ return temp;
100
+ }
101
+ function random(m, n) {
102
+ return Math.floor(Math.random() * (m - n) + n);
103
+ }
104
+ function uuid(length = 32, radix) {
105
+ const str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
106
+ let result = "";
107
+ for (let i = 0; i < length; i++) {
108
+ result += str.charAt(Math.floor(Math.random() * (radix || str.length)));
109
+ }
110
+ return result;
111
+ }
112
+ function formatNumber(num) {
113
+ return String(num ?? "").replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g, "$1,");
114
+ }
115
+ function assignObject(target, source, excludes) {
116
+ Object.keys(target).forEach((key) => {
117
+ var _a;
118
+ if (!((_a = excludes == null ? void 0 : excludes.includes) == null ? void 0 : _a.call(excludes, key))) {
119
+ target[key] = source[key];
120
+ }
121
+ });
122
+ return target;
123
+ }
124
+ function isExternalLink(url) {
125
+ return !!(url && (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//")));
126
+ }
127
+ function queryChild(parentEl, className, attr) {
128
+ return Array.from((parentEl == null ? void 0 : parentEl.children) ?? []).find((el) => {
129
+ if (className && !el.classList.contains(className)) {
130
+ return false;
131
+ }
132
+ if (attr != null && attr[0] != null) {
133
+ if (el.getAttribute(attr[0]) != attr[1]) {
134
+ return false;
135
+ }
136
+ }
137
+ return true;
138
+ });
139
+ }
140
+ function getCurrentStyle(el) {
141
+ return el["currentStyle"] || window.getComputedStyle(el, null) || {};
142
+ }
143
+ function contentIsEllipsis(el, direction) {
144
+ if (!el || !el.childNodes.length) {
145
+ return false;
146
+ }
147
+ const range = document.createRange();
148
+ range.setStart(el, 0);
149
+ range.setEnd(el, el.childNodes.length);
150
+ const { width, height } = range.getBoundingClientRect();
151
+ const floorW = Math.floor(width);
152
+ const rangeWidth = width - floorW < 8e-3 ? floorW : width;
153
+ const floorH = Math.floor(height);
154
+ const rangeHeight = height - floorH < 8e-3 ? floorH : height;
155
+ const style = getCurrentStyle(el);
156
+ const top = Number.parseInt(style.paddingTop) || 0;
157
+ const left = Number.parseInt(style.paddingLeft) || 0;
158
+ const right = Number.parseInt(style.paddingRight) || 0;
159
+ const bottom = Number.parseInt(style.paddingBottom) || 0;
160
+ const horizontalPadding = left + right;
161
+ const verticalPadding = top + bottom;
162
+ if (direction === "horizontal") {
163
+ return rangeWidth + horizontalPadding > el.offsetWidth || el.scrollWidth > el.offsetWidth;
164
+ }
165
+ if (direction === "vertical") {
166
+ return rangeHeight + verticalPadding > el.offsetHeight || el.scrollHeight > el.offsetHeight;
167
+ }
168
+ return rangeWidth + horizontalPadding > el.offsetWidth || rangeHeight + verticalPadding > el.offsetHeight || el.scrollWidth > el.offsetWidth;
169
+ }
170
+ function checkFullscreen() {
171
+ return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement);
172
+ }
173
+ function exitFullscreen() {
174
+ const func = document.exitFullscreen || document.exitFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.msExitFullscreen;
175
+ func && func.call(document);
176
+ }
177
+ function requestFullscreen(el) {
178
+ if (el == null) {
179
+ el = document.documentElement;
180
+ }
181
+ const func = el.requestFullscreen || el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen;
182
+ if (!func) {
183
+ throw new Error("您的浏览器不支持全屏模式");
184
+ }
185
+ func.call(el);
186
+ }
187
+ function bd09ToGcj02(point) {
188
+ const x_pi = 3.141592653589793 * 3e3 / 180;
189
+ const x = point.lng - 65e-4;
190
+ const y = point.lat - 6e-3;
191
+ const z = Math.sqrt(x * x + y * y) - 2e-5 * Math.sin(y * x_pi);
192
+ const theta = Math.atan2(y, x) - 3e-6 * Math.cos(x * x_pi);
193
+ return {
194
+ lng: z * Math.cos(theta),
195
+ lat: z * Math.sin(theta)
196
+ };
197
+ }
198
+ function gcj02ToBd09(point) {
199
+ const x_pi = 3.141592653589793 * 3e3 / 180;
200
+ const x = point.lng;
201
+ const y = point.lat;
202
+ const z = Math.sqrt(x * x + y * y) + 2e-5 * Math.sin(y * x_pi);
203
+ const theta = Math.atan2(y, x) + 3e-6 * Math.cos(x * x_pi);
204
+ return {
205
+ lng: z * Math.cos(theta) + 65e-4,
206
+ lat: z * Math.sin(theta) + 6e-3
207
+ };
208
+ }
209
+ async function copyText(text) {
210
+ var _a;
211
+ if (typeof ((_a = navigator == null ? void 0 : navigator.clipboard) == null ? void 0 : _a.writeText) === "function") {
212
+ await navigator.clipboard.writeText(text);
213
+ return;
214
+ }
215
+ const el = document.createElement("textarea");
216
+ el.value = text;
217
+ el.style.position = "fixed";
218
+ el.style.top = "-200px";
219
+ el.style.left = "-200px";
220
+ el.style.width = "100px";
221
+ el.style.height = "100px";
222
+ document.body.appendChild(el);
223
+ el.focus();
224
+ el.select();
225
+ if (!document.execCommand("copy")) {
226
+ el.remove();
227
+ return Promise.reject(new Error("浏览器不支持复制"));
228
+ }
229
+ el.remove();
230
+ }
231
+ function getValue(data, path, defaultValue) {
232
+ if (data == null) {
233
+ return defaultValue;
234
+ }
235
+ const pathType = typeof path;
236
+ if (pathType === "function") {
237
+ return path(data);
238
+ }
239
+ const fields = (pathType === "string" ? path.match(/[^\[\].]+/g) : path) ?? [];
240
+ let result = data;
241
+ for (const key of fields) {
242
+ result = result[key.trim()];
243
+ }
244
+ return typeof result === "undefined" ? defaultValue : result;
245
+ }
246
+ function debounce(func, wait) {
247
+ let timer = void 0;
248
+ const debounced = function(...args) {
249
+ if (timer) {
250
+ clearTimeout(timer);
251
+ }
252
+ timer = setTimeout(() => {
253
+ func.apply(this, args);
254
+ timer = void 0;
255
+ }, wait);
256
+ };
257
+ return debounced;
258
+ }
259
+ function throttle(func, wait, trailing) {
260
+ let timer = void 0;
261
+ const debounced = function(...args) {
262
+ if (!timer) {
263
+ if (!trailing) {
264
+ func.apply(this, args);
265
+ }
266
+ timer = setTimeout(() => {
267
+ if (trailing) {
268
+ func.apply(this, args);
269
+ }
270
+ timer = void 0;
271
+ }, wait);
272
+ }
273
+ };
274
+ return debounced;
275
+ }
276
+ function omit(obj, fields) {
277
+ const result = Object.assign({}, obj);
278
+ if (obj) {
279
+ for (const key of fields) {
280
+ delete result[key];
281
+ }
282
+ }
283
+ return result;
284
+ }
285
+ function pick(obj, fields) {
286
+ const result = {};
287
+ if (obj) {
288
+ for (const key of fields) {
289
+ result[key] = obj[key];
290
+ }
291
+ }
292
+ return result;
293
+ }
294
+ export {
295
+ assignObject,
296
+ bd09ToGcj02,
297
+ checkFullscreen,
298
+ contentIsEllipsis,
299
+ copyText,
300
+ debounce,
301
+ eachTree,
302
+ exitFullscreen,
303
+ findTree,
304
+ formatNumber,
305
+ gcj02ToBd09,
306
+ getCurrentStyle,
307
+ getValue,
308
+ isExternalLink,
309
+ mapTree,
310
+ omit,
311
+ pick,
312
+ queryChild,
313
+ random,
314
+ requestFullscreen,
315
+ throttle,
316
+ toTree,
317
+ uuid
318
+ };
@@ -0,0 +1,113 @@
1
+ import { Ref } from 'vue';
2
+
3
+ /**
4
+ * useTimer 返回结果
5
+ */
6
+ export type UseTimerResult = [
7
+ (callback?: () => void, timeout?: number) => void,
8
+ () => void,
9
+ Ref<boolean>
10
+ ];
11
+ /**
12
+ * 定时器
13
+ * @param ms 等待时间
14
+ * @param cb 执行方法
15
+ */
16
+ export declare function useTimer(ms?: number | (() => number), cb?: () => void): UseTimerResult;
17
+ /**
18
+ * useMediaQuery 返回结果
19
+ */
20
+ export type UseMediaQueryResult = [MediaQueryList, () => void, () => void];
21
+ /**
22
+ * 媒体查询
23
+ * @param query 媒体查询字符串
24
+ * @param onChange 改变回调
25
+ */
26
+ export declare function useMediaQuery(query: string, onChange?: () => void): UseMediaQueryResult;
27
+ /**
28
+ * 窗口事件监听
29
+ * @param event 事件
30
+ * @param listener 回调
31
+ */
32
+ export declare function useWindowListener(event: string | EventListenerOrEventListenerObject, listener?: EventListenerOrEventListenerObject): void;
33
+ /**
34
+ * 折叠展开动画
35
+ */
36
+ export declare function useCollapseAnim(): {
37
+ handleBeforeEnter: (el: HTMLElement) => void;
38
+ handleEnter: (el: HTMLElement) => void;
39
+ handleAfterEnter: (el: HTMLElement) => void;
40
+ handleBeforeLeave: (el: HTMLElement) => void;
41
+ handleLeave: (el: HTMLElement) => void;
42
+ handleAfterLeave: (el: HTMLElement) => void;
43
+ };
44
+ /**
45
+ * 鼠标滚轮事件回调方法参数
46
+ */
47
+ export interface UseMousewheelCallbackParam {
48
+ /** 事件对象 */
49
+ e: MouseEvent;
50
+ /** 方向 */
51
+ direction: 'up' | 'down';
52
+ }
53
+ /**
54
+ * 鼠标滚轮事件
55
+ * @param cb 回调
56
+ */
57
+ export declare function useMousewheel(cb?: (p: UseMousewheelCallbackParam) => void): {
58
+ handleMousewheel: (e: MouseEvent) => void;
59
+ handleFirefoxMousewheel: (e: MouseEvent) => void;
60
+ bindMousewheel: (el: HTMLElement) => void;
61
+ unbindMousewheel: (el: HTMLElement) => void;
62
+ };
63
+ /**
64
+ * 触摸事件回调参数
65
+ */
66
+ export interface UseTouchEventCallbackParam<T> {
67
+ /** 事件对象 */
68
+ e: T;
69
+ /** 开始横向位置 */
70
+ startX: number | null;
71
+ /** 开始纵向位置 */
72
+ startY: number | null;
73
+ /** 横向移动距离 */
74
+ distanceX?: number | null;
75
+ /** 纵向移动距离 */
76
+ distanceY?: number | null;
77
+ }
78
+ /**
79
+ * 触摸事件参数
80
+ */
81
+ export interface UseTouchEventOption<T> {
82
+ /** 触摸开始的回调 */
83
+ start?: (param: UseTouchEventCallbackParam<T>) => void;
84
+ /** 触摸移动的回调 */
85
+ move?: (param: UseTouchEventCallbackParam<T>) => void;
86
+ /** 触摸结束的回调 */
87
+ end?: (param: UseTouchEventCallbackParam<T>) => void;
88
+ /** touchmove 事件参数 */
89
+ touchmoveOptions?: any;
90
+ }
91
+ /**
92
+ * 触摸事件
93
+ * @param option 参数
94
+ */
95
+ export declare function useTouchEvent(option?: UseTouchEventOption<TouchEvent>): {
96
+ handleTouchStart: (e: TouchEvent) => void;
97
+ handleTouchMove: (e: TouchEvent) => void;
98
+ handleTouchEnd: (e: TouchEvent) => void;
99
+ bindTouchEvent: (el: HTMLElement) => void;
100
+ unbindTouchEvent: (el: HTMLElement) => void;
101
+ };
102
+ /**
103
+ * 移动事件对象
104
+ */
105
+ export type MoveEvent = MouseEvent | TouchEvent;
106
+ /**
107
+ * 鼠标移动事件或触摸移动事件
108
+ * @param option 参数
109
+ */
110
+ export declare function useMoveEvent(option?: UseTouchEventOption<MoveEvent>): {
111
+ handleMousedown: (e: MouseEvent) => void;
112
+ handleTouchstart: (e: TouchEvent) => void;
113
+ };
@@ -0,0 +1,264 @@
1
+ import { ref, onBeforeUnmount } from "vue";
2
+ function useTimer(ms, cb) {
3
+ let timer = null;
4
+ const waiting = ref(false);
5
+ const stopTimer = () => {
6
+ if (timer != null) {
7
+ clearTimeout(timer);
8
+ timer = null;
9
+ }
10
+ waiting.value = false;
11
+ };
12
+ const startTimer = (callback, timeout) => {
13
+ stopTimer();
14
+ waiting.value = true;
15
+ const to = timeout ?? (typeof ms === "function" ? ms() : ms);
16
+ timer = setTimeout(() => {
17
+ const func = callback ?? cb;
18
+ func && func();
19
+ waiting.value = false;
20
+ }, to);
21
+ };
22
+ onBeforeUnmount(() => {
23
+ stopTimer();
24
+ });
25
+ return [startTimer, stopTimer, waiting];
26
+ }
27
+ function useMediaQuery(query, onChange) {
28
+ const mediaQuery = window.matchMedia(query);
29
+ const handleChange = () => {
30
+ onChange && onChange();
31
+ };
32
+ const startWatch = () => {
33
+ stopWatch();
34
+ mediaQuery.addEventListener("change", handleChange);
35
+ };
36
+ const stopWatch = () => {
37
+ mediaQuery.removeEventListener("change", handleChange);
38
+ handleChange();
39
+ };
40
+ onBeforeUnmount(() => {
41
+ stopWatch();
42
+ });
43
+ return [mediaQuery, startWatch, stopWatch];
44
+ }
45
+ function useWindowListener(event, listener) {
46
+ const eventName = typeof event === "string" ? event : "resize";
47
+ const callback = typeof event === "function" ? event : listener;
48
+ if (callback != null) {
49
+ window.addEventListener(eventName, callback);
50
+ }
51
+ onBeforeUnmount(() => {
52
+ if (callback != null) {
53
+ window.removeEventListener(eventName, callback);
54
+ }
55
+ });
56
+ }
57
+ function useCollapseAnim() {
58
+ let enterHeight = 0;
59
+ const getHeight = (el, isEnter) => {
60
+ if (!isEnter) {
61
+ return Math.max(el.offsetHeight, el.scrollHeight);
62
+ }
63
+ return Math.max(el.offsetHeight, el.scrollHeight, enterHeight);
64
+ };
65
+ const handleBeforeEnter = (el) => {
66
+ el.dataset.oldPaddingTop = el.style.paddingTop;
67
+ el.dataset.oldPaddingBottom = el.style.paddingBottom;
68
+ el.style.maxHeight = "0px";
69
+ el.style.paddingTop = "0px";
70
+ el.style.paddingBottom = "0px";
71
+ };
72
+ const handleEnter = (el) => {
73
+ el.dataset.oldOverflow = el.style.overflow;
74
+ el.style.maxHeight = `${getHeight(el, true)}px`;
75
+ el.style.paddingTop = el.dataset.oldPaddingTop ?? "";
76
+ el.style.paddingBottom = el.dataset.oldPaddingBottom ?? "";
77
+ el.style.overflow = "hidden";
78
+ };
79
+ const handleAfterEnter = (el) => {
80
+ el.style.maxHeight = "";
81
+ el.style.overflow = el.dataset.oldOverflow ?? "";
82
+ };
83
+ const handleBeforeLeave = (el) => {
84
+ el.dataset.oldPaddingTop = el.style.paddingTop;
85
+ el.dataset.oldPaddingBottom = el.style.paddingBottom;
86
+ el.dataset.oldOverflow = el.style.overflow;
87
+ enterHeight = getHeight(el);
88
+ el.style.maxHeight = `${enterHeight}px`;
89
+ el.style.overflow = "hidden";
90
+ };
91
+ const handleLeave = (el) => {
92
+ el.style.maxHeight = "0px";
93
+ el.style.paddingTop = "0px";
94
+ el.style.paddingBottom = "0px";
95
+ };
96
+ const handleAfterLeave = (el) => {
97
+ el.style.maxHeight = "";
98
+ el.style.overflow = el.dataset.oldOverflow ?? "";
99
+ el.style.paddingTop = el.dataset.oldPaddingTop ?? "";
100
+ el.style.paddingBottom = el.dataset.oldPaddingBottom ?? "";
101
+ };
102
+ return {
103
+ handleBeforeEnter,
104
+ handleEnter,
105
+ handleAfterEnter,
106
+ handleBeforeLeave,
107
+ handleLeave,
108
+ handleAfterLeave
109
+ };
110
+ }
111
+ function useMousewheel(cb) {
112
+ const handleMousewheel = (e) => {
113
+ const delta = e.wheelDelta || e.detail;
114
+ cb && cb({ e, direction: delta > 0 ? "up" : "down" });
115
+ };
116
+ const handleFirefoxMousewheel = (e) => {
117
+ const delta = e.wheelDelta || e.detail;
118
+ cb && cb({ e, direction: delta < 0 ? "up" : "down" });
119
+ };
120
+ const bindMousewheel = (el) => {
121
+ el.addEventListener("mousewheel", handleMousewheel, { passive: false });
122
+ el.addEventListener("DOMMouseScroll", handleFirefoxMousewheel);
123
+ };
124
+ const unbindMousewheel = (el) => {
125
+ el.removeEventListener("mousewheel", handleMousewheel);
126
+ el.removeEventListener("DOMMouseScroll", handleFirefoxMousewheel);
127
+ };
128
+ return {
129
+ handleMousewheel,
130
+ handleFirefoxMousewheel,
131
+ bindMousewheel,
132
+ unbindMousewheel
133
+ };
134
+ }
135
+ function useTouchEvent(option) {
136
+ let startX = null;
137
+ let startY = null;
138
+ let distanceX = null;
139
+ let distanceY = null;
140
+ const handleTouchStart = (e) => {
141
+ startX = e.touches[0].clientX;
142
+ startY = e.touches[0].clientY;
143
+ if (option && option.start) {
144
+ option.start({ e, startX, startY });
145
+ }
146
+ };
147
+ const handleTouchMove = (e) => {
148
+ if (startX != null && startY != null) {
149
+ const currentX = e.touches[0].clientX;
150
+ const currentY = e.touches[0].clientY;
151
+ distanceX = currentX - startX;
152
+ distanceY = currentY - startY;
153
+ if (option && option.move) {
154
+ option.move({ e, startX, startY, distanceX, distanceY });
155
+ }
156
+ }
157
+ };
158
+ const handleTouchEnd = (e) => {
159
+ if (option && option.end) {
160
+ option.end({ e, startX, startY, distanceX, distanceY });
161
+ }
162
+ startX = null;
163
+ startY = null;
164
+ distanceX = null;
165
+ distanceY = null;
166
+ };
167
+ const bindTouchEvent = (el) => {
168
+ el.addEventListener("touchstart", handleTouchStart);
169
+ el.addEventListener("touchmove", handleTouchMove);
170
+ el.addEventListener("touchend", handleTouchEnd);
171
+ };
172
+ const unbindTouchEvent = (el) => {
173
+ el.removeEventListener("touchstart", handleTouchStart);
174
+ el.removeEventListener("touchmove", handleTouchMove);
175
+ el.removeEventListener("touchend", handleTouchEnd);
176
+ };
177
+ return {
178
+ handleTouchStart,
179
+ handleTouchMove,
180
+ handleTouchEnd,
181
+ bindTouchEvent,
182
+ unbindTouchEvent
183
+ };
184
+ }
185
+ function useMoveEvent(option) {
186
+ let startX = null;
187
+ let startY = null;
188
+ let distanceX = null;
189
+ let distanceY = null;
190
+ const unbindEvent = () => {
191
+ document.removeEventListener("mousemove", mousemoveFn);
192
+ document.removeEventListener("mouseup", mouseupFn);
193
+ document.removeEventListener("touchmove", touchmoveFn);
194
+ document.removeEventListener("touchend", touchendFn);
195
+ };
196
+ const emitStart = (clientX, clientY, e) => {
197
+ startX = clientX;
198
+ startY = clientY;
199
+ if (option && option.start) {
200
+ option.start({ e, startX, startY });
201
+ }
202
+ };
203
+ const emitMove = (currentX, currentY, e) => {
204
+ if (startX != null && startY != null) {
205
+ distanceX = currentX - startX;
206
+ distanceY = currentY - startY;
207
+ if (option && option.move) {
208
+ option.move({ e, startX, startY, distanceX, distanceY });
209
+ }
210
+ }
211
+ };
212
+ const emitEnd = (e) => {
213
+ unbindEvent();
214
+ if (option && option.end) {
215
+ option.end({ e, startX, startY, distanceX, distanceY });
216
+ }
217
+ startX = null;
218
+ startY = null;
219
+ distanceX = null;
220
+ distanceY = null;
221
+ };
222
+ const mousemoveFn = function(e) {
223
+ emitMove(e.clientX, e.clientY, e);
224
+ };
225
+ const touchmoveFn = function(e) {
226
+ emitMove(e.touches[0].clientX, e.touches[0].clientY, e);
227
+ };
228
+ const mouseupFn = (e) => {
229
+ emitEnd(e);
230
+ };
231
+ const touchendFn = (e) => {
232
+ emitEnd(e);
233
+ };
234
+ const handleMousedown = (e) => {
235
+ emitStart(e.clientX, e.clientY, e);
236
+ document.addEventListener("mousemove", mousemoveFn);
237
+ document.addEventListener("mouseup", mouseupFn);
238
+ };
239
+ const handleTouchstart = (e) => {
240
+ emitStart(e.touches[0].clientX, e.touches[0].clientY, e);
241
+ document.addEventListener(
242
+ "touchmove",
243
+ touchmoveFn,
244
+ option == null ? void 0 : option.touchmoveOptions
245
+ );
246
+ document.addEventListener("touchend", touchendFn);
247
+ };
248
+ onBeforeUnmount(() => {
249
+ unbindEvent();
250
+ });
251
+ return {
252
+ handleMousedown,
253
+ handleTouchstart
254
+ };
255
+ }
256
+ export {
257
+ useCollapseAnim,
258
+ useMediaQuery,
259
+ useMousewheel,
260
+ useMoveEvent,
261
+ useTimer,
262
+ useTouchEvent,
263
+ useWindowListener
264
+ };
@@ -0,0 +1,14 @@
1
+ import { RouteRecordRaw, _RouteRecordBase, RouteComponent } from 'vue-router';
2
+ import { MenuItem } from '../ele-pro-layout/types';
3
+
4
+ /**
5
+ * 获取路由组件方法
6
+ */
7
+ export type GetComponent = (component?: string, menu?: MenuItem, name?: string) => (() => Promise<RouteComponent>) | RouteComponent | undefined;
8
+ /**
9
+ * 菜单数据转为路由数据
10
+ * @param menus 菜单数据
11
+ * @param getComponent 加载组件的方法
12
+ * @param added 已添加的路由
13
+ */
14
+ export declare function menuToRoutes(menus: MenuItem[] | undefined, getComponent: GetComponent, added?: _RouteRecordBase[]): RouteRecordRaw[] | undefined;