vue-devui 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (425) hide show
  1. package/README.md +161 -172
  2. package/alert/index.d.ts +7 -0
  3. package/alert/index.es.js +204 -1
  4. package/alert/index.umd.js +1 -1
  5. package/alert/style.css +1 -1
  6. package/auto-complete/index.d.ts +7 -0
  7. package/auto-complete/index.es.js +9051 -0
  8. package/auto-complete/index.umd.js +40 -0
  9. package/auto-complete/package.json +7 -0
  10. package/auto-complete/style.css +1 -0
  11. package/avatar/index.d.ts +7 -0
  12. package/avatar/index.es.js +308 -1
  13. package/avatar/index.umd.js +1 -1
  14. package/avatar/style.css +1 -1
  15. package/badge/index.d.ts +7 -0
  16. package/badge/index.es.js +120 -1
  17. package/badge/index.umd.js +1 -1
  18. package/badge/style.css +1 -1
  19. package/button/index.d.ts +7 -0
  20. package/button/index.es.js +5964 -1
  21. package/button/index.umd.js +27 -1
  22. package/button/style.css +1 -1
  23. package/card/index.d.ts +7 -0
  24. package/card/index.es.js +89 -1
  25. package/card/index.umd.js +1 -1
  26. package/card/style.css +1 -1
  27. package/checkbox/index.d.ts +7 -0
  28. package/checkbox/index.es.js +8207 -1
  29. package/checkbox/index.umd.js +38 -1
  30. package/checkbox/style.css +1 -1
  31. package/collapse/index.d.ts +7 -0
  32. package/collapse/index.es.js +195 -0
  33. package/collapse/index.umd.js +1 -0
  34. package/{carousel → collapse}/package.json +1 -1
  35. package/collapse/style.css +1 -0
  36. package/countdown/index.d.ts +7 -0
  37. package/countdown/index.es.js +217 -0
  38. package/countdown/index.umd.js +1 -0
  39. package/{accordion → countdown}/package.json +1 -1
  40. package/countdown/style.css +1 -0
  41. package/date-picker-pro/index.d.ts +7 -0
  42. package/date-picker-pro/index.es.js +12031 -0
  43. package/date-picker-pro/index.umd.js +38 -0
  44. package/date-picker-pro/package.json +7 -0
  45. package/date-picker-pro/style.css +1 -0
  46. package/drawer/index.d.ts +7 -0
  47. package/drawer/index.es.js +248 -0
  48. package/drawer/index.umd.js +1 -0
  49. package/{anchor → drawer}/package.json +1 -1
  50. package/drawer/style.css +1 -0
  51. package/dropdown/index.d.ts +7 -0
  52. package/dropdown/index.es.js +743 -0
  53. package/dropdown/index.umd.js +1 -0
  54. package/dropdown/package.json +7 -0
  55. package/dropdown/style.css +1 -0
  56. package/editable-select/index.d.ts +7 -0
  57. package/editable-select/index.es.js +991 -1
  58. package/editable-select/index.umd.js +1 -1
  59. package/editable-select/style.css +1 -1
  60. package/form/index.d.ts +7 -0
  61. package/form/index.es.js +7751 -0
  62. package/form/index.umd.js +38 -0
  63. package/{toast → form}/package.json +1 -1
  64. package/form/style.css +1 -0
  65. package/fullscreen/index.d.ts +7 -0
  66. package/fullscreen/index.es.js +166 -0
  67. package/fullscreen/index.umd.js +1 -0
  68. package/fullscreen/package.json +7 -0
  69. package/fullscreen/style.css +1 -0
  70. package/grid/index.d.ts +7 -0
  71. package/grid/index.es.js +271 -0
  72. package/grid/index.umd.js +1 -0
  73. package/{sticky → grid}/package.json +1 -1
  74. package/grid/style.css +1 -0
  75. package/icon/index.d.ts +7 -0
  76. package/icon/index.es.js +218 -1
  77. package/icon/index.umd.js +1 -1
  78. package/icon/style.css +1 -0
  79. package/image-preview/index.d.ts +7 -0
  80. package/image-preview/index.es.js +511 -1
  81. package/image-preview/index.umd.js +1 -1
  82. package/image-preview/style.css +1 -1
  83. package/index.d.ts +7 -0
  84. package/input/index.d.ts +7 -0
  85. package/input/index.es.js +8311 -1
  86. package/input/index.umd.js +38 -1
  87. package/input/style.css +1 -1
  88. package/input-number/index.d.ts +7 -0
  89. package/input-number/index.es.js +308 -1
  90. package/input-number/index.umd.js +1 -1
  91. package/input-number/style.css +1 -1
  92. package/layout/index.d.ts +7 -0
  93. package/layout/index.es.js +115 -0
  94. package/layout/index.umd.js +1 -0
  95. package/layout/package.json +7 -0
  96. package/layout/style.css +1 -0
  97. package/loading/index.d.ts +7 -0
  98. package/loading/index.es.js +272 -1
  99. package/loading/index.umd.js +1 -1
  100. package/loading/style.css +1 -1
  101. package/message/index.d.ts +7 -0
  102. package/message/index.es.js +534 -0
  103. package/message/index.umd.js +1 -0
  104. package/message/package.json +7 -0
  105. package/message/style.css +1 -0
  106. package/modal/index.d.ts +7 -0
  107. package/modal/index.es.js +741 -0
  108. package/modal/index.umd.js +1 -0
  109. package/modal/package.json +7 -0
  110. package/modal/style.css +1 -0
  111. package/notification/index.d.ts +7 -0
  112. package/notification/index.es.js +528 -0
  113. package/notification/index.umd.js +1 -0
  114. package/notification/package.json +7 -0
  115. package/notification/style.css +1 -0
  116. package/nuxt/components/Alert.js +3 -0
  117. package/nuxt/components/Aside.js +3 -0
  118. package/nuxt/components/AutoComplete.js +3 -0
  119. package/nuxt/components/Avatar.js +3 -0
  120. package/nuxt/components/Badge.js +3 -0
  121. package/nuxt/components/Button.js +3 -0
  122. package/nuxt/components/ButtonGroup.js +3 -0
  123. package/nuxt/components/Card.js +3 -0
  124. package/nuxt/components/Checkbox.js +3 -0
  125. package/nuxt/components/CheckboxButton.js +3 -0
  126. package/nuxt/components/CheckboxGroup.js +3 -0
  127. package/nuxt/components/Col.js +3 -0
  128. package/nuxt/components/Collapse.js +3 -0
  129. package/nuxt/components/CollapseItem.js +3 -0
  130. package/nuxt/components/Column.js +3 -0
  131. package/nuxt/components/Content.js +3 -0
  132. package/nuxt/components/Countdown.js +3 -0
  133. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  134. package/nuxt/components/DatePickerPro.js +3 -0
  135. package/nuxt/components/Drawer.js +3 -0
  136. package/nuxt/components/DrawerService.js +3 -0
  137. package/nuxt/components/Dropdown.js +3 -0
  138. package/nuxt/components/DropdownMenu.js +3 -0
  139. package/nuxt/components/DropdownPropsKey.js +3 -0
  140. package/nuxt/components/EditableSelect.js +3 -0
  141. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  142. package/nuxt/components/FORM_TOKEN.js +3 -0
  143. package/nuxt/components/FixedOverlay.js +3 -0
  144. package/nuxt/components/FlexibleOverlay.js +3 -0
  145. package/nuxt/components/Footer.js +3 -0
  146. package/nuxt/components/Form.js +3 -0
  147. package/nuxt/components/FormItem.js +3 -0
  148. package/nuxt/components/FormOperation.js +3 -0
  149. package/nuxt/components/Fullscreen.js +3 -0
  150. package/nuxt/components/Header.js +3 -0
  151. package/nuxt/components/IFileOptions.js +3 -0
  152. package/nuxt/components/IUploadOptions.js +3 -0
  153. package/nuxt/components/Icon.js +3 -0
  154. package/nuxt/components/IconGroup.js +3 -0
  155. package/nuxt/components/ImagePreviewService.js +3 -0
  156. package/nuxt/components/Input.js +3 -0
  157. package/nuxt/components/InputNumber.js +3 -0
  158. package/nuxt/components/LABEL_DATA.js +3 -0
  159. package/nuxt/components/Layout.js +3 -0
  160. package/nuxt/components/Loading.js +3 -0
  161. package/nuxt/components/LoadingOptions.js +3 -0
  162. package/nuxt/components/LoadingService.js +3 -0
  163. package/nuxt/components/Message.js +3 -0
  164. package/nuxt/components/Modal.js +3 -0
  165. package/nuxt/components/Notification.js +3 -0
  166. package/nuxt/components/NotificationService.js +3 -0
  167. package/nuxt/components/Option.js +3 -0
  168. package/nuxt/components/OptionGroup.js +3 -0
  169. package/nuxt/components/Pagination.js +3 -0
  170. package/nuxt/components/Panel.js +3 -0
  171. package/nuxt/components/PanelBody.js +3 -0
  172. package/nuxt/components/PanelFooter.js +3 -0
  173. package/nuxt/components/PanelHeader.js +3 -0
  174. package/nuxt/components/Popover.js +3 -0
  175. package/nuxt/components/Progress.js +3 -0
  176. package/nuxt/components/Radio.js +3 -0
  177. package/nuxt/components/RadioButton.js +3 -0
  178. package/nuxt/components/RadioGroup.js +3 -0
  179. package/nuxt/components/Rate.js +3 -0
  180. package/nuxt/components/Result.js +3 -0
  181. package/nuxt/components/Row.js +3 -0
  182. package/nuxt/components/Search.js +3 -0
  183. package/nuxt/components/Select.js +3 -0
  184. package/nuxt/components/Skeleton.js +3 -0
  185. package/nuxt/components/SkeletonItem.js +3 -0
  186. package/nuxt/components/Slider.js +3 -0
  187. package/nuxt/components/Splitter.js +3 -0
  188. package/nuxt/components/Statistic.js +3 -0
  189. package/nuxt/components/Status.js +3 -0
  190. package/nuxt/components/Step.js +3 -0
  191. package/nuxt/components/Steps.js +3 -0
  192. package/nuxt/components/Switch.js +3 -0
  193. package/nuxt/components/TABLE_TOKEN.js +3 -0
  194. package/nuxt/components/Tab.js +3 -0
  195. package/nuxt/components/Table.js +3 -0
  196. package/nuxt/components/Tabs.js +3 -0
  197. package/nuxt/components/Tag.js +3 -0
  198. package/nuxt/components/Textarea.js +3 -0
  199. package/nuxt/components/TimePicker.js +3 -0
  200. package/nuxt/components/TimeSelect.js +3 -0
  201. package/nuxt/components/Timeline.js +3 -0
  202. package/nuxt/components/TimelineItem.js +3 -0
  203. package/nuxt/components/Tooltip.js +3 -0
  204. package/nuxt/components/Tree.js +3 -0
  205. package/nuxt/components/Upload.js +3 -0
  206. package/nuxt/components/UploadStatus.js +3 -0
  207. package/nuxt/components/alertProps.js +3 -0
  208. package/nuxt/components/animationInjectionKey.js +3 -0
  209. package/nuxt/components/autoCompleteProps.js +3 -0
  210. package/nuxt/components/avatarProps.js +3 -0
  211. package/nuxt/components/badgeProps.js +3 -0
  212. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  213. package/nuxt/components/buttonGroupProps.js +3 -0
  214. package/nuxt/components/buttonProps.js +3 -0
  215. package/nuxt/components/cardProps.js +3 -0
  216. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  217. package/nuxt/components/checkboxGroupProps.js +3 -0
  218. package/nuxt/components/checkboxProps.js +3 -0
  219. package/nuxt/components/colProps.js +3 -0
  220. package/nuxt/components/colPropsBaseClass.js +3 -0
  221. package/nuxt/components/colPropsBaseStyle.js +3 -0
  222. package/nuxt/components/collapseItemProps.js +3 -0
  223. package/nuxt/components/collapseProps.js +3 -0
  224. package/nuxt/components/countdownProps.js +3 -0
  225. package/nuxt/components/datePickerProCommonProps.js +3 -0
  226. package/nuxt/components/datePickerProPanelProps.js +3 -0
  227. package/nuxt/components/datePickerProProps.js +3 -0
  228. package/nuxt/components/dropdownMenuProps.js +3 -0
  229. package/nuxt/components/editableSelectProps.js +3 -0
  230. package/nuxt/components/fixedOverlayProps.js +3 -0
  231. package/nuxt/components/flexibleOverlayProps.js +3 -0
  232. package/nuxt/components/formItemProps.js +3 -0
  233. package/nuxt/components/formProps.js +3 -0
  234. package/nuxt/components/fullscreenProps.js +3 -0
  235. package/nuxt/components/iconProps.js +3 -0
  236. package/nuxt/components/imagePreviewProps.js +3 -0
  237. package/nuxt/components/inputProps.js +3 -0
  238. package/nuxt/components/loadingProps.js +3 -0
  239. package/nuxt/components/messageProps.js +3 -0
  240. package/nuxt/components/modalProps.js +3 -0
  241. package/nuxt/components/notificationProps.js +3 -0
  242. package/nuxt/components/paginationProps.js +3 -0
  243. package/nuxt/components/panelProps.js +3 -0
  244. package/nuxt/components/popoverProps.js +3 -0
  245. package/nuxt/components/progressProps.js +3 -0
  246. package/nuxt/components/rateProps.js +3 -0
  247. package/nuxt/components/resultProps.js +3 -0
  248. package/nuxt/components/roundInjectionKey.js +3 -0
  249. package/nuxt/components/rowProps.js +3 -0
  250. package/nuxt/components/screenSizes.js +3 -0
  251. package/nuxt/components/searchProps.js +3 -0
  252. package/nuxt/components/skeletonItemProps.js +3 -0
  253. package/nuxt/components/skeletonProps.js +3 -0
  254. package/nuxt/components/sliderProps.js +3 -0
  255. package/nuxt/components/splitterProps.js +3 -0
  256. package/nuxt/components/statisticProps.js +3 -0
  257. package/nuxt/components/stepProps.js +3 -0
  258. package/nuxt/components/stepsProps.js +3 -0
  259. package/nuxt/components/svgIconProps.js +3 -0
  260. package/nuxt/components/switchProps.js +3 -0
  261. package/nuxt/components/tableProps.js +3 -0
  262. package/nuxt/components/tabsProps.js +3 -0
  263. package/nuxt/components/tagProps.js +3 -0
  264. package/nuxt/components/textareaProps.js +3 -0
  265. package/nuxt/components/timeAxisProps.js +3 -0
  266. package/nuxt/components/timerPickerPanelProps.js +3 -0
  267. package/nuxt/components/tooltipProps.js +3 -0
  268. package/nuxt/components/treeProps.js +3 -0
  269. package/nuxt/components/uploadProps.js +3 -0
  270. package/nuxt/index.js +13 -0
  271. package/overlay/index.d.ts +7 -0
  272. package/overlay/index.es.js +293 -1
  273. package/overlay/index.umd.js +1 -1
  274. package/overlay/style.css +1 -1
  275. package/package.json +17 -82
  276. package/pagination/index.d.ts +7 -0
  277. package/pagination/index.es.js +820 -1
  278. package/pagination/index.umd.js +1 -1
  279. package/pagination/style.css +1 -1
  280. package/panel/index.d.ts +7 -0
  281. package/panel/index.es.js +218 -1
  282. package/panel/index.umd.js +1 -1
  283. package/panel/style.css +1 -1
  284. package/popover/index.d.ts +7 -0
  285. package/popover/index.es.js +6062 -1
  286. package/popover/index.umd.js +27 -1
  287. package/popover/style.css +1 -1
  288. package/progress/index.d.ts +7 -0
  289. package/progress/index.es.js +207 -1
  290. package/progress/index.umd.js +3 -1
  291. package/progress/style.css +1 -1
  292. package/radio/index.d.ts +7 -0
  293. package/radio/index.es.js +8056 -1
  294. package/radio/index.umd.js +38 -1
  295. package/radio/style.css +1 -1
  296. package/rate/index.d.ts +7 -0
  297. package/rate/index.es.js +242 -1
  298. package/rate/index.umd.js +1 -1
  299. package/rate/style.css +1 -1
  300. package/result/index.d.ts +7 -0
  301. package/result/index.es.js +248 -0
  302. package/result/index.umd.js +1 -0
  303. package/result/package.json +7 -0
  304. package/result/style.css +1 -0
  305. package/ripple/index.d.ts +7 -0
  306. package/ripple/index.es.js +173 -1
  307. package/ripple/index.umd.js +1 -1
  308. package/search/index.d.ts +7 -0
  309. package/search/index.es.js +8504 -2
  310. package/search/index.umd.js +38 -10
  311. package/search/style.css +1 -1
  312. package/select/index.d.ts +7 -0
  313. package/select/index.es.js +9423 -1
  314. package/select/index.umd.js +38 -1
  315. package/select/style.css +1 -1
  316. package/skeleton/index.d.ts +7 -0
  317. package/skeleton/index.es.js +145 -0
  318. package/skeleton/index.umd.js +1 -0
  319. package/skeleton/package.json +7 -0
  320. package/skeleton/style.css +1 -0
  321. package/slider/index.d.ts +7 -0
  322. package/slider/index.es.js +203 -1
  323. package/slider/index.umd.js +1 -1
  324. package/slider/style.css +1 -1
  325. package/splitter/index.d.ts +7 -0
  326. package/splitter/index.es.js +6754 -1
  327. package/splitter/index.umd.js +27 -1
  328. package/splitter/style.css +1 -1
  329. package/statistic/index.d.ts +7 -0
  330. package/statistic/index.es.js +253 -0
  331. package/statistic/index.umd.js +1 -0
  332. package/statistic/package.json +7 -0
  333. package/statistic/style.css +1 -0
  334. package/status/index.d.ts +7 -0
  335. package/status/index.es.js +63 -1
  336. package/status/index.umd.js +1 -1
  337. package/status/style.css +1 -1
  338. package/steps/index.d.ts +7 -0
  339. package/steps/index.es.js +386 -0
  340. package/steps/index.umd.js +1 -0
  341. package/steps/package.json +7 -0
  342. package/steps/style.css +1 -0
  343. package/style.css +1 -1
  344. package/switch/index.d.ts +7 -0
  345. package/switch/index.es.js +7852 -1
  346. package/switch/index.umd.js +38 -1
  347. package/switch/style.css +1 -1
  348. package/table/index.d.ts +7 -0
  349. package/table/index.es.js +11527 -0
  350. package/table/index.umd.js +38 -0
  351. package/table/package.json +7 -0
  352. package/table/style.css +1 -0
  353. package/tabs/index.d.ts +7 -0
  354. package/tabs/index.es.js +407 -1
  355. package/tabs/index.umd.js +1 -1
  356. package/tabs/style.css +1 -1
  357. package/tag/index.d.ts +7 -0
  358. package/tag/index.es.js +156 -0
  359. package/tag/index.umd.js +1 -0
  360. package/tag/package.json +7 -0
  361. package/tag/style.css +1 -0
  362. package/textarea/index.d.ts +7 -0
  363. package/textarea/index.es.js +7986 -0
  364. package/textarea/index.umd.js +46 -0
  365. package/textarea/package.json +7 -0
  366. package/textarea/style.css +1 -0
  367. package/{theme → theme/theme.scss} +0 -0
  368. package/time-picker/index.d.ts +7 -0
  369. package/time-picker/index.es.js +9556 -0
  370. package/time-picker/index.umd.js +38 -0
  371. package/{date-picker → time-picker}/package.json +1 -1
  372. package/time-picker/style.css +1 -0
  373. package/time-select/index.d.ts +7 -0
  374. package/time-select/index.es.js +9604 -0
  375. package/time-select/index.umd.js +38 -0
  376. package/time-select/package.json +7 -0
  377. package/time-select/style.css +1 -0
  378. package/timeline/index.d.ts +7 -0
  379. package/timeline/index.es.js +427 -0
  380. package/timeline/index.umd.js +1 -0
  381. package/timeline/package.json +7 -0
  382. package/timeline/style.css +1 -0
  383. package/tooltip/index.d.ts +7 -0
  384. package/tooltip/index.es.js +5900 -1
  385. package/tooltip/index.umd.js +27 -1
  386. package/tooltip/style.css +1 -1
  387. package/tree/index.d.ts +7 -0
  388. package/tree/index.es.js +10336 -1
  389. package/tree/index.umd.js +38 -1
  390. package/tree/style.css +1 -1
  391. package/upload/index.d.ts +7 -0
  392. package/upload/index.es.js +1398 -1
  393. package/upload/index.umd.js +1 -1
  394. package/upload/style.css +1 -1
  395. package/vue-devui.es.js +27443 -2
  396. package/vue-devui.umd.js +50 -10
  397. package/accordion/index.es.js +0 -1
  398. package/accordion/index.umd.js +0 -1
  399. package/accordion/style.css +0 -1
  400. package/anchor/index.es.js +0 -1
  401. package/anchor/index.umd.js +0 -1
  402. package/anchor/style.css +0 -1
  403. package/carousel/index.es.js +0 -1
  404. package/carousel/index.umd.js +0 -1
  405. package/carousel/style.css +0 -1
  406. package/date-picker/index.es.js +0 -1
  407. package/date-picker/index.umd.js +0 -1
  408. package/date-picker/style.css +0 -1
  409. package/quadrant-diagram/index.es.js +0 -10
  410. package/quadrant-diagram/index.umd.js +0 -10
  411. package/quadrant-diagram/package.json +0 -7
  412. package/quadrant-diagram/style.css +0 -1
  413. package/sticky/index.es.js +0 -1
  414. package/sticky/index.umd.js +0 -1
  415. package/tag-input/index.es.js +0 -1
  416. package/tag-input/index.umd.js +0 -1
  417. package/tag-input/package.json +0 -7
  418. package/tag-input/style.css +0 -1
  419. package/toast/index.es.js +0 -1
  420. package/toast/index.umd.js +0 -1
  421. package/toast/style.css +0 -1
  422. package/transfer/index.es.js +0 -10
  423. package/transfer/index.umd.js +0 -10
  424. package/transfer/package.json +0 -7
  425. package/transfer/style.css +0 -1
@@ -0,0 +1,534 @@
1
+ import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, watch, Transition, shallowReactive, createApp, onUnmounted, isVNode, reactive } from "vue";
2
+ const isString = (val) => typeof val === "string";
3
+ const DEFAULT_PREFIX = "icon";
4
+ const iconProps = {
5
+ name: {
6
+ type: String,
7
+ default: "",
8
+ required: true
9
+ },
10
+ size: {
11
+ type: [Number, String],
12
+ default: "inherit"
13
+ },
14
+ color: {
15
+ type: String,
16
+ default: "inherit"
17
+ },
18
+ component: {
19
+ type: Object,
20
+ default: null
21
+ },
22
+ classPrefix: {
23
+ type: String,
24
+ default: DEFAULT_PREFIX
25
+ },
26
+ operable: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ disabled: {
31
+ type: Boolean,
32
+ default: false
33
+ },
34
+ rotate: {
35
+ type: [Number, String]
36
+ }
37
+ };
38
+ const svgIconProps = {
39
+ name: {
40
+ type: String,
41
+ default: "",
42
+ required: true
43
+ },
44
+ color: {
45
+ type: String,
46
+ default: "inherit"
47
+ },
48
+ size: {
49
+ type: [Number, String],
50
+ default: "inherit"
51
+ }
52
+ };
53
+ function createBem(namespace, element, modifier) {
54
+ let cls = namespace;
55
+ if (element) {
56
+ cls += `__${element}`;
57
+ }
58
+ if (modifier) {
59
+ cls += `--${modifier}`;
60
+ }
61
+ return cls;
62
+ }
63
+ function useNamespace(block, needDot = false) {
64
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
65
+ const b = () => createBem(namespace);
66
+ const e = (element) => element ? createBem(namespace, element) : "";
67
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
68
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
69
+ return {
70
+ b,
71
+ e,
72
+ m,
73
+ em
74
+ };
75
+ }
76
+ var icon = "";
77
+ var svgIcon = defineComponent({
78
+ name: "DSvgIcon",
79
+ props: svgIconProps,
80
+ setup(props) {
81
+ const {
82
+ name,
83
+ color,
84
+ size
85
+ } = toRefs(props);
86
+ const ns2 = useNamespace("svg-icon");
87
+ const iconName = computed(() => `#icon-${name.value}`);
88
+ const iconSize = computed(() => {
89
+ return typeof size.value === "number" ? `${size.value}px` : size.value;
90
+ });
91
+ const styles = {
92
+ width: iconSize.value,
93
+ height: iconSize.value
94
+ };
95
+ return () => {
96
+ return createVNode("svg", {
97
+ "class": ns2.b(),
98
+ "style": styles
99
+ }, [createVNode("use", {
100
+ "xlink:href": iconName.value,
101
+ "fill": color.value
102
+ }, null)]);
103
+ };
104
+ }
105
+ });
106
+ function isUrl(value) {
107
+ return /^((http|https):)?\/\//.test(value);
108
+ }
109
+ function useIconDom(props, ctx) {
110
+ const {
111
+ component,
112
+ name,
113
+ size,
114
+ color,
115
+ classPrefix,
116
+ rotate
117
+ } = toRefs(props);
118
+ const ns2 = useNamespace("icon");
119
+ const iconSize = computed(() => {
120
+ return typeof size.value === "number" ? `${size.value}px` : size.value;
121
+ });
122
+ const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
123
+ const imgIconDom = () => {
124
+ return createVNode("img", mergeProps({
125
+ "src": name.value,
126
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
127
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
128
+ "style": {
129
+ width: iconSize.value || "",
130
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
131
+ verticalAlign: "middle"
132
+ }
133
+ }, ctx.attrs), null);
134
+ };
135
+ const svgIconDom = () => {
136
+ return createVNode(IconComponent, mergeProps({
137
+ "name": name.value,
138
+ "color": color.value,
139
+ "size": iconSize.value,
140
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
141
+ "style": {
142
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
143
+ }
144
+ }, ctx.attrs), null);
145
+ };
146
+ const fontIconDom = () => {
147
+ const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
148
+ return createVNode("i", mergeProps({
149
+ "class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
150
+ "style": {
151
+ fontSize: iconSize.value,
152
+ color: color.value,
153
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
154
+ }
155
+ }, ctx.attrs), null);
156
+ };
157
+ const iconDom = () => {
158
+ return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
159
+ };
160
+ return {
161
+ iconDom
162
+ };
163
+ }
164
+ var Icon = defineComponent({
165
+ name: "DIcon",
166
+ props: iconProps,
167
+ emits: ["click"],
168
+ setup(props, ctx) {
169
+ const {
170
+ disabled,
171
+ operable
172
+ } = toRefs(props);
173
+ const {
174
+ iconDom
175
+ } = useIconDom(props, ctx);
176
+ const ns2 = useNamespace("icon");
177
+ const wrapClassed = computed(() => ({
178
+ [ns2.e("container")]: true,
179
+ [ns2.m("disabled")]: disabled.value,
180
+ [ns2.m("operable")]: operable.value
181
+ }));
182
+ const onClick = (e) => {
183
+ if (disabled.value) {
184
+ return;
185
+ }
186
+ ctx.emit("click", e);
187
+ };
188
+ return () => {
189
+ var _a, _b, _c, _d;
190
+ return createVNode("div", {
191
+ "class": wrapClassed.value,
192
+ "onClick": onClick
193
+ }, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
194
+ };
195
+ }
196
+ });
197
+ var iconGroup = "";
198
+ defineComponent({
199
+ name: "DIconGroup",
200
+ setup(_, ctx) {
201
+ const ns2 = useNamespace("icon-group");
202
+ return () => {
203
+ var _a, _b;
204
+ return createVNode("div", {
205
+ "class": ns2.b()
206
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
207
+ };
208
+ }
209
+ });
210
+ var Close = defineComponent({
211
+ emits: ["click"],
212
+ setup(props, {
213
+ emit
214
+ }) {
215
+ const ns2 = useNamespace("message");
216
+ return () => createVNode("div", {
217
+ "class": ns2.e("icon-close"),
218
+ "onClick": (e) => emit("click", e)
219
+ }, [createVNode(Icon, {
220
+ "name": "close",
221
+ "size": "14px"
222
+ }, null)]);
223
+ }
224
+ });
225
+ const messageProps = {
226
+ id: {
227
+ type: String,
228
+ default: ""
229
+ },
230
+ visible: {
231
+ type: Boolean,
232
+ default: false
233
+ },
234
+ message: {
235
+ type: String,
236
+ default: ""
237
+ },
238
+ type: {
239
+ type: String,
240
+ default: "normal"
241
+ },
242
+ bordered: {
243
+ type: Boolean,
244
+ default: true
245
+ },
246
+ shadow: {
247
+ type: Boolean,
248
+ default: true
249
+ },
250
+ duration: {
251
+ type: Number,
252
+ default: 3e3
253
+ },
254
+ showClose: {
255
+ type: Boolean,
256
+ default: false
257
+ },
258
+ onClose: {
259
+ type: Function
260
+ }
261
+ };
262
+ const ns = useNamespace("message");
263
+ function SuccessIcon() {
264
+ return createVNode("svg", {
265
+ "viewBox": "0 0 1024 1024",
266
+ "xmlns": "http://www.w3.org/2000/svg",
267
+ "class": ns.e("icon")
268
+ }, [createVNode("path", {
269
+ "fill": "currentColor",
270
+ "d": "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"
271
+ }, null)]);
272
+ }
273
+ function WarningIcon() {
274
+ return createVNode("svg", {
275
+ "viewBox": "0 0 1024 1024",
276
+ "xmlns": "http://www.w3.org/2000/svg",
277
+ "class": ns.e("icon")
278
+ }, [createVNode("path", {
279
+ "fill": "currentColor",
280
+ "d": "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"
281
+ }, null)]);
282
+ }
283
+ function InfoIcon() {
284
+ return createVNode("svg", {
285
+ "viewBox": "0 0 1024 1024",
286
+ "xmlns": "http://www.w3.org/2000/svg",
287
+ "class": ns.e("icon")
288
+ }, [createVNode("path", {
289
+ "fill": "currentColor",
290
+ "d": "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
291
+ }, null)]);
292
+ }
293
+ function ErrorIcon() {
294
+ return createVNode("svg", {
295
+ "viewBox": "0 0 1024 1024",
296
+ "xmlns": "http://www.w3.org/2000/svg",
297
+ "class": ns.e("icon")
298
+ }, [createVNode("path", {
299
+ "fill": "currentColor",
300
+ "d": "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"
301
+ }, null)]);
302
+ }
303
+ var message$1 = "";
304
+ var Message$1 = defineComponent({
305
+ name: "DMessage",
306
+ props: messageProps,
307
+ emits: ["destroy", "close"],
308
+ setup(props, {
309
+ emit,
310
+ slots
311
+ }) {
312
+ const {
313
+ visible,
314
+ message: message2,
315
+ type,
316
+ bordered,
317
+ shadow,
318
+ showClose
319
+ } = toRefs(props);
320
+ const ns2 = useNamespace("message");
321
+ let timer = null;
322
+ let timestamp;
323
+ const handleDestroy = () => {
324
+ emit("destroy");
325
+ };
326
+ const close = () => {
327
+ var _a;
328
+ timer && clearTimeout(timer);
329
+ timer = null;
330
+ (_a = props.onClose) == null ? void 0 : _a.call(props);
331
+ };
332
+ const interrupt = () => {
333
+ if (timer) {
334
+ clearTimeout(timer);
335
+ timer = null;
336
+ }
337
+ };
338
+ const removeReset = () => {
339
+ if (props.visible) {
340
+ const remainTime = props.duration - (Date.now() - timestamp);
341
+ timer = setTimeout(close, remainTime);
342
+ }
343
+ };
344
+ watch(() => props.visible, (val) => {
345
+ if (val) {
346
+ timestamp = Date.now();
347
+ if (props.duration) {
348
+ timer = setTimeout(close, props.duration);
349
+ }
350
+ }
351
+ });
352
+ const classes = computed(() => ({
353
+ [ns2.b()]: true,
354
+ [ns2.m(type.value)]: true
355
+ }));
356
+ const lastOffset = computed(() => getLastOffset(props.id));
357
+ const styles = computed(() => {
358
+ const messageStyles = {};
359
+ if (!bordered.value) {
360
+ messageStyles["border"] = "none";
361
+ }
362
+ if (!shadow.value) {
363
+ messageStyles["box-shadow"] = "none";
364
+ }
365
+ return {
366
+ ...messageStyles,
367
+ top: `${lastOffset.value}px`
368
+ };
369
+ });
370
+ const renderIcon = computed(() => {
371
+ const iconClasses = computed(() => ({
372
+ [ns2.e("image")]: true,
373
+ [ns2.em("image", type.value)]: true
374
+ }));
375
+ return !(!type.value || type.value === "normal") && createVNode("span", {
376
+ "class": iconClasses.value
377
+ }, [type.value && (type.value === "success" && createVNode(SuccessIcon, null, null) || type.value === "info" && createVNode(InfoIcon, null, null) || type.value === "warning" && createVNode(WarningIcon, null, null) || type.value === "error" && createVNode(ErrorIcon, null, null))]);
378
+ });
379
+ const renderText = computed(() => {
380
+ var _a;
381
+ const textClasses = computed(() => ({
382
+ [ns2.e("content")]: true,
383
+ [ns2.em("content", type.value)]: true
384
+ }));
385
+ return createVNode("span", {
386
+ "class": textClasses.value
387
+ }, [message2.value ? message2.value : (_a = slots.default) == null ? void 0 : _a.call(slots)]);
388
+ });
389
+ const renderClose = computed(() => {
390
+ return showClose.value && createVNode("span", {
391
+ "class": [ns2.e("close")],
392
+ "onClick": close
393
+ }, [createVNode(Close, null, null)]);
394
+ });
395
+ return () => {
396
+ return createVNode(Transition, {
397
+ "name": "message-fade",
398
+ "onAfterLeave": handleDestroy
399
+ }, {
400
+ default: () => [visible.value && createVNode("div", {
401
+ "class": classes.value,
402
+ "style": {
403
+ ...styles.value
404
+ },
405
+ "onMouseenter": interrupt,
406
+ "onMouseleave": removeReset
407
+ }, [renderIcon.value, renderText.value, renderClose.value])]
408
+ });
409
+ };
410
+ }
411
+ });
412
+ function _isSlot(s) {
413
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
414
+ }
415
+ const instances = shallowReactive([]);
416
+ const getLastOffset = (id) => {
417
+ const idx = instances.findIndex((instance) => instance.id === id);
418
+ return idx * 65 + 80;
419
+ };
420
+ const deleteInstance = (id) => {
421
+ const idx = instances.findIndex((instance) => instance.id === id);
422
+ if (idx !== -1) {
423
+ instances.splice(idx, 1);
424
+ }
425
+ return idx;
426
+ };
427
+ const initInstance = (id, props, message2) => {
428
+ const container = document.createElement("div");
429
+ container.id = id;
430
+ const app = createApp({
431
+ setup() {
432
+ onUnmounted(() => {
433
+ document.body.removeChild(container);
434
+ });
435
+ return () => createVNode(Message$1, mergeProps(props, {
436
+ "id": id,
437
+ "onDestroy": app.unmount
438
+ }), _isSlot(message2) ? message2 : {
439
+ default: () => [message2]
440
+ });
441
+ }
442
+ });
443
+ document.body.appendChild(container);
444
+ app.mount(container);
445
+ return {
446
+ id,
447
+ props
448
+ };
449
+ };
450
+ const defaultOptions = {
451
+ duration: 3e3,
452
+ type: "normal"
453
+ };
454
+ const normalizeOptions = (params) => {
455
+ const options = !params || isString(params) ? {
456
+ message: params
457
+ } : params;
458
+ const normalized = {
459
+ ...defaultOptions,
460
+ ...options
461
+ };
462
+ return normalized;
463
+ };
464
+ let seed = 0;
465
+ function open(options) {
466
+ const originOnClose = options.onClose || null;
467
+ const messageContent = options.message;
468
+ delete options.message;
469
+ const props = reactive({
470
+ ...defaultOptions,
471
+ ...options,
472
+ onClose: () => {
473
+ props.visible = false;
474
+ deleteInstance(props.id);
475
+ originOnClose == null ? void 0 : originOnClose();
476
+ }
477
+ });
478
+ seed++;
479
+ const id = `message_${seed}`;
480
+ props.id = id;
481
+ const messageContext = initInstance(id, props, messageContent);
482
+ instances.push(messageContext);
483
+ props.visible = true;
484
+ }
485
+ function message(params) {
486
+ const options = normalizeOptions(params);
487
+ open({
488
+ ...options
489
+ });
490
+ }
491
+ function success(params) {
492
+ const options = normalizeOptions(params);
493
+ open({
494
+ ...options,
495
+ type: "success"
496
+ });
497
+ }
498
+ function error(params) {
499
+ const options = normalizeOptions(params);
500
+ open({
501
+ ...options,
502
+ type: "error"
503
+ });
504
+ }
505
+ function warning(params) {
506
+ const options = normalizeOptions(params);
507
+ open({
508
+ ...options,
509
+ type: "warning"
510
+ });
511
+ }
512
+ function info(params) {
513
+ const options = normalizeOptions(params);
514
+ open({
515
+ ...options,
516
+ type: "info"
517
+ });
518
+ }
519
+ const Message = Object.assign(message, {
520
+ success,
521
+ error,
522
+ warning,
523
+ info
524
+ });
525
+ console.log(Message);
526
+ var index = {
527
+ title: "Message \u5168\u5C40\u63D0\u793A",
528
+ category: "\u53CD\u9988",
529
+ status: "100%",
530
+ install(app) {
531
+ app.config.globalProperties.$message = Message;
532
+ }
533
+ };
534
+ export { Message, index as default, messageProps };
@@ -0,0 +1 @@
1
+ (function(f,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis!="undefined"?globalThis:f||self,e(f.index={},f.Vue))})(this,function(f,e){"use strict";const M=n=>typeof n=="string",P={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},T={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function w(n,t,s){let o=n;return t&&(o+=`__${t}`),s&&(o+=`--${s}`),o}function p(n,t=!1){const s=t?`.devui-${n}`:`devui-${n}`;return{b:()=>w(s),e:l=>l?w(s,l):"",m:l=>l?w(s,"",l):"",em:(l,u)=>l&&u?w(s,l,u):""}}var ae="",B=e.defineComponent({name:"DSvgIcon",props:T,setup(n){const{name:t,color:s,size:o}=e.toRefs(n),c=p("svg-icon"),a=e.computed(()=>`#icon-${t.value}`),m=e.computed(()=>typeof o.value=="number"?`${o.value}px`:o.value),l={width:m.value,height:m.value};return()=>e.createVNode("svg",{class:c.b(),style:l},[e.createVNode("use",{"xlink:href":a.value,fill:s.value},null)])}});function L(n){return/^((http|https):)?\/\//.test(n)}function _(n,t){const{component:s,name:o,size:c,color:a,classPrefix:m,rotate:l}=e.toRefs(n),u=p("icon"),r=e.computed(()=>typeof c.value=="number"?`${c.value}px`:c.value),d=s.value?e.resolveDynamicComponent(s.value):e.resolveDynamicComponent(B),g=()=>e.createVNode("img",e.mergeProps({src:o.value,alt:o.value.split("/")[o.value.split("/").length-1],class:[(l==null?void 0:l.value)==="infinite"&&u.m("spin")],style:{width:r.value||"",transform:`rotate(${l==null?void 0:l.value}deg)`,verticalAlign:"middle"}},t.attrs),null),V=()=>e.createVNode(d,e.mergeProps({name:o.value,color:a.value,size:r.value,class:[(l==null?void 0:l.value)==="infinite"&&u.m("spin")],style:{transform:`rotate(${l==null?void 0:l.value}deg)`}},t.attrs),null),b=()=>{const I=/^icon-/.test(o.value)?o.value:`${m.value}-${o.value}`;return e.createVNode("i",e.mergeProps({class:[m.value,I,(l==null?void 0:l.value)==="infinite"&&u.m("spin")],style:{fontSize:r.value,color:a.value,transform:`rotate(${l==null?void 0:l.value}deg)`}},t.attrs),null)};return{iconDom:()=>s.value?V():L(o.value)?g():b()}}var k=e.defineComponent({name:"DIcon",props:P,emits:["click"],setup(n,t){const{disabled:s,operable:o}=e.toRefs(n),{iconDom:c}=_(n,t),a=p("icon"),m=e.computed(()=>({[a.e("container")]:!0,[a.m("disabled")]:s.value,[a.m("operable")]:o.value})),l=u=>{s.value||t.emit("click",u)};return()=>{var u,r,d,g;return e.createVNode("div",{class:m.value,onClick:l},[(r=(u=t.slots).prefix)==null?void 0:r.call(u),c(),(g=(d=t.slots).suffix)==null?void 0:g.call(d)])}}}),ce="";e.defineComponent({name:"DIconGroup",setup(n,t){const s=p("icon-group");return()=>{var o,c;return e.createVNode("div",{class:s.b()},[(c=(o=t.slots).default)==null?void 0:c.call(o)])}}});var A=e.defineComponent({emits:["click"],setup(n,{emit:t}){const s=p("message");return()=>e.createVNode("div",{class:s.e("icon-close"),onClick:o=>t("click",o)},[e.createVNode(k,{name:"close",size:"14px"},null)])}});const x={id:{type:String,default:""},visible:{type:Boolean,default:!1},message:{type:String,default:""},type:{type:String,default:"normal"},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!0},duration:{type:Number,default:3e3},showClose:{type:Boolean,default:!1},onClose:{type:Function}},N=p("message");function O(){return e.createVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:N.e("icon")},[e.createVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"},null)])}function R(){return e.createVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:N.e("icon")},[e.createVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null)])}function j(){return e.createVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:N.e("icon")},[e.createVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"},null)])}function E(){return e.createVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:N.e("icon")},[e.createVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"},null)])}var re="",F=e.defineComponent({name:"DMessage",props:x,emits:["destroy","close"],setup(n,{emit:t,slots:s}){const{visible:o,message:c,type:a,bordered:m,shadow:l,showClose:u}=e.toRefs(n),r=p("message");let d=null,g;const V=()=>{t("destroy")},b=()=>{var i;d&&clearTimeout(d),d=null,(i=n.onClose)==null||i.call(n)},D=()=>{d&&(clearTimeout(d),d=null)},I=()=>{if(n.visible){const i=n.duration-(Date.now()-g);d=setTimeout(b,i)}};e.watch(()=>n.visible,i=>{i&&(g=Date.now(),n.duration&&(d=setTimeout(b,n.duration)))});const Z=e.computed(()=>({[r.b()]:!0,[r.m(a.value)]:!0})),ee=e.computed(()=>q(n.id)),ne=e.computed(()=>{const i={};return m.value||(i.border="none"),l.value||(i["box-shadow"]="none"),{...i,top:`${ee.value}px`}}),te=e.computed(()=>{const i=e.computed(()=>({[r.e("image")]:!0,[r.em("image",a.value)]:!0}));return!(!a.value||a.value==="normal")&&e.createVNode("span",{class:i.value},[a.value&&(a.value==="success"&&e.createVNode(O,null,null)||a.value==="info"&&e.createVNode(j,null,null)||a.value==="warning"&&e.createVNode(R,null,null)||a.value==="error"&&e.createVNode(E,null,null))])}),oe=e.computed(()=>{var $;const i=e.computed(()=>({[r.e("content")]:!0,[r.em("content",a.value)]:!0}));return e.createVNode("span",{class:i.value},[c.value?c.value:($=s.default)==null?void 0:$.call(s)])}),se=e.computed(()=>u.value&&e.createVNode("span",{class:[r.e("close")],onClick:b},[e.createVNode(A,null,null)]));return()=>e.createVNode(e.Transition,{name:"message-fade",onAfterLeave:V},{default:()=>[o.value&&e.createVNode("div",{class:Z.value,style:{...ne.value},onMouseenter:D,onMouseleave:I},[te.value,oe.value,se.value])]})}});function U(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!e.isVNode(n)}const h=e.shallowReactive([]),q=n=>h.findIndex(s=>s.id===n)*65+80,G=n=>{const t=h.findIndex(s=>s.id===n);return t!==-1&&h.splice(t,1),t},X=(n,t,s)=>{const o=document.createElement("div");o.id=n;const c=e.createApp({setup(){return e.onUnmounted(()=>{document.body.removeChild(o)}),()=>e.createVNode(F,e.mergeProps(t,{id:n,onDestroy:c.unmount}),U(s)?s:{default:()=>[s]})}});return document.body.appendChild(o),c.mount(o),{id:n,props:t}},z={duration:3e3,type:"normal"},v=n=>{const t=!n||M(n)?{message:n}:n;return{...z,...t}};let S=0;function y(n){const t=n.onClose||null,s=n.message;delete n.message;const o=e.reactive({...z,...n,onClose:()=>{o.visible=!1,G(o.id),t==null||t()}});S++;const c=`message_${S}`;o.id=c;const a=X(c,o,s);h.push(a),o.visible=!0}function W(n){const t=v(n);y({...t})}function H(n){const t=v(n);y({...t,type:"success"})}function J(n){const t=v(n);y({...t,type:"error"})}function K(n){const t=v(n);y({...t,type:"warning"})}function Q(n){const t=v(n);y({...t,type:"info"})}const C=Object.assign(W,{success:H,error:J,warning:K,info:Q});console.log(C);var Y={title:"Message \u5168\u5C40\u63D0\u793A",category:"\u53CD\u9988",status:"100%",install(n){n.config.globalProperties.$message=C}};f.Message=C,f.default=Y,f.messageProps=x,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "message",
3
+ "version": "0.0.0",
4
+ "main": "index.umd.js",
5
+ "module": "index.es.js",
6
+ "style": "style.css"
7
+ }
@@ -0,0 +1 @@
1
+ .devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--disabled{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #adb0b8)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 4px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-icon-group{display:inline-flex;align-items:center}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable){padding:8px;margin-left:0}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable):first-child{margin-left:-8px}.devui-icon-group>*:not(:first-child){margin-left:0}.devui-message{position:fixed;z-index:var(--devui-z-index-modal, 1079);padding:10px 15px;border-radius:var(--devui-border-radius-feedback, 4px);left:50%;transform:translate(-50%);top:80px;display:flex;align-items:center;border-width:1px;border-style:solid;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;background-color:var(--devui-base-bg, #ffffff);transition:top .5s ease}.devui-message--success{background-color:var(--devui-success-bg, #edfff9);border-color:var(--devui-success-line, #50d4ab)}.devui-message--info{background-color:var(--devui-info-bg, #f2f5fc);border-color:var(--devui-info-line, #5e7ce0)}.devui-message--warning{background-color:var(--devui-warning-bg, #fff3e8);border-color:var(--devui-warning-line, #fa9841)}.devui-message--error{background-color:var(--devui-danger-bg, #ffeeed);border-color:var(--devui-danger-line, #f66f6a)}.devui-message__close{margin-left:auto;padding-left:10px;margin-top:-2px}.devui-message__image{margin-top:1px;display:inline-block;width:var(--devui-font-size-icon, 16px);min-width:var(--devui-font-size-icon, 16px);min-height:var(--devui-font-size-icon, 16px);height:var(--devui-font-size-icon, 16px);padding:0;line-height:1;margin-right:10px}.devui-message__image--success{color:var(--devui-success, #50d4ab)}.devui-message__image--info{color:var(--devui-info, #5e7ce0)}.devui-message__image--warning{color:var(--devui-warning, #fac20a)}.devui-message__image--error{color:var(--devui-danger, #f66f6a)}.devui-message__content{font-size:var(--devui-font-size-page-title, 16px);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.devui-message__content--success{color:var(--devui-success, #50d4ab)}.devui-message__content--info{color:var(--devui-info, #5e7ce0)}.devui-message__content--warning{color:var(--devui-warning, #fac20a)}.devui-message__content--error{color:var(--devui-danger, #f66f6a)}.message-fade-enter-active,.message-fade-leave-active{transform:translate(-50%);transition:all .5s ease}.message-fade-enter-from,.message-fade-leave-to{opacity:0;transform:translate(-50%,-200%)}
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ declare function install(app: App): void
3
+ declare const _default: {
4
+ install: typeof install;
5
+ version: string;
6
+ };
7
+ export default _default;