vue-devui 0.1.3 → 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 (428) hide show
  1. package/README.md +161 -59
  2. package/alert/index.d.ts +7 -0
  3. package/alert/index.es.js +204 -0
  4. package/alert/index.umd.js +1 -0
  5. package/alert/package.json +7 -0
  6. package/alert/style.css +1 -0
  7. package/auto-complete/index.d.ts +7 -0
  8. package/auto-complete/index.es.js +9051 -0
  9. package/auto-complete/index.umd.js +40 -0
  10. package/auto-complete/package.json +7 -0
  11. package/auto-complete/style.css +1 -0
  12. package/avatar/index.d.ts +7 -0
  13. package/avatar/index.es.js +308 -0
  14. package/avatar/index.umd.js +1 -0
  15. package/avatar/package.json +7 -0
  16. package/avatar/style.css +1 -0
  17. package/badge/index.d.ts +7 -0
  18. package/badge/index.es.js +120 -0
  19. package/badge/index.umd.js +1 -0
  20. package/badge/package.json +7 -0
  21. package/badge/style.css +1 -0
  22. package/button/index.d.ts +7 -0
  23. package/button/index.es.js +5964 -0
  24. package/button/index.umd.js +27 -0
  25. package/button/package.json +7 -0
  26. package/button/style.css +1 -0
  27. package/card/index.d.ts +7 -0
  28. package/card/index.es.js +89 -0
  29. package/card/index.umd.js +1 -0
  30. package/card/package.json +7 -0
  31. package/card/style.css +1 -0
  32. package/checkbox/index.d.ts +7 -0
  33. package/checkbox/index.es.js +8207 -0
  34. package/checkbox/index.umd.js +38 -0
  35. package/checkbox/package.json +7 -0
  36. package/checkbox/style.css +1 -0
  37. package/collapse/index.d.ts +7 -0
  38. package/collapse/index.es.js +195 -0
  39. package/collapse/index.umd.js +1 -0
  40. package/collapse/package.json +7 -0
  41. package/collapse/style.css +1 -0
  42. package/countdown/index.d.ts +7 -0
  43. package/countdown/index.es.js +217 -0
  44. package/countdown/index.umd.js +1 -0
  45. package/countdown/package.json +7 -0
  46. package/countdown/style.css +1 -0
  47. package/date-picker-pro/index.d.ts +7 -0
  48. package/date-picker-pro/index.es.js +12031 -0
  49. package/date-picker-pro/index.umd.js +38 -0
  50. package/date-picker-pro/package.json +7 -0
  51. package/date-picker-pro/style.css +1 -0
  52. package/drawer/index.d.ts +7 -0
  53. package/drawer/index.es.js +248 -0
  54. package/drawer/index.umd.js +1 -0
  55. package/drawer/package.json +7 -0
  56. package/drawer/style.css +1 -0
  57. package/dropdown/index.d.ts +7 -0
  58. package/dropdown/index.es.js +743 -0
  59. package/dropdown/index.umd.js +1 -0
  60. package/dropdown/package.json +7 -0
  61. package/dropdown/style.css +1 -0
  62. package/editable-select/index.d.ts +7 -0
  63. package/editable-select/index.es.js +991 -0
  64. package/editable-select/index.umd.js +1 -0
  65. package/editable-select/package.json +7 -0
  66. package/editable-select/style.css +1 -0
  67. package/form/index.d.ts +7 -0
  68. package/form/index.es.js +7751 -0
  69. package/form/index.umd.js +38 -0
  70. package/form/package.json +7 -0
  71. package/form/style.css +1 -0
  72. package/fullscreen/index.d.ts +7 -0
  73. package/fullscreen/index.es.js +166 -0
  74. package/fullscreen/index.umd.js +1 -0
  75. package/fullscreen/package.json +7 -0
  76. package/fullscreen/style.css +1 -0
  77. package/grid/index.d.ts +7 -0
  78. package/grid/index.es.js +271 -0
  79. package/grid/index.umd.js +1 -0
  80. package/grid/package.json +7 -0
  81. package/grid/style.css +1 -0
  82. package/icon/index.d.ts +7 -0
  83. package/icon/index.es.js +218 -0
  84. package/icon/index.umd.js +1 -0
  85. package/icon/package.json +7 -0
  86. package/icon/style.css +1 -0
  87. package/image-preview/index.d.ts +7 -0
  88. package/image-preview/index.es.js +511 -0
  89. package/image-preview/index.umd.js +1 -0
  90. package/image-preview/package.json +7 -0
  91. package/image-preview/style.css +1 -0
  92. package/index.d.ts +7 -0
  93. package/input/index.d.ts +7 -0
  94. package/input/index.es.js +8311 -0
  95. package/input/index.umd.js +38 -0
  96. package/input/package.json +7 -0
  97. package/input/style.css +1 -0
  98. package/input-number/index.d.ts +7 -0
  99. package/input-number/index.es.js +308 -0
  100. package/input-number/index.umd.js +1 -0
  101. package/input-number/package.json +7 -0
  102. package/input-number/style.css +1 -0
  103. package/layout/index.d.ts +7 -0
  104. package/layout/index.es.js +115 -0
  105. package/layout/index.umd.js +1 -0
  106. package/layout/package.json +7 -0
  107. package/layout/style.css +1 -0
  108. package/loading/index.d.ts +7 -0
  109. package/loading/index.es.js +272 -0
  110. package/loading/index.umd.js +1 -0
  111. package/loading/package.json +7 -0
  112. package/loading/style.css +1 -0
  113. package/message/index.d.ts +7 -0
  114. package/message/index.es.js +534 -0
  115. package/message/index.umd.js +1 -0
  116. package/message/package.json +7 -0
  117. package/message/style.css +1 -0
  118. package/modal/index.d.ts +7 -0
  119. package/modal/index.es.js +741 -0
  120. package/modal/index.umd.js +1 -0
  121. package/modal/package.json +7 -0
  122. package/modal/style.css +1 -0
  123. package/notification/index.d.ts +7 -0
  124. package/notification/index.es.js +528 -0
  125. package/notification/index.umd.js +1 -0
  126. package/notification/package.json +7 -0
  127. package/notification/style.css +1 -0
  128. package/nuxt/components/Alert.js +3 -0
  129. package/nuxt/components/Aside.js +3 -0
  130. package/nuxt/components/AutoComplete.js +3 -0
  131. package/nuxt/components/Avatar.js +3 -0
  132. package/nuxt/components/Badge.js +3 -0
  133. package/nuxt/components/Button.js +3 -0
  134. package/nuxt/components/ButtonGroup.js +3 -0
  135. package/nuxt/components/Card.js +3 -0
  136. package/nuxt/components/Checkbox.js +3 -0
  137. package/nuxt/components/CheckboxButton.js +3 -0
  138. package/nuxt/components/CheckboxGroup.js +3 -0
  139. package/nuxt/components/Col.js +3 -0
  140. package/nuxt/components/Collapse.js +3 -0
  141. package/nuxt/components/CollapseItem.js +3 -0
  142. package/nuxt/components/Column.js +3 -0
  143. package/nuxt/components/Content.js +3 -0
  144. package/nuxt/components/Countdown.js +3 -0
  145. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  146. package/nuxt/components/DatePickerPro.js +3 -0
  147. package/nuxt/components/Drawer.js +3 -0
  148. package/nuxt/components/DrawerService.js +3 -0
  149. package/nuxt/components/Dropdown.js +3 -0
  150. package/nuxt/components/DropdownMenu.js +3 -0
  151. package/nuxt/components/DropdownPropsKey.js +3 -0
  152. package/nuxt/components/EditableSelect.js +3 -0
  153. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  154. package/nuxt/components/FORM_TOKEN.js +3 -0
  155. package/nuxt/components/FixedOverlay.js +3 -0
  156. package/nuxt/components/FlexibleOverlay.js +3 -0
  157. package/nuxt/components/Footer.js +3 -0
  158. package/nuxt/components/Form.js +3 -0
  159. package/nuxt/components/FormItem.js +3 -0
  160. package/nuxt/components/FormOperation.js +3 -0
  161. package/nuxt/components/Fullscreen.js +3 -0
  162. package/nuxt/components/Header.js +3 -0
  163. package/nuxt/components/IFileOptions.js +3 -0
  164. package/nuxt/components/IUploadOptions.js +3 -0
  165. package/nuxt/components/Icon.js +3 -0
  166. package/nuxt/components/IconGroup.js +3 -0
  167. package/nuxt/components/ImagePreviewService.js +3 -0
  168. package/nuxt/components/Input.js +3 -0
  169. package/nuxt/components/InputNumber.js +3 -0
  170. package/nuxt/components/LABEL_DATA.js +3 -0
  171. package/nuxt/components/Layout.js +3 -0
  172. package/nuxt/components/Loading.js +3 -0
  173. package/nuxt/components/LoadingOptions.js +3 -0
  174. package/nuxt/components/LoadingService.js +3 -0
  175. package/nuxt/components/Message.js +3 -0
  176. package/nuxt/components/Modal.js +3 -0
  177. package/nuxt/components/Notification.js +3 -0
  178. package/nuxt/components/NotificationService.js +3 -0
  179. package/nuxt/components/Option.js +3 -0
  180. package/nuxt/components/OptionGroup.js +3 -0
  181. package/nuxt/components/Pagination.js +3 -0
  182. package/nuxt/components/Panel.js +3 -0
  183. package/nuxt/components/PanelBody.js +3 -0
  184. package/nuxt/components/PanelFooter.js +3 -0
  185. package/nuxt/components/PanelHeader.js +3 -0
  186. package/nuxt/components/Popover.js +3 -0
  187. package/nuxt/components/Progress.js +3 -0
  188. package/nuxt/components/Radio.js +3 -0
  189. package/nuxt/components/RadioButton.js +3 -0
  190. package/nuxt/components/RadioGroup.js +3 -0
  191. package/nuxt/components/Rate.js +3 -0
  192. package/nuxt/components/Result.js +3 -0
  193. package/nuxt/components/Row.js +3 -0
  194. package/nuxt/components/Search.js +3 -0
  195. package/nuxt/components/Select.js +3 -0
  196. package/nuxt/components/Skeleton.js +3 -0
  197. package/nuxt/components/SkeletonItem.js +3 -0
  198. package/nuxt/components/Slider.js +3 -0
  199. package/nuxt/components/Splitter.js +3 -0
  200. package/nuxt/components/Statistic.js +3 -0
  201. package/nuxt/components/Status.js +3 -0
  202. package/nuxt/components/Step.js +3 -0
  203. package/nuxt/components/Steps.js +3 -0
  204. package/nuxt/components/Switch.js +3 -0
  205. package/nuxt/components/TABLE_TOKEN.js +3 -0
  206. package/nuxt/components/Tab.js +3 -0
  207. package/nuxt/components/Table.js +3 -0
  208. package/nuxt/components/Tabs.js +3 -0
  209. package/nuxt/components/Tag.js +3 -0
  210. package/nuxt/components/Textarea.js +3 -0
  211. package/nuxt/components/TimePicker.js +3 -0
  212. package/nuxt/components/TimeSelect.js +3 -0
  213. package/nuxt/components/Timeline.js +3 -0
  214. package/nuxt/components/TimelineItem.js +3 -0
  215. package/nuxt/components/Tooltip.js +3 -0
  216. package/nuxt/components/Tree.js +3 -0
  217. package/nuxt/components/Upload.js +3 -0
  218. package/nuxt/components/UploadStatus.js +3 -0
  219. package/nuxt/components/alertProps.js +3 -0
  220. package/nuxt/components/animationInjectionKey.js +3 -0
  221. package/nuxt/components/autoCompleteProps.js +3 -0
  222. package/nuxt/components/avatarProps.js +3 -0
  223. package/nuxt/components/badgeProps.js +3 -0
  224. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  225. package/nuxt/components/buttonGroupProps.js +3 -0
  226. package/nuxt/components/buttonProps.js +3 -0
  227. package/nuxt/components/cardProps.js +3 -0
  228. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  229. package/nuxt/components/checkboxGroupProps.js +3 -0
  230. package/nuxt/components/checkboxProps.js +3 -0
  231. package/nuxt/components/colProps.js +3 -0
  232. package/nuxt/components/colPropsBaseClass.js +3 -0
  233. package/nuxt/components/colPropsBaseStyle.js +3 -0
  234. package/nuxt/components/collapseItemProps.js +3 -0
  235. package/nuxt/components/collapseProps.js +3 -0
  236. package/nuxt/components/countdownProps.js +3 -0
  237. package/nuxt/components/datePickerProCommonProps.js +3 -0
  238. package/nuxt/components/datePickerProPanelProps.js +3 -0
  239. package/nuxt/components/datePickerProProps.js +3 -0
  240. package/nuxt/components/dropdownMenuProps.js +3 -0
  241. package/nuxt/components/editableSelectProps.js +3 -0
  242. package/nuxt/components/fixedOverlayProps.js +3 -0
  243. package/nuxt/components/flexibleOverlayProps.js +3 -0
  244. package/nuxt/components/formItemProps.js +3 -0
  245. package/nuxt/components/formProps.js +3 -0
  246. package/nuxt/components/fullscreenProps.js +3 -0
  247. package/nuxt/components/iconProps.js +3 -0
  248. package/nuxt/components/imagePreviewProps.js +3 -0
  249. package/nuxt/components/inputProps.js +3 -0
  250. package/nuxt/components/loadingProps.js +3 -0
  251. package/nuxt/components/messageProps.js +3 -0
  252. package/nuxt/components/modalProps.js +3 -0
  253. package/nuxt/components/notificationProps.js +3 -0
  254. package/nuxt/components/paginationProps.js +3 -0
  255. package/nuxt/components/panelProps.js +3 -0
  256. package/nuxt/components/popoverProps.js +3 -0
  257. package/nuxt/components/progressProps.js +3 -0
  258. package/nuxt/components/rateProps.js +3 -0
  259. package/nuxt/components/resultProps.js +3 -0
  260. package/nuxt/components/roundInjectionKey.js +3 -0
  261. package/nuxt/components/rowProps.js +3 -0
  262. package/nuxt/components/screenSizes.js +3 -0
  263. package/nuxt/components/searchProps.js +3 -0
  264. package/nuxt/components/skeletonItemProps.js +3 -0
  265. package/nuxt/components/skeletonProps.js +3 -0
  266. package/nuxt/components/sliderProps.js +3 -0
  267. package/nuxt/components/splitterProps.js +3 -0
  268. package/nuxt/components/statisticProps.js +3 -0
  269. package/nuxt/components/stepProps.js +3 -0
  270. package/nuxt/components/stepsProps.js +3 -0
  271. package/nuxt/components/svgIconProps.js +3 -0
  272. package/nuxt/components/switchProps.js +3 -0
  273. package/nuxt/components/tableProps.js +3 -0
  274. package/nuxt/components/tabsProps.js +3 -0
  275. package/nuxt/components/tagProps.js +3 -0
  276. package/nuxt/components/textareaProps.js +3 -0
  277. package/nuxt/components/timeAxisProps.js +3 -0
  278. package/nuxt/components/timerPickerPanelProps.js +3 -0
  279. package/nuxt/components/tooltipProps.js +3 -0
  280. package/nuxt/components/treeProps.js +3 -0
  281. package/nuxt/components/uploadProps.js +3 -0
  282. package/nuxt/index.js +13 -0
  283. package/overlay/index.d.ts +7 -0
  284. package/overlay/index.es.js +293 -0
  285. package/overlay/index.umd.js +1 -0
  286. package/overlay/package.json +7 -0
  287. package/overlay/style.css +1 -0
  288. package/package.json +17 -77
  289. package/pagination/index.d.ts +7 -0
  290. package/pagination/index.es.js +820 -0
  291. package/pagination/index.umd.js +1 -0
  292. package/pagination/package.json +7 -0
  293. package/pagination/style.css +1 -0
  294. package/panel/index.d.ts +7 -0
  295. package/panel/index.es.js +218 -0
  296. package/panel/index.umd.js +1 -0
  297. package/panel/package.json +7 -0
  298. package/panel/style.css +1 -0
  299. package/popover/index.d.ts +7 -0
  300. package/popover/index.es.js +6062 -0
  301. package/popover/index.umd.js +27 -0
  302. package/popover/package.json +7 -0
  303. package/popover/style.css +1 -0
  304. package/progress/index.d.ts +7 -0
  305. package/progress/index.es.js +207 -0
  306. package/progress/index.umd.js +3 -0
  307. package/progress/package.json +7 -0
  308. package/progress/style.css +1 -0
  309. package/radio/index.d.ts +7 -0
  310. package/radio/index.es.js +8056 -0
  311. package/radio/index.umd.js +38 -0
  312. package/radio/package.json +7 -0
  313. package/radio/style.css +1 -0
  314. package/rate/index.d.ts +7 -0
  315. package/rate/index.es.js +242 -0
  316. package/rate/index.umd.js +1 -0
  317. package/rate/package.json +7 -0
  318. package/rate/style.css +1 -0
  319. package/result/index.d.ts +7 -0
  320. package/result/index.es.js +248 -0
  321. package/result/index.umd.js +1 -0
  322. package/result/package.json +7 -0
  323. package/result/style.css +1 -0
  324. package/ripple/index.d.ts +7 -0
  325. package/ripple/index.es.js +173 -0
  326. package/ripple/index.umd.js +1 -0
  327. package/ripple/package.json +7 -0
  328. package/search/index.d.ts +7 -0
  329. package/search/index.es.js +8512 -0
  330. package/search/index.umd.js +38 -0
  331. package/search/package.json +7 -0
  332. package/search/style.css +1 -0
  333. package/select/index.d.ts +7 -0
  334. package/select/index.es.js +9423 -0
  335. package/select/index.umd.js +38 -0
  336. package/select/package.json +7 -0
  337. package/select/style.css +1 -0
  338. package/skeleton/index.d.ts +7 -0
  339. package/skeleton/index.es.js +145 -0
  340. package/skeleton/index.umd.js +1 -0
  341. package/skeleton/package.json +7 -0
  342. package/skeleton/style.css +1 -0
  343. package/slider/index.d.ts +7 -0
  344. package/slider/index.es.js +203 -0
  345. package/slider/index.umd.js +1 -0
  346. package/slider/package.json +7 -0
  347. package/slider/style.css +1 -0
  348. package/splitter/index.d.ts +7 -0
  349. package/splitter/index.es.js +6754 -0
  350. package/splitter/index.umd.js +27 -0
  351. package/splitter/package.json +7 -0
  352. package/splitter/style.css +1 -0
  353. package/statistic/index.d.ts +7 -0
  354. package/statistic/index.es.js +253 -0
  355. package/statistic/index.umd.js +1 -0
  356. package/statistic/package.json +7 -0
  357. package/statistic/style.css +1 -0
  358. package/status/index.d.ts +7 -0
  359. package/status/index.es.js +63 -0
  360. package/status/index.umd.js +1 -0
  361. package/status/package.json +7 -0
  362. package/status/style.css +1 -0
  363. package/steps/index.d.ts +7 -0
  364. package/steps/index.es.js +386 -0
  365. package/steps/index.umd.js +1 -0
  366. package/steps/package.json +7 -0
  367. package/steps/style.css +1 -0
  368. package/style.css +1 -1
  369. package/switch/index.d.ts +7 -0
  370. package/switch/index.es.js +7852 -0
  371. package/switch/index.umd.js +38 -0
  372. package/switch/package.json +7 -0
  373. package/switch/style.css +1 -0
  374. package/table/index.d.ts +7 -0
  375. package/table/index.es.js +11527 -0
  376. package/table/index.umd.js +38 -0
  377. package/table/package.json +7 -0
  378. package/table/style.css +1 -0
  379. package/tabs/index.d.ts +7 -0
  380. package/tabs/index.es.js +407 -0
  381. package/tabs/index.umd.js +1 -0
  382. package/tabs/package.json +7 -0
  383. package/tabs/style.css +1 -0
  384. package/tag/index.d.ts +7 -0
  385. package/tag/index.es.js +156 -0
  386. package/tag/index.umd.js +1 -0
  387. package/tag/package.json +7 -0
  388. package/tag/style.css +1 -0
  389. package/textarea/index.d.ts +7 -0
  390. package/textarea/index.es.js +7986 -0
  391. package/textarea/index.umd.js +46 -0
  392. package/textarea/package.json +7 -0
  393. package/textarea/style.css +1 -0
  394. package/theme/theme.scss +121 -0
  395. package/time-picker/index.d.ts +7 -0
  396. package/time-picker/index.es.js +9556 -0
  397. package/time-picker/index.umd.js +38 -0
  398. package/time-picker/package.json +7 -0
  399. package/time-picker/style.css +1 -0
  400. package/time-select/index.d.ts +7 -0
  401. package/time-select/index.es.js +9604 -0
  402. package/time-select/index.umd.js +38 -0
  403. package/time-select/package.json +7 -0
  404. package/time-select/style.css +1 -0
  405. package/timeline/index.d.ts +7 -0
  406. package/timeline/index.es.js +427 -0
  407. package/timeline/index.umd.js +1 -0
  408. package/timeline/package.json +7 -0
  409. package/timeline/style.css +1 -0
  410. package/tooltip/index.d.ts +7 -0
  411. package/tooltip/index.es.js +5900 -0
  412. package/tooltip/index.umd.js +27 -0
  413. package/tooltip/package.json +7 -0
  414. package/tooltip/style.css +1 -0
  415. package/tree/index.d.ts +7 -0
  416. package/tree/index.es.js +10336 -0
  417. package/tree/index.umd.js +38 -0
  418. package/tree/package.json +7 -0
  419. package/tree/style.css +1 -0
  420. package/upload/index.d.ts +7 -0
  421. package/upload/index.es.js +1398 -0
  422. package/upload/index.umd.js +1 -0
  423. package/upload/package.json +7 -0
  424. package/upload/style.css +1 -0
  425. package/vue-devui.es.js +27451 -1
  426. package/vue-devui.umd.js +50 -1
  427. package/favicon.ico +0 -0
  428. package/logo.svg +0 -30
@@ -0,0 +1,242 @@
1
+ import { defineComponent, ref, watch, onMounted, createVNode, resolveComponent } from "vue";
2
+ const rateProps = {
3
+ modelValue: {
4
+ type: Number,
5
+ default: 0
6
+ },
7
+ read: {
8
+ type: Boolean,
9
+ default: false
10
+ },
11
+ count: {
12
+ type: Number,
13
+ default: 5
14
+ },
15
+ type: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ color: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ icon: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ character: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ allowHalf: {
32
+ type: Boolean,
33
+ default: false
34
+ },
35
+ onChange: {
36
+ type: Function,
37
+ default: void 0
38
+ },
39
+ onTouched: {
40
+ type: Function,
41
+ default: void 0
42
+ }
43
+ };
44
+ function createBem(namespace, element, modifier) {
45
+ let cls = namespace;
46
+ if (element) {
47
+ cls += `__${element}`;
48
+ }
49
+ if (modifier) {
50
+ cls += `--${modifier}`;
51
+ }
52
+ return cls;
53
+ }
54
+ function useNamespace(block, needDot = false) {
55
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
56
+ const b = () => createBem(namespace);
57
+ const e = (element) => element ? createBem(namespace, element) : "";
58
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
59
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
60
+ return {
61
+ b,
62
+ e,
63
+ m,
64
+ em
65
+ };
66
+ }
67
+ var rate = "";
68
+ var Rate = defineComponent({
69
+ name: "DRate",
70
+ props: rateProps,
71
+ emits: ["change", "update:modelValue"],
72
+ setup(props, ctx) {
73
+ const totalLevelArray = ref([]);
74
+ const chooseValue = ref(0);
75
+ const setChange = (start, end, width) => {
76
+ for (let i = start; i < end; i++) {
77
+ totalLevelArray.value[i]["width"] = width;
78
+ }
79
+ };
80
+ const initRating = () => {
81
+ chooseValue.value = props.modelValue;
82
+ const halfStar = chooseValue.value % 1;
83
+ const intCurrentLevel = Math.floor(chooseValue.value);
84
+ setChange(0, intCurrentLevel, "100%");
85
+ if (halfStar > 0) {
86
+ totalLevelArray.value[intCurrentLevel]["width"] = halfStar * 100 + "%";
87
+ setChange(intCurrentLevel + 1, props.count, "0");
88
+ } else {
89
+ setChange(intCurrentLevel, props.count, "0");
90
+ }
91
+ };
92
+ const initLevelArray = () => {
93
+ totalLevelArray.value = [];
94
+ for (let i = 0; i < props.count; i++) {
95
+ totalLevelArray.value.push({
96
+ width: "0"
97
+ });
98
+ }
99
+ };
100
+ watch([() => props.modelValue, () => props.count], () => {
101
+ initLevelArray();
102
+ initRating();
103
+ });
104
+ onMounted(() => {
105
+ initLevelArray();
106
+ initRating();
107
+ });
108
+ const isSemiSelected = (e) => {
109
+ const target = e.target;
110
+ return props.allowHalf && e.offsetX * 2 <= target.clientWidth;
111
+ };
112
+ const hoverToggle = (e, index2) => {
113
+ if (props.read) {
114
+ return;
115
+ }
116
+ setChange(0, index2 + 1, "100%");
117
+ const width = isSemiSelected(e) ? "50%" : "100%";
118
+ setChange(index2, index2 + 1, width);
119
+ setChange(index2 + 1, props.count, "0");
120
+ };
121
+ const onMouseleave = () => {
122
+ initRating();
123
+ };
124
+ const selectValue = (e, index2) => {
125
+ if (props.read) {
126
+ return;
127
+ }
128
+ setChange(0, index2, "100%");
129
+ if (isSemiSelected(e)) {
130
+ setChange(index2, index2 + 1, "50%");
131
+ chooseValue.value = index2 - 0.5;
132
+ } else {
133
+ setChange(index2, index2 + 1, "100%");
134
+ chooseValue.value = index2;
135
+ }
136
+ setChange(index2 + 1, props.count, "0");
137
+ props.onChange && props.onChange(chooseValue.value + 1);
138
+ props.onTouched && props.onTouched();
139
+ ctx.emit("update:modelValue", chooseValue.value + 1);
140
+ };
141
+ return {
142
+ totalLevelArray,
143
+ chooseValue,
144
+ hoverToggle,
145
+ selectValue,
146
+ onMouseleave
147
+ };
148
+ },
149
+ render() {
150
+ const {
151
+ totalLevelArray,
152
+ icon,
153
+ character,
154
+ read,
155
+ type,
156
+ color,
157
+ hoverToggle,
158
+ selectValue,
159
+ onMouseleave
160
+ } = this;
161
+ const ns = useNamespace("rate");
162
+ return createVNode("div", {
163
+ "class": ns.b(),
164
+ "onMouseleave": onMouseleave,
165
+ "style": `--star-color: ${color}`
166
+ }, [totalLevelArray.map((item, index2) => createVNode("div", {
167
+ "class": [ns.m("align"), ns.m("pointer"), read ? ns.m("only-read") : ""],
168
+ "key": index2,
169
+ "onMouseover": (e) => hoverToggle(e, index2),
170
+ "onClick": (e) => selectValue(e, index2)
171
+ }, [icon && !character && createVNode("span", {
172
+ "class": ns.e("color")
173
+ }, [createVNode(resolveComponent("d-icon"), {
174
+ "name": icon
175
+ }, null)]), character && !icon && createVNode("span", {
176
+ "class": ns.e("color")
177
+ }, [character]), !icon && !character && createVNode("span", {
178
+ "class": ns.e("color")
179
+ }, [createVNode("svg", {
180
+ "width": "16px",
181
+ "height": "16px",
182
+ "viewBox": "0 0 16 16",
183
+ "version": "1.1",
184
+ "xmlns": "http://www.w3.org/2000/svg",
185
+ "xmlns-xlink": "http://www.w3.org/1999/xlink"
186
+ }, [createVNode("g", {
187
+ "stroke": "none",
188
+ "stroke-width": "1",
189
+ "fill": "none",
190
+ "fill-rule": "evenodd"
191
+ }, [createVNode("g", {
192
+ "fill": "#E3E5E9",
193
+ "id": "Mask"
194
+ }, [createVNode("polygon", {
195
+ "points": "8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"
196
+ }, null)])])])]), icon && !character && createVNode("span", {
197
+ "class": [ns.e("color-active"), ns.e("active-star"), ns.em("color", type)],
198
+ "style": {
199
+ width: item.width
200
+ }
201
+ }, [createVNode(resolveComponent("d-icon"), {
202
+ "name": icon,
203
+ "color": color
204
+ }, null)]), character && !icon && createVNode("span", {
205
+ "class": [ns.e("color-active"), ns.e("active-star"), ns.em("color", type)],
206
+ "style": {
207
+ color,
208
+ width: item.width
209
+ }
210
+ }, [character]), !character && !icon && createVNode("span", {
211
+ "class": [ns.e("color-active"), ns.e("active-star"), !color ? ns.em("color", type) : ns.em("color", "customize")],
212
+ "style": {
213
+ width: item.width
214
+ }
215
+ }, [createVNode("svg", {
216
+ "width": "16px",
217
+ "height": "16px",
218
+ "viewBox": "0 0 16 16",
219
+ "version": "1.1",
220
+ "xmlns": "http://www.w3.org/2000/svg",
221
+ "xmlns-xlink": "http://www.w3.org/1999/xlink"
222
+ }, [createVNode("g", {
223
+ "stroke": "none",
224
+ "stroke-width": "1",
225
+ "fill": "none",
226
+ "fill-rule": "evenodd"
227
+ }, [createVNode("g", {
228
+ "id": "Mask"
229
+ }, [createVNode("polygon", {
230
+ "points": "8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"
231
+ }, null)])])])])]))]);
232
+ }
233
+ });
234
+ var index = {
235
+ title: "Rate \u8BC4\u5206",
236
+ category: "\u6570\u636E\u5C55\u793A",
237
+ status: "100%",
238
+ install(app) {
239
+ app.component(Rate.name, Rate);
240
+ }
241
+ };
242
+ export { Rate, index as default, rateProps };
@@ -0,0 +1 @@
1
+ (function(d,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(d=typeof globalThis!="undefined"?globalThis:d||self,e(d.index={},d.Vue))})(this,function(d,e){"use strict";const y={modelValue:{type:Number,default:0},read:{type:Boolean,default:!1},count:{type:Number,default:5},type:{type:String,default:""},color:{type:String,default:""},icon:{type:String,default:""},character:{type:String,default:""},allowHalf:{type:Boolean,default:!1},onChange:{type:Function,default:void 0},onTouched:{type:Function,default:void 0}};function g(o,c,a){let r=o;return c&&(r+=`__${c}`),a&&(r+=`--${a}`),r}function p(o,c=!1){const a=c?`.devui-${o}`:`devui-${o}`;return{b:()=>g(a),e:i=>i?g(a,i):"",m:i=>i?g(a,"",i):"",em:(i,h)=>i&&h?g(a,i,h):""}}var k="",m=e.defineComponent({name:"DRate",props:y,emits:["change","update:modelValue"],setup(o,c){const a=e.ref([]),r=e.ref(0),s=(n,t,v)=>{for(let V=n;V<t;V++)a.value[V].width=v},u=()=>{r.value=o.modelValue;const n=r.value%1,t=Math.floor(r.value);s(0,t,"100%"),n>0?(a.value[t].width=n*100+"%",s(t+1,o.count,"0")):s(t,o.count,"0")},f=()=>{a.value=[];for(let n=0;n<o.count;n++)a.value.push({width:"0"})};e.watch([()=>o.modelValue,()=>o.count],()=>{f(),u()}),e.onMounted(()=>{f(),u()});const i=n=>{const t=n.target;return o.allowHalf&&n.offsetX*2<=t.clientWidth};return{totalLevelArray:a,chooseValue:r,hoverToggle:(n,t)=>{if(o.read)return;s(0,t+1,"100%");const v=i(n)?"50%":"100%";s(t,t+1,v),s(t+1,o.count,"0")},selectValue:(n,t)=>{o.read||(s(0,t,"100%"),i(n)?(s(t,t+1,"50%"),r.value=t-.5):(s(t,t+1,"100%"),r.value=t),s(t+1,o.count,"0"),o.onChange&&o.onChange(r.value+1),o.onTouched&&o.onTouched(),c.emit("update:modelValue",r.value+1))},onMouseleave:()=>{u()}}},render(){const{totalLevelArray:o,icon:c,character:a,read:r,type:s,color:u,hoverToggle:f,selectValue:i,onMouseleave:h}=this,l=p("rate");return e.createVNode("div",{class:l.b(),onMouseleave:h,style:`--star-color: ${u}`},[o.map((w,n)=>e.createVNode("div",{class:[l.m("align"),l.m("pointer"),r?l.m("only-read"):""],key:n,onMouseover:t=>f(t,n),onClick:t=>i(t,n)},[c&&!a&&e.createVNode("span",{class:l.e("color")},[e.createVNode(e.resolveComponent("d-icon"),{name:c},null)]),a&&!c&&e.createVNode("span",{class:l.e("color")},[a]),!c&&!a&&e.createVNode("span",{class:l.e("color")},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns-xlink":"http://www.w3.org/1999/xlink"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{fill:"#E3E5E9",id:"Mask"},[e.createVNode("polygon",{points:"8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"},null)])])])]),c&&!a&&e.createVNode("span",{class:[l.e("color-active"),l.e("active-star"),l.em("color",s)],style:{width:w.width}},[e.createVNode(e.resolveComponent("d-icon"),{name:c,color:u},null)]),a&&!c&&e.createVNode("span",{class:[l.e("color-active"),l.e("active-star"),l.em("color",s)],style:{color:u,width:w.width}},[a]),!a&&!c&&e.createVNode("span",{class:[l.e("color-active"),l.e("active-star"),u?l.em("color","customize"):l.em("color",s)],style:{width:w.width}},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns-xlink":"http://www.w3.org/1999/xlink"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{id:"Mask"},[e.createVNode("polygon",{points:"8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"},null)])])])])]))])}}),N={title:"Rate \u8BC4\u5206",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(o){o.component(m.name,m)}};d.Rate=m,d.default=N,d.rateProps=y,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "rate",
3
+ "version": "0.0.0",
4
+ "main": "index.umd.js",
5
+ "module": "index.es.js",
6
+ "style": "style.css"
7
+ }
package/rate/style.css ADDED
@@ -0,0 +1 @@
1
+ .devui-rate--align{font-size:var(--devui-font-size-icon, 16px);margin-right:5px;position:relative;line-height:1}.devui-rate--pointer{cursor:pointer}.devui-rate{display:inline-flex}.devui-rate__color-active{line-height:1.5}.devui-rate__color-active i{color:var(--devui-brand, #5e7ce0)}.devui-rate__color-active svg g{fill:var(--devui-brand, #5e7ce0)}.devui-rate__color--success i{color:#3dcca6}.devui-rate__color--success svg g{fill:#3dcca6}.devui-rate__color--warning i{color:#fac20a}.devui-rate__color--warning svg g{fill:#fac20a}.devui-rate__color--error i{color:#f66f6a}.devui-rate__color--error svg g{fill:#f66f6a}.devui-rate__color--customize{color:var(--star-color)}.devui-rate__color--customize svg g{fill:var(--star-color)}.devui-rate__active-star{position:absolute;top:0;left:0;overflow:hidden}.devui-rate__color{color:var(--devui-shape-icon-fill, #d7d8da);line-height:1.5}.devui-rate__color .icon{color:var(--devui-shape-icon-fill, #d7d8da)!important}.devui-rate__color svg g{fill:var(--devui-shape-icon-fill, #d7d8da)}.devui-rate--only-read{cursor:not-allowed}
@@ -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;
@@ -0,0 +1,248 @@
1
+ import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps } from "vue";
2
+ const resultProps = {
3
+ icon: {
4
+ type: String,
5
+ default: "info"
6
+ },
7
+ title: {
8
+ type: String,
9
+ default: ""
10
+ },
11
+ desc: {
12
+ type: String,
13
+ default: ""
14
+ }
15
+ };
16
+ const DEFAULT_PREFIX = "icon";
17
+ const iconProps = {
18
+ name: {
19
+ type: String,
20
+ default: "",
21
+ required: true
22
+ },
23
+ size: {
24
+ type: [Number, String],
25
+ default: "inherit"
26
+ },
27
+ color: {
28
+ type: String,
29
+ default: "inherit"
30
+ },
31
+ component: {
32
+ type: Object,
33
+ default: null
34
+ },
35
+ classPrefix: {
36
+ type: String,
37
+ default: DEFAULT_PREFIX
38
+ },
39
+ operable: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ disabled: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ rotate: {
48
+ type: [Number, String]
49
+ }
50
+ };
51
+ const svgIconProps = {
52
+ name: {
53
+ type: String,
54
+ default: "",
55
+ required: true
56
+ },
57
+ color: {
58
+ type: String,
59
+ default: "inherit"
60
+ },
61
+ size: {
62
+ type: [Number, String],
63
+ default: "inherit"
64
+ }
65
+ };
66
+ function createBem(namespace, element, modifier) {
67
+ let cls = namespace;
68
+ if (element) {
69
+ cls += `__${element}`;
70
+ }
71
+ if (modifier) {
72
+ cls += `--${modifier}`;
73
+ }
74
+ return cls;
75
+ }
76
+ function useNamespace(block, needDot = false) {
77
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
78
+ const b = () => createBem(namespace);
79
+ const e = (element) => element ? createBem(namespace, element) : "";
80
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
81
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
82
+ return {
83
+ b,
84
+ e,
85
+ m,
86
+ em
87
+ };
88
+ }
89
+ var icon = "";
90
+ var svgIcon = defineComponent({
91
+ name: "DSvgIcon",
92
+ props: svgIconProps,
93
+ setup(props) {
94
+ const {
95
+ name,
96
+ color,
97
+ size
98
+ } = toRefs(props);
99
+ const ns = useNamespace("svg-icon");
100
+ const iconName = computed(() => `#icon-${name.value}`);
101
+ const iconSize = computed(() => {
102
+ return typeof size.value === "number" ? `${size.value}px` : size.value;
103
+ });
104
+ const styles = {
105
+ width: iconSize.value,
106
+ height: iconSize.value
107
+ };
108
+ return () => {
109
+ return createVNode("svg", {
110
+ "class": ns.b(),
111
+ "style": styles
112
+ }, [createVNode("use", {
113
+ "xlink:href": iconName.value,
114
+ "fill": color.value
115
+ }, null)]);
116
+ };
117
+ }
118
+ });
119
+ function isUrl(value) {
120
+ return /^((http|https):)?\/\//.test(value);
121
+ }
122
+ function useIconDom(props, ctx) {
123
+ const {
124
+ component,
125
+ name,
126
+ size,
127
+ color,
128
+ classPrefix,
129
+ rotate
130
+ } = toRefs(props);
131
+ const ns = useNamespace("icon");
132
+ const iconSize = computed(() => {
133
+ return typeof size.value === "number" ? `${size.value}px` : size.value;
134
+ });
135
+ const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
136
+ const imgIconDom = () => {
137
+ return createVNode("img", mergeProps({
138
+ "src": name.value,
139
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
140
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
141
+ "style": {
142
+ width: iconSize.value || "",
143
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
144
+ verticalAlign: "middle"
145
+ }
146
+ }, ctx.attrs), null);
147
+ };
148
+ const svgIconDom = () => {
149
+ return createVNode(IconComponent, mergeProps({
150
+ "name": name.value,
151
+ "color": color.value,
152
+ "size": iconSize.value,
153
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
154
+ "style": {
155
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
156
+ }
157
+ }, ctx.attrs), null);
158
+ };
159
+ const fontIconDom = () => {
160
+ const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
161
+ return createVNode("i", mergeProps({
162
+ "class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
163
+ "style": {
164
+ fontSize: iconSize.value,
165
+ color: color.value,
166
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
167
+ }
168
+ }, ctx.attrs), null);
169
+ };
170
+ const iconDom = () => {
171
+ return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
172
+ };
173
+ return {
174
+ iconDom
175
+ };
176
+ }
177
+ var Icon = defineComponent({
178
+ name: "DIcon",
179
+ props: iconProps,
180
+ emits: ["click"],
181
+ setup(props, ctx) {
182
+ const {
183
+ disabled,
184
+ operable
185
+ } = toRefs(props);
186
+ const {
187
+ iconDom
188
+ } = useIconDom(props, ctx);
189
+ const ns = useNamespace("icon");
190
+ const wrapClassed = computed(() => ({
191
+ [ns.e("container")]: true,
192
+ [ns.m("disabled")]: disabled.value,
193
+ [ns.m("operable")]: operable.value
194
+ }));
195
+ const onClick = (e) => {
196
+ if (disabled.value) {
197
+ return;
198
+ }
199
+ ctx.emit("click", e);
200
+ };
201
+ return () => {
202
+ var _a, _b, _c, _d;
203
+ return createVNode("div", {
204
+ "class": wrapClassed.value,
205
+ "onClick": onClick
206
+ }, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
207
+ };
208
+ }
209
+ });
210
+ var result = "";
211
+ var Result = defineComponent({
212
+ name: "DResult",
213
+ props: resultProps,
214
+ setup(props, ctx) {
215
+ let IconEnum;
216
+ (function(IconEnum2) {
217
+ IconEnum2["success"] = "right-o";
218
+ IconEnum2["danger"] = "error-o";
219
+ IconEnum2["warning"] = "warning-o";
220
+ IconEnum2["info"] = "info-o";
221
+ })(IconEnum || (IconEnum = {}));
222
+ return () => {
223
+ var _a, _b, _c, _d;
224
+ return createVNode("div", {
225
+ "class": "devui-result"
226
+ }, [ctx.slots.icon ? createVNode("div", null, [(_a = ctx.slots) == null ? void 0 : _a.icon()]) : createVNode(Icon, {
227
+ "name": IconEnum[props.icon] || "",
228
+ "class": `devui-result__icon-${props.icon}`,
229
+ "size": "64px"
230
+ }, null), createVNode("div", {
231
+ "class": "devui-result__title"
232
+ }, [ctx.slots.title ? (_b = ctx.slots) == null ? void 0 : _b.title() : props.title]), createVNode("div", {
233
+ "class": "devui-result__desc"
234
+ }, [ctx.slots.desc ? (_c = ctx.slots) == null ? void 0 : _c.desc() : props.desc]), createVNode("div", {
235
+ "class": "devui-result__extra"
236
+ }, [ctx.slots.extra ? (_d = ctx.slots) == null ? void 0 : _d.extra() : ""])]);
237
+ };
238
+ }
239
+ });
240
+ var index = {
241
+ title: "Result \u7ED3\u679C",
242
+ category: "\u53CD\u9988",
243
+ status: "100%",
244
+ install(app) {
245
+ app.component(Result.name, Result);
246
+ }
247
+ };
248
+ export { Result, index as default, resultProps };
@@ -0,0 +1 @@
1
+ (function(c,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(c=typeof globalThis!="undefined"?globalThis:c||self,e(c.index={},c.Vue))})(this,function(c,e){"use strict";const y={icon:{type:String,default:"info"},title:{type:String,default:""},desc:{type:String,default:""}},N={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]}},S={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function f(o,s,l){let n=o;return s&&(n+=`__${s}`),l&&(n+=`--${l}`),n}function v(o,s=!1){const l=s?`.devui-${o}`:`devui-${o}`;return{b:()=>f(l),e:t=>t?f(l,t):"",m:t=>t?f(l,"",t):"",em:(t,u)=>t&&u?f(l,t,u):""}}var z="",b=e.defineComponent({name:"DSvgIcon",props:S,setup(o){const{name:s,color:l,size:n}=e.toRefs(o),r=v("svg-icon"),i=e.computed(()=>`#icon-${s.value}`),a=e.computed(()=>typeof n.value=="number"?`${n.value}px`:n.value),t={width:a.value,height:a.value};return()=>e.createVNode("svg",{class:r.b(),style:t},[e.createVNode("use",{"xlink:href":i.value,fill:l.value},null)])}});function h(o){return/^((http|https):)?\/\//.test(o)}function D(o,s){const{component:l,name:n,size:r,color:i,classPrefix:a,rotate:t}=e.toRefs(o),u=v("icon"),d=e.computed(()=>typeof r.value=="number"?`${r.value}px`:r.value),p=l.value?e.resolveDynamicComponent(l.value):e.resolveDynamicComponent(b),m=()=>e.createVNode("img",e.mergeProps({src:n.value,alt:n.value.split("/")[n.value.split("/").length-1],class:[(t==null?void 0:t.value)==="infinite"&&u.m("spin")],style:{width:d.value||"",transform:`rotate(${t==null?void 0:t.value}deg)`,verticalAlign:"middle"}},s.attrs),null),$=()=>e.createVNode(p,e.mergeProps({name:n.value,color:i.value,size:d.value,class:[(t==null?void 0:t.value)==="infinite"&&u.m("spin")],style:{transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null),C=()=>{const P=/^icon-/.test(n.value)?n.value:`${a.value}-${n.value}`;return e.createVNode("i",e.mergeProps({class:[a.value,P,(t==null?void 0:t.value)==="infinite"&&u.m("spin")],style:{fontSize:d.value,color:i.value,transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null)};return{iconDom:()=>l.value?$():h(n.value)?m():C()}}var _=e.defineComponent({name:"DIcon",props:N,emits:["click"],setup(o,s){const{disabled:l,operable:n}=e.toRefs(o),{iconDom:r}=D(o,s),i=v("icon"),a=e.computed(()=>({[i.e("container")]:!0,[i.m("disabled")]:l.value,[i.m("operable")]:n.value})),t=u=>{l.value||s.emit("click",u)};return()=>{var u,d,p,m;return e.createVNode("div",{class:a.value,onClick:t},[(d=(u=s.slots).prefix)==null?void 0:d.call(u),r(),(m=(p=s.slots).suffix)==null?void 0:m.call(p)])}}}),R="",g=e.defineComponent({name:"DResult",props:y,setup(o,s){let l;return function(n){n.success="right-o",n.danger="error-o",n.warning="warning-o",n.info="info-o"}(l||(l={})),()=>{var n,r,i,a;return e.createVNode("div",{class:"devui-result"},[s.slots.icon?e.createVNode("div",null,[(n=s.slots)==null?void 0:n.icon()]):e.createVNode(_,{name:l[o.icon]||"",class:`devui-result__icon-${o.icon}`,size:"64px"},null),e.createVNode("div",{class:"devui-result__title"},[s.slots.title?(r=s.slots)==null?void 0:r.title():o.title]),e.createVNode("div",{class:"devui-result__desc"},[s.slots.desc?(i=s.slots)==null?void 0:i.desc():o.desc]),e.createVNode("div",{class:"devui-result__extra"},[s.slots.extra?(a=s.slots)==null?void 0:a.extra():""])])}}}),V={title:"Result \u7ED3\u679C",category:"\u53CD\u9988",status:"100%",install(o){o.component(g.name,g)}};c.Result=g,c.default=V,c.resultProps=y,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "result",
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-result{display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;box-sizing:border-box;padding:30px}.devui-result__icon-success:before{color:var(--devui-success, #50d4ab)}.devui-result__icon-danger:before{color:var(--devui-danger, #f66f6a)}.devui-result__icon-warning:before{color:var(--devui-warning, #fac20a)}.devui-result__icon-info:before{color:var(--devui-info, #5e7ce0)}.devui-result__title{margin-top:20px;color:var(--devui-text, #252b3a);font-size:var(--devui-font-size-lg, 14px)}.devui-result__desc{margin-top:10px;color:var(--devui-text-weak, #575d6c);font-size:var(--devui-font-size-md, 14px)}.devui-result__extra{margin-top:30px}
@@ -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;