vue-devui 1.0.0-beta.2 → 1.0.0-beta.20220808

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 (455) hide show
  1. package/README.md +163 -172
  2. package/alert/index.d.ts +7 -0
  3. package/alert/index.es.js +79 -51
  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 +9053 -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 +154 -147
  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 +46 -21
  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 +5921 -146
  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 +64 -36
  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 +8122 -255
  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/{cascader → 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 +12035 -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 +205 -154
  48. package/drawer/index.umd.js +1 -1
  49. package/drawer/style.css +1 -1
  50. package/dropdown/index.d.ts +7 -0
  51. package/dropdown/index.es.js +736 -0
  52. package/dropdown/index.umd.js +1 -0
  53. package/{carousel → dropdown}/package.json +1 -1
  54. package/dropdown/style.css +1 -0
  55. package/editable-select/index.d.ts +7 -0
  56. package/editable-select/index.es.js +908 -461
  57. package/editable-select/index.umd.js +1 -1
  58. package/editable-select/style.css +1 -1
  59. package/form/index.d.ts +7 -0
  60. package/form/index.es.js +2439 -1995
  61. package/form/index.umd.js +29 -18
  62. package/form/style.css +1 -1
  63. package/fullscreen/index.d.ts +7 -0
  64. package/fullscreen/index.es.js +138 -125
  65. package/fullscreen/index.umd.js +1 -1
  66. package/fullscreen/style.css +1 -1
  67. package/grid/index.d.ts +7 -0
  68. package/grid/index.es.js +271 -0
  69. package/grid/index.umd.js +1 -0
  70. package/{toast → grid}/package.json +1 -1
  71. package/grid/style.css +1 -0
  72. package/icon/index.d.ts +7 -0
  73. package/icon/index.es.js +200 -56
  74. package/icon/index.umd.js +1 -1
  75. package/icon/style.css +1 -0
  76. package/image-preview/index.d.ts +7 -0
  77. package/image-preview/index.es.js +154 -62
  78. package/image-preview/index.umd.js +1 -1
  79. package/image-preview/style.css +1 -1
  80. package/index.d.ts +7 -0
  81. package/input/index.d.ts +7 -0
  82. package/input/index.es.js +8269 -145
  83. package/input/index.umd.js +38 -1
  84. package/input/style.css +1 -1
  85. package/input-number/index.d.ts +7 -0
  86. package/input-number/index.es.js +260 -191
  87. package/input-number/index.umd.js +1 -1
  88. package/input-number/style.css +1 -1
  89. package/layout/index.d.ts +7 -0
  90. package/layout/index.es.js +41 -26
  91. package/layout/index.umd.js +1 -1
  92. package/layout/style.css +1 -1
  93. package/loading/index.d.ts +7 -0
  94. package/loading/index.es.js +89 -73
  95. package/loading/index.umd.js +1 -1
  96. package/loading/style.css +1 -1
  97. package/mention/index.d.ts +7 -0
  98. package/mention/index.es.js +8326 -0
  99. package/mention/index.umd.js +47 -0
  100. package/mention/package.json +7 -0
  101. package/mention/style.css +1 -0
  102. package/menu/index.d.ts +7 -0
  103. package/menu/index.es.js +891 -0
  104. package/menu/index.umd.js +1 -0
  105. package/{anchor → menu}/package.json +1 -1
  106. package/menu/style.css +1 -0
  107. package/message/index.d.ts +7 -0
  108. package/message/index.es.js +533 -0
  109. package/message/index.umd.js +1 -0
  110. package/message/package.json +7 -0
  111. package/message/style.css +1 -0
  112. package/modal/index.d.ts +7 -0
  113. package/modal/index.es.js +611 -877
  114. package/modal/index.umd.js +1 -1
  115. package/modal/style.css +1 -1
  116. package/notification/index.d.ts +7 -0
  117. package/notification/index.es.js +528 -0
  118. package/notification/index.umd.js +1 -0
  119. package/notification/package.json +7 -0
  120. package/notification/style.css +1 -0
  121. package/nuxt/components/Alert.js +3 -0
  122. package/nuxt/components/Aside.js +3 -0
  123. package/nuxt/components/AutoComplete.js +3 -0
  124. package/nuxt/components/Avatar.js +3 -0
  125. package/nuxt/components/Badge.js +3 -0
  126. package/nuxt/components/Button.js +3 -0
  127. package/nuxt/components/ButtonGroup.js +3 -0
  128. package/nuxt/components/Card.js +3 -0
  129. package/nuxt/components/Checkbox.js +3 -0
  130. package/nuxt/components/CheckboxButton.js +3 -0
  131. package/nuxt/components/CheckboxGroup.js +3 -0
  132. package/nuxt/components/Col.js +3 -0
  133. package/nuxt/components/Collapse.js +3 -0
  134. package/nuxt/components/CollapseItem.js +3 -0
  135. package/nuxt/components/Column.js +3 -0
  136. package/nuxt/components/Content.js +3 -0
  137. package/nuxt/components/Countdown.js +3 -0
  138. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  139. package/nuxt/components/DatePickerPro.js +3 -0
  140. package/nuxt/components/Drawer.js +3 -0
  141. package/nuxt/components/DrawerService.js +3 -0
  142. package/nuxt/components/Dropdown.js +3 -0
  143. package/nuxt/components/DropdownMenu.js +3 -0
  144. package/nuxt/components/DropdownPropsKey.js +3 -0
  145. package/nuxt/components/EditableSelect.js +3 -0
  146. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  147. package/nuxt/components/FORM_TOKEN.js +3 -0
  148. package/nuxt/components/FixedOverlay.js +3 -0
  149. package/nuxt/components/FlexibleOverlay.js +3 -0
  150. package/nuxt/components/Footer.js +3 -0
  151. package/nuxt/components/Form.js +3 -0
  152. package/nuxt/components/FormItem.js +3 -0
  153. package/nuxt/components/FormOperation.js +3 -0
  154. package/nuxt/components/Fullscreen.js +3 -0
  155. package/nuxt/components/Header.js +3 -0
  156. package/nuxt/components/IFileOptions.js +3 -0
  157. package/nuxt/components/IUploadOptions.js +3 -0
  158. package/nuxt/components/Icon.js +3 -0
  159. package/nuxt/components/IconGroup.js +3 -0
  160. package/nuxt/components/ImagePreviewService.js +3 -0
  161. package/nuxt/components/Input.js +3 -0
  162. package/nuxt/components/InputNumber.js +3 -0
  163. package/nuxt/components/LABEL_DATA.js +3 -0
  164. package/nuxt/components/Layout.js +3 -0
  165. package/nuxt/components/Loading.js +3 -0
  166. package/nuxt/components/LoadingOptions.js +3 -0
  167. package/nuxt/components/LoadingService.js +3 -0
  168. package/nuxt/components/Mention.js +3 -0
  169. package/nuxt/components/Menu.js +3 -0
  170. package/nuxt/components/MenuItem.js +3 -0
  171. package/nuxt/components/Message.js +3 -0
  172. package/nuxt/components/Modal.js +3 -0
  173. package/nuxt/components/Notification.js +3 -0
  174. package/nuxt/components/NotificationService.js +3 -0
  175. package/nuxt/components/Option.js +3 -0
  176. package/nuxt/components/OptionGroup.js +3 -0
  177. package/nuxt/components/Pagination.js +3 -0
  178. package/nuxt/components/Panel.js +3 -0
  179. package/nuxt/components/PanelBody.js +3 -0
  180. package/nuxt/components/PanelFooter.js +3 -0
  181. package/nuxt/components/PanelHeader.js +3 -0
  182. package/nuxt/components/Popover.js +3 -0
  183. package/nuxt/components/Progress.js +3 -0
  184. package/nuxt/components/Radio.js +3 -0
  185. package/nuxt/components/RadioButton.js +3 -0
  186. package/nuxt/components/RadioGroup.js +3 -0
  187. package/nuxt/components/Rate.js +3 -0
  188. package/nuxt/components/Result.js +3 -0
  189. package/nuxt/components/Row.js +3 -0
  190. package/nuxt/components/Search.js +3 -0
  191. package/nuxt/components/Select.js +3 -0
  192. package/nuxt/components/Skeleton.js +3 -0
  193. package/nuxt/components/SkeletonItem.js +3 -0
  194. package/nuxt/components/Slider.js +3 -0
  195. package/nuxt/components/Splitter.js +3 -0
  196. package/nuxt/components/Statistic.js +3 -0
  197. package/nuxt/components/Status.js +3 -0
  198. package/nuxt/components/Step.js +3 -0
  199. package/nuxt/components/Steps.js +3 -0
  200. package/nuxt/components/SubMenu.js +3 -0
  201. package/nuxt/components/Switch.js +3 -0
  202. package/nuxt/components/TABLE_TOKEN.js +3 -0
  203. package/nuxt/components/Tab.js +3 -0
  204. package/nuxt/components/Table.js +3 -0
  205. package/nuxt/components/Tabs.js +3 -0
  206. package/nuxt/components/Tag.js +3 -0
  207. package/nuxt/components/Textarea.js +3 -0
  208. package/nuxt/components/TimePicker.js +3 -0
  209. package/nuxt/components/TimeSelect.js +3 -0
  210. package/nuxt/components/Timeline.js +3 -0
  211. package/nuxt/components/TimelineItem.js +3 -0
  212. package/nuxt/components/Tooltip.js +3 -0
  213. package/nuxt/components/Tree.js +3 -0
  214. package/nuxt/components/Upload.js +3 -0
  215. package/nuxt/components/UploadStatus.js +3 -0
  216. package/nuxt/components/alertProps.js +3 -0
  217. package/nuxt/components/animationInjectionKey.js +3 -0
  218. package/nuxt/components/autoCompleteProps.js +3 -0
  219. package/nuxt/components/avatarProps.js +3 -0
  220. package/nuxt/components/badgeProps.js +3 -0
  221. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  222. package/nuxt/components/buttonGroupProps.js +3 -0
  223. package/nuxt/components/buttonProps.js +3 -0
  224. package/nuxt/components/cardProps.js +3 -0
  225. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  226. package/nuxt/components/checkboxGroupProps.js +3 -0
  227. package/nuxt/components/checkboxProps.js +3 -0
  228. package/nuxt/components/colProps.js +3 -0
  229. package/nuxt/components/colPropsBaseClass.js +3 -0
  230. package/nuxt/components/colPropsBaseStyle.js +3 -0
  231. package/nuxt/components/collapseItemProps.js +3 -0
  232. package/nuxt/components/collapseProps.js +3 -0
  233. package/nuxt/components/countdownProps.js +3 -0
  234. package/nuxt/components/datePickerProCommonProps.js +3 -0
  235. package/nuxt/components/datePickerProPanelProps.js +3 -0
  236. package/nuxt/components/datePickerProProps.js +3 -0
  237. package/nuxt/components/dropdownMenuProps.js +3 -0
  238. package/nuxt/components/editableSelectProps.js +3 -0
  239. package/nuxt/components/fixedOverlayProps.js +3 -0
  240. package/nuxt/components/flexibleOverlayProps.js +3 -0
  241. package/nuxt/components/formItemProps.js +3 -0
  242. package/nuxt/components/formProps.js +3 -0
  243. package/nuxt/components/fullscreenProps.js +3 -0
  244. package/nuxt/components/iconProps.js +3 -0
  245. package/nuxt/components/imagePreviewProps.js +3 -0
  246. package/nuxt/components/inputProps.js +3 -0
  247. package/nuxt/components/loadingProps.js +3 -0
  248. package/nuxt/components/mentionProps.js +3 -0
  249. package/nuxt/components/messageProps.js +3 -0
  250. package/nuxt/components/modalProps.js +3 -0
  251. package/nuxt/components/notificationProps.js +3 -0
  252. package/nuxt/components/paginationProps.js +3 -0
  253. package/nuxt/components/panelProps.js +3 -0
  254. package/nuxt/components/popoverProps.js +3 -0
  255. package/nuxt/components/progressProps.js +3 -0
  256. package/nuxt/components/rateProps.js +3 -0
  257. package/nuxt/components/resultProps.js +3 -0
  258. package/nuxt/components/roundInjectionKey.js +3 -0
  259. package/nuxt/components/rowProps.js +3 -0
  260. package/nuxt/components/screenSizes.js +3 -0
  261. package/nuxt/components/searchProps.js +3 -0
  262. package/nuxt/components/skeletonItemProps.js +3 -0
  263. package/nuxt/components/skeletonProps.js +3 -0
  264. package/nuxt/components/sliderProps.js +3 -0
  265. package/nuxt/components/splitterProps.js +3 -0
  266. package/nuxt/components/statisticProps.js +3 -0
  267. package/nuxt/components/stepProps.js +3 -0
  268. package/nuxt/components/stepsProps.js +3 -0
  269. package/nuxt/components/svgIconProps.js +3 -0
  270. package/nuxt/components/switchProps.js +3 -0
  271. package/nuxt/components/tableProps.js +3 -0
  272. package/nuxt/components/tabsProps.js +3 -0
  273. package/nuxt/components/tagProps.js +3 -0
  274. package/nuxt/components/textareaProps.js +3 -0
  275. package/nuxt/components/timeAxisProps.js +3 -0
  276. package/nuxt/components/timerPickerPanelProps.js +3 -0
  277. package/nuxt/components/tooltipProps.js +3 -0
  278. package/nuxt/components/treeNodeProps.js +3 -0
  279. package/nuxt/components/treeProps.js +3 -0
  280. package/nuxt/components/uploadProps.js +3 -0
  281. package/nuxt/index.js +13 -0
  282. package/overlay/index.d.ts +7 -0
  283. package/overlay/index.es.js +245 -303
  284. package/overlay/index.umd.js +1 -1
  285. package/overlay/style.css +1 -1
  286. package/package.json +16 -84
  287. package/pagination/index.d.ts +7 -0
  288. package/pagination/index.es.js +333 -155
  289. package/pagination/index.umd.js +1 -1
  290. package/pagination/style.css +1 -1
  291. package/panel/index.d.ts +7 -0
  292. package/panel/index.es.js +48 -35
  293. package/panel/index.umd.js +1 -1
  294. package/panel/style.css +1 -1
  295. package/popover/index.d.ts +7 -0
  296. package/popover/index.es.js +6035 -204
  297. package/popover/index.umd.js +27 -1
  298. package/popover/style.css +1 -1
  299. package/progress/index.d.ts +7 -0
  300. package/progress/index.es.js +111 -57
  301. package/progress/index.umd.js +3 -3
  302. package/progress/style.css +1 -1
  303. package/radio/index.d.ts +7 -0
  304. package/radio/index.es.js +8015 -182
  305. package/radio/index.umd.js +38 -1
  306. package/radio/style.css +1 -1
  307. package/rate/index.d.ts +7 -0
  308. package/rate/index.es.js +78 -56
  309. package/rate/index.umd.js +1 -1
  310. package/rate/style.css +1 -1
  311. package/result/index.d.ts +7 -0
  312. package/result/index.es.js +248 -0
  313. package/result/index.umd.js +1 -0
  314. package/{sticky → result}/package.json +1 -1
  315. package/result/style.css +1 -0
  316. package/ripple/index.d.ts +7 -0
  317. package/ripple/index.es.js +56 -61
  318. package/ripple/index.umd.js +1 -1
  319. package/search/index.d.ts +7 -0
  320. package/search/index.es.js +8381 -406
  321. package/search/index.umd.js +38 -1
  322. package/search/style.css +1 -1
  323. package/select/index.d.ts +7 -0
  324. package/select/index.es.js +9331 -576
  325. package/select/index.umd.js +38 -1
  326. package/select/style.css +1 -1
  327. package/skeleton/index.d.ts +7 -0
  328. package/skeleton/index.es.js +115 -145
  329. package/skeleton/index.umd.js +1 -1
  330. package/skeleton/style.css +1 -1
  331. package/slider/index.d.ts +7 -0
  332. package/slider/index.es.js +148 -142
  333. package/slider/index.umd.js +1 -1
  334. package/slider/style.css +1 -1
  335. package/splitter/index.d.ts +7 -0
  336. package/splitter/index.es.js +6308 -181
  337. package/splitter/index.umd.js +27 -1
  338. package/splitter/style.css +1 -1
  339. package/statistic/index.d.ts +7 -0
  340. package/statistic/index.es.js +253 -0
  341. package/statistic/index.umd.js +1 -0
  342. package/statistic/package.json +7 -0
  343. package/statistic/style.css +1 -0
  344. package/status/index.d.ts +7 -0
  345. package/status/index.es.js +29 -8
  346. package/status/index.umd.js +1 -1
  347. package/status/style.css +1 -1
  348. package/steps/index.d.ts +7 -0
  349. package/steps/index.es.js +386 -0
  350. package/steps/index.umd.js +1 -0
  351. package/steps/package.json +7 -0
  352. package/steps/style.css +1 -0
  353. package/style.css +1 -1
  354. package/switch/index.d.ts +7 -0
  355. package/switch/index.es.js +7819 -65
  356. package/switch/index.umd.js +38 -1
  357. package/switch/style.css +1 -1
  358. package/table/index.d.ts +7 -0
  359. package/table/index.es.js +11435 -204
  360. package/table/index.umd.js +38 -1
  361. package/table/style.css +1 -1
  362. package/tabs/index.d.ts +7 -0
  363. package/tabs/index.es.js +356 -143
  364. package/tabs/index.umd.js +1 -1
  365. package/tabs/style.css +1 -1
  366. package/tag/index.d.ts +7 -0
  367. package/tag/index.es.js +156 -0
  368. package/tag/index.umd.js +1 -0
  369. package/tag/package.json +7 -0
  370. package/tag/style.css +1 -0
  371. package/textarea/index.d.ts +7 -0
  372. package/textarea/index.es.js +7989 -0
  373. package/textarea/index.umd.js +46 -0
  374. package/textarea/package.json +7 -0
  375. package/textarea/style.css +1 -0
  376. package/{theme → theme/theme.scss} +0 -0
  377. package/time-picker/index.d.ts +7 -0
  378. package/time-picker/index.es.js +9126 -597
  379. package/time-picker/index.umd.js +38 -1
  380. package/time-picker/style.css +1 -1
  381. package/time-select/index.d.ts +7 -0
  382. package/time-select/index.es.js +9606 -0
  383. package/time-select/index.umd.js +38 -0
  384. package/{breadcrumb → time-select}/package.json +1 -1
  385. package/time-select/style.css +1 -0
  386. package/timeline/index.d.ts +7 -0
  387. package/timeline/index.es.js +427 -0
  388. package/timeline/index.umd.js +1 -0
  389. package/timeline/package.json +7 -0
  390. package/timeline/style.css +1 -0
  391. package/tooltip/index.d.ts +7 -0
  392. package/tooltip/index.es.js +5870 -141
  393. package/tooltip/index.umd.js +27 -1
  394. package/tooltip/style.css +1 -1
  395. package/tree/index.d.ts +7 -0
  396. package/tree/index.es.js +11504 -692
  397. package/tree/index.umd.js +38 -1
  398. package/tree/style.css +1 -1
  399. package/upload/index.d.ts +7 -0
  400. package/upload/index.es.js +968 -2748
  401. package/upload/index.umd.js +1 -1
  402. package/upload/style.css +1 -1
  403. package/vue-devui.es.js +22816 -16568
  404. package/vue-devui.umd.js +42 -20
  405. package/accordion/index.es.js +0 -190
  406. package/accordion/index.umd.js +0 -1
  407. package/accordion/style.css +0 -1
  408. package/anchor/index.es.js +0 -263
  409. package/anchor/index.umd.js +0 -1
  410. package/anchor/style.css +0 -1
  411. package/breadcrumb/index.es.js +0 -127
  412. package/breadcrumb/index.umd.js +0 -1
  413. package/breadcrumb/style.css +0 -1
  414. package/carousel/index.es.js +0 -328
  415. package/carousel/index.umd.js +0 -1
  416. package/carousel/style.css +0 -1
  417. package/cascader/index.es.js +0 -187
  418. package/cascader/index.umd.js +0 -1
  419. package/cascader/style.css +0 -1
  420. package/date-picker/index.es.js +0 -1171
  421. package/date-picker/index.umd.js +0 -1
  422. package/date-picker/package.json +0 -7
  423. package/date-picker/style.css +0 -1
  424. package/nav-sprite/index.es.js +0 -742
  425. package/nav-sprite/index.umd.js +0 -1
  426. package/nav-sprite/package.json +0 -7
  427. package/quadrant-diagram/index.es.js +0 -489
  428. package/quadrant-diagram/index.umd.js +0 -1
  429. package/quadrant-diagram/package.json +0 -7
  430. package/quadrant-diagram/style.css +0 -1
  431. package/steps-guide/index.es.js +0 -211
  432. package/steps-guide/index.umd.js +0 -1
  433. package/steps-guide/package.json +0 -7
  434. package/steps-guide/style.css +0 -1
  435. package/sticky/index.es.js +0 -197
  436. package/sticky/index.umd.js +0 -1
  437. package/tag-input/index.es.js +0 -341
  438. package/tag-input/index.umd.js +0 -1
  439. package/tag-input/package.json +0 -7
  440. package/tag-input/style.css +0 -1
  441. package/time-axis/index.es.js +0 -79
  442. package/time-axis/index.umd.js +0 -1
  443. package/time-axis/package.json +0 -7
  444. package/time-axis/style.css +0 -1
  445. package/toast/index.es.js +0 -2059
  446. package/toast/index.umd.js +0 -1
  447. package/toast/style.css +0 -1
  448. package/transfer/index.es.js +0 -1446
  449. package/transfer/index.umd.js +0 -1
  450. package/transfer/package.json +0 -7
  451. package/transfer/style.css +0 -1
  452. package/tree-select/index.es.js +0 -203
  453. package/tree-select/index.umd.js +0 -1
  454. package/tree-select/package.json +0 -7
  455. package/tree-select/style.css +0 -1
@@ -1,742 +0,0 @@
1
- const EMPTY_OBJ = {};
2
- const NOOP = () => {
3
- };
4
- const extend = Object.assign;
5
- const remove = (arr, el) => {
6
- const i = arr.indexOf(el);
7
- if (i > -1) {
8
- arr.splice(i, 1);
9
- }
10
- };
11
- const isArray = Array.isArray;
12
- const isMap = (val) => toTypeString(val) === "[object Map]";
13
- const isSet = (val) => toTypeString(val) === "[object Set]";
14
- const isFunction = (val) => typeof val === "function";
15
- const isString = (val) => typeof val === "string";
16
- const isSymbol = (val) => typeof val === "symbol";
17
- const isObject = (val) => val !== null && typeof val === "object";
18
- const isPromise = (val) => {
19
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
20
- };
21
- const objectToString = Object.prototype.toString;
22
- const toTypeString = (value) => objectToString.call(value);
23
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
24
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
25
- const def = (obj, key, value) => {
26
- Object.defineProperty(obj, key, {
27
- configurable: true,
28
- enumerable: false,
29
- value
30
- });
31
- };
32
- let activeEffectScope;
33
- function recordEffectScope(effect, scope) {
34
- scope = scope || activeEffectScope;
35
- if (scope && scope.active) {
36
- scope.effects.push(effect);
37
- }
38
- }
39
- const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
40
- const newTracked = (dep) => (dep.n & trackOpBit) > 0;
41
- const initDepMarkers = ({ deps }) => {
42
- if (deps.length) {
43
- for (let i = 0; i < deps.length; i++) {
44
- deps[i].w |= trackOpBit;
45
- }
46
- }
47
- };
48
- const finalizeDepMarkers = (effect) => {
49
- const { deps } = effect;
50
- if (deps.length) {
51
- let ptr = 0;
52
- for (let i = 0; i < deps.length; i++) {
53
- const dep = deps[i];
54
- if (wasTracked(dep) && !newTracked(dep)) {
55
- dep.delete(effect);
56
- } else {
57
- deps[ptr++] = dep;
58
- }
59
- dep.w &= ~trackOpBit;
60
- dep.n &= ~trackOpBit;
61
- }
62
- deps.length = ptr;
63
- }
64
- };
65
- let effectTrackDepth = 0;
66
- let trackOpBit = 1;
67
- const maxMarkerBits = 30;
68
- const effectStack = [];
69
- let activeEffect;
70
- class ReactiveEffect {
71
- constructor(fn, scheduler = null, scope) {
72
- this.fn = fn;
73
- this.scheduler = scheduler;
74
- this.active = true;
75
- this.deps = [];
76
- recordEffectScope(this, scope);
77
- }
78
- run() {
79
- if (!this.active) {
80
- return this.fn();
81
- }
82
- if (!effectStack.includes(this)) {
83
- try {
84
- effectStack.push(activeEffect = this);
85
- enableTracking();
86
- trackOpBit = 1 << ++effectTrackDepth;
87
- if (effectTrackDepth <= maxMarkerBits) {
88
- initDepMarkers(this);
89
- } else {
90
- cleanupEffect(this);
91
- }
92
- return this.fn();
93
- } finally {
94
- if (effectTrackDepth <= maxMarkerBits) {
95
- finalizeDepMarkers(this);
96
- }
97
- trackOpBit = 1 << --effectTrackDepth;
98
- resetTracking();
99
- effectStack.pop();
100
- const n = effectStack.length;
101
- activeEffect = n > 0 ? effectStack[n - 1] : void 0;
102
- }
103
- }
104
- }
105
- stop() {
106
- if (this.active) {
107
- cleanupEffect(this);
108
- if (this.onStop) {
109
- this.onStop();
110
- }
111
- this.active = false;
112
- }
113
- }
114
- }
115
- function cleanupEffect(effect) {
116
- const { deps } = effect;
117
- if (deps.length) {
118
- for (let i = 0; i < deps.length; i++) {
119
- deps[i].delete(effect);
120
- }
121
- deps.length = 0;
122
- }
123
- }
124
- let shouldTrack = true;
125
- const trackStack = [];
126
- function enableTracking() {
127
- trackStack.push(shouldTrack);
128
- shouldTrack = true;
129
- }
130
- function resetTracking() {
131
- const last = trackStack.pop();
132
- shouldTrack = last === void 0 ? true : last;
133
- }
134
- new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol));
135
- function isReactive(value) {
136
- if (isReadonly(value)) {
137
- return isReactive(value["__v_raw"]);
138
- }
139
- return !!(value && value["__v_isReactive"]);
140
- }
141
- function isReadonly(value) {
142
- return !!(value && value["__v_isReadonly"]);
143
- }
144
- function markRaw(value) {
145
- def(value, "__v_skip", true);
146
- return value;
147
- }
148
- function isRef(r) {
149
- return Boolean(r && r.__v_isRef === true);
150
- }
151
- function unref(ref) {
152
- return isRef(ref) ? ref.value : ref;
153
- }
154
- const shallowUnwrapHandlers = {
155
- get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
156
- set: (target, key, value, receiver) => {
157
- const oldValue = target[key];
158
- if (isRef(oldValue) && !isRef(value)) {
159
- oldValue.value = value;
160
- return true;
161
- } else {
162
- return Reflect.set(target, key, value, receiver);
163
- }
164
- }
165
- };
166
- function proxyRefs(objectWithRefs) {
167
- return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
168
- }
169
- Promise.resolve();
170
- function queueEffectWithSuspense(fn, suspense) {
171
- if (suspense && suspense.pendingBranch) {
172
- if (isArray(fn)) {
173
- suspense.effects.push(...fn);
174
- } else {
175
- suspense.effects.push(fn);
176
- }
177
- } else {
178
- queuePostFlushCb(fn);
179
- }
180
- }
181
- function defineComponent(options) {
182
- return isFunction(options) ? { setup: options, name: options.name } : options;
183
- }
184
- function resolveMergedOptions(instance) {
185
- const base = instance.type;
186
- const { mixins, extends: extendsOptions } = base;
187
- const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
188
- const cached = cache.get(base);
189
- let resolved;
190
- if (cached) {
191
- resolved = cached;
192
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
193
- {
194
- resolved = base;
195
- }
196
- } else {
197
- resolved = {};
198
- if (globalMixins.length) {
199
- globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
200
- }
201
- mergeOptions(resolved, base, optionMergeStrategies);
202
- }
203
- cache.set(base, resolved);
204
- return resolved;
205
- }
206
- function mergeOptions(to, from, strats, asMixin = false) {
207
- const { mixins, extends: extendsOptions } = from;
208
- if (extendsOptions) {
209
- mergeOptions(to, extendsOptions, strats, true);
210
- }
211
- if (mixins) {
212
- mixins.forEach((m) => mergeOptions(to, m, strats, true));
213
- }
214
- for (const key in from) {
215
- if (asMixin && key === "expose")
216
- ;
217
- else {
218
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
219
- to[key] = strat ? strat(to[key], from[key]) : from[key];
220
- }
221
- }
222
- return to;
223
- }
224
- const internalOptionMergeStrats = {
225
- data: mergeDataFn,
226
- props: mergeObjectOptions,
227
- emits: mergeObjectOptions,
228
- methods: mergeObjectOptions,
229
- computed: mergeObjectOptions,
230
- beforeCreate: mergeAsArray,
231
- created: mergeAsArray,
232
- beforeMount: mergeAsArray,
233
- mounted: mergeAsArray,
234
- beforeUpdate: mergeAsArray,
235
- updated: mergeAsArray,
236
- beforeDestroy: mergeAsArray,
237
- beforeUnmount: mergeAsArray,
238
- destroyed: mergeAsArray,
239
- unmounted: mergeAsArray,
240
- activated: mergeAsArray,
241
- deactivated: mergeAsArray,
242
- errorCaptured: mergeAsArray,
243
- serverPrefetch: mergeAsArray,
244
- components: mergeObjectOptions,
245
- directives: mergeObjectOptions,
246
- watch: mergeWatchOptions,
247
- provide: mergeDataFn,
248
- inject: mergeInject
249
- };
250
- function mergeDataFn(to, from) {
251
- if (!from) {
252
- return to;
253
- }
254
- if (!to) {
255
- return from;
256
- }
257
- return function mergedDataFn() {
258
- return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
259
- };
260
- }
261
- function mergeInject(to, from) {
262
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
263
- }
264
- function normalizeInject(raw) {
265
- if (isArray(raw)) {
266
- const res = {};
267
- for (let i = 0; i < raw.length; i++) {
268
- res[raw[i]] = raw[i];
269
- }
270
- return res;
271
- }
272
- return raw;
273
- }
274
- function mergeAsArray(to, from) {
275
- return to ? [...new Set([].concat(to, from))] : from;
276
- }
277
- function mergeObjectOptions(to, from) {
278
- return to ? extend(extend(Object.create(null), to), from) : from;
279
- }
280
- function mergeWatchOptions(to, from) {
281
- if (!to)
282
- return from;
283
- if (!from)
284
- return to;
285
- const merged = extend(Object.create(null), to);
286
- for (const key in from) {
287
- merged[key] = mergeAsArray(to[key], from[key]);
288
- }
289
- return merged;
290
- }
291
- const queuePostRenderEffect = queueEffectWithSuspense;
292
- const getPublicInstance = (i) => {
293
- if (!i)
294
- return null;
295
- if (isStatefulComponent(i))
296
- return getExposeProxy(i) || i.proxy;
297
- return getPublicInstance(i.parent);
298
- };
299
- const publicPropertiesMap = extend(Object.create(null), {
300
- $: (i) => i,
301
- $el: (i) => i.vnode.el,
302
- $data: (i) => i.data,
303
- $props: (i) => i.props,
304
- $attrs: (i) => i.attrs,
305
- $slots: (i) => i.slots,
306
- $refs: (i) => i.refs,
307
- $parent: (i) => getPublicInstance(i.parent),
308
- $root: (i) => getPublicInstance(i.root),
309
- $emit: (i) => i.emit,
310
- $options: (i) => resolveMergedOptions(i),
311
- $forceUpdate: (i) => () => queueJob(i.update),
312
- $nextTick: (i) => nextTick.bind(i.proxy),
313
- $watch: (i) => instanceWatch.bind(i)
314
- });
315
- let currentInstance = null;
316
- const setCurrentInstance = (instance) => {
317
- currentInstance = instance;
318
- instance.scope.on();
319
- };
320
- const unsetCurrentInstance = () => {
321
- currentInstance && currentInstance.scope.off();
322
- currentInstance = null;
323
- };
324
- function isStatefulComponent(instance) {
325
- return instance.vnode.shapeFlag & 4;
326
- }
327
- function getExposeProxy(instance) {
328
- if (instance.exposed) {
329
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
330
- get(target, key) {
331
- if (key in target) {
332
- return target[key];
333
- } else if (key in publicPropertiesMap) {
334
- return publicPropertiesMap[key](instance);
335
- }
336
- }
337
- }));
338
- }
339
- }
340
- function callWithErrorHandling(fn, instance, type, args) {
341
- let res;
342
- try {
343
- res = args ? fn(...args) : fn();
344
- } catch (err) {
345
- handleError(err, instance, type);
346
- }
347
- return res;
348
- }
349
- function callWithAsyncErrorHandling(fn, instance, type, args) {
350
- if (isFunction(fn)) {
351
- const res = callWithErrorHandling(fn, instance, type, args);
352
- if (res && isPromise(res)) {
353
- res.catch((err) => {
354
- handleError(err, instance, type);
355
- });
356
- }
357
- return res;
358
- }
359
- const values = [];
360
- for (let i = 0; i < fn.length; i++) {
361
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
362
- }
363
- return values;
364
- }
365
- function handleError(err, instance, type, throwInDev = true) {
366
- const contextVNode = instance ? instance.vnode : null;
367
- if (instance) {
368
- let cur = instance.parent;
369
- const exposedInstance = instance.proxy;
370
- const errorInfo = type;
371
- while (cur) {
372
- const errorCapturedHooks = cur.ec;
373
- if (errorCapturedHooks) {
374
- for (let i = 0; i < errorCapturedHooks.length; i++) {
375
- if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
376
- return;
377
- }
378
- }
379
- }
380
- cur = cur.parent;
381
- }
382
- const appErrorHandler = instance.appContext.config.errorHandler;
383
- if (appErrorHandler) {
384
- callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
385
- return;
386
- }
387
- }
388
- logError(err, type, contextVNode, throwInDev);
389
- }
390
- function logError(err, type, contextVNode, throwInDev = true) {
391
- {
392
- console.error(err);
393
- }
394
- }
395
- let isFlushing = false;
396
- let isFlushPending = false;
397
- const queue = [];
398
- let flushIndex = 0;
399
- const pendingPreFlushCbs = [];
400
- let activePreFlushCbs = null;
401
- let preFlushIndex = 0;
402
- const pendingPostFlushCbs = [];
403
- let activePostFlushCbs = null;
404
- let postFlushIndex = 0;
405
- const resolvedPromise = Promise.resolve();
406
- let currentFlushPromise = null;
407
- let currentPreFlushParentJob = null;
408
- function nextTick(fn) {
409
- const p = currentFlushPromise || resolvedPromise;
410
- return fn ? p.then(this ? fn.bind(this) : fn) : p;
411
- }
412
- function findInsertionIndex(id) {
413
- let start = flushIndex + 1;
414
- let end = queue.length;
415
- while (start < end) {
416
- const middle = start + end >>> 1;
417
- const middleJobId = getId(queue[middle]);
418
- middleJobId < id ? start = middle + 1 : end = middle;
419
- }
420
- return start;
421
- }
422
- function queueJob(job) {
423
- if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) {
424
- if (job.id == null) {
425
- queue.push(job);
426
- } else {
427
- queue.splice(findInsertionIndex(job.id), 0, job);
428
- }
429
- queueFlush();
430
- }
431
- }
432
- function queueFlush() {
433
- if (!isFlushing && !isFlushPending) {
434
- isFlushPending = true;
435
- currentFlushPromise = resolvedPromise.then(flushJobs);
436
- }
437
- }
438
- function queueCb(cb, activeQueue, pendingQueue, index2) {
439
- if (!isArray(cb)) {
440
- if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index2 + 1 : index2)) {
441
- pendingQueue.push(cb);
442
- }
443
- } else {
444
- pendingQueue.push(...cb);
445
- }
446
- queueFlush();
447
- }
448
- function queuePreFlushCb(cb) {
449
- queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);
450
- }
451
- function queuePostFlushCb(cb) {
452
- queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);
453
- }
454
- function flushPreFlushCbs(seen, parentJob = null) {
455
- if (pendingPreFlushCbs.length) {
456
- currentPreFlushParentJob = parentJob;
457
- activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
458
- pendingPreFlushCbs.length = 0;
459
- for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
460
- activePreFlushCbs[preFlushIndex]();
461
- }
462
- activePreFlushCbs = null;
463
- preFlushIndex = 0;
464
- currentPreFlushParentJob = null;
465
- flushPreFlushCbs(seen, parentJob);
466
- }
467
- }
468
- function flushPostFlushCbs(seen) {
469
- if (pendingPostFlushCbs.length) {
470
- const deduped = [...new Set(pendingPostFlushCbs)];
471
- pendingPostFlushCbs.length = 0;
472
- if (activePostFlushCbs) {
473
- activePostFlushCbs.push(...deduped);
474
- return;
475
- }
476
- activePostFlushCbs = deduped;
477
- activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
478
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
479
- activePostFlushCbs[postFlushIndex]();
480
- }
481
- activePostFlushCbs = null;
482
- postFlushIndex = 0;
483
- }
484
- }
485
- const getId = (job) => job.id == null ? Infinity : job.id;
486
- function flushJobs(seen) {
487
- isFlushPending = false;
488
- isFlushing = true;
489
- flushPreFlushCbs(seen);
490
- queue.sort((a, b) => getId(a) - getId(b));
491
- const check = NOOP;
492
- try {
493
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
494
- const job = queue[flushIndex];
495
- if (job && job.active !== false) {
496
- if (false)
497
- ;
498
- callWithErrorHandling(job, null, 14);
499
- }
500
- }
501
- } finally {
502
- flushIndex = 0;
503
- queue.length = 0;
504
- flushPostFlushCbs();
505
- isFlushing = false;
506
- currentFlushPromise = null;
507
- if (queue.length || pendingPreFlushCbs.length || pendingPostFlushCbs.length) {
508
- flushJobs(seen);
509
- }
510
- }
511
- }
512
- const INITIAL_WATCHER_VALUE = {};
513
- function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
514
- const instance = currentInstance;
515
- let getter;
516
- let forceTrigger = false;
517
- let isMultiSource = false;
518
- if (isRef(source)) {
519
- getter = () => source.value;
520
- forceTrigger = !!source._shallow;
521
- } else if (isReactive(source)) {
522
- getter = () => source;
523
- deep = true;
524
- } else if (isArray(source)) {
525
- isMultiSource = true;
526
- forceTrigger = source.some(isReactive);
527
- getter = () => source.map((s) => {
528
- if (isRef(s)) {
529
- return s.value;
530
- } else if (isReactive(s)) {
531
- return traverse(s);
532
- } else if (isFunction(s)) {
533
- return callWithErrorHandling(s, instance, 2);
534
- } else
535
- ;
536
- });
537
- } else if (isFunction(source)) {
538
- if (cb) {
539
- getter = () => callWithErrorHandling(source, instance, 2);
540
- } else {
541
- getter = () => {
542
- if (instance && instance.isUnmounted) {
543
- return;
544
- }
545
- if (cleanup) {
546
- cleanup();
547
- }
548
- return callWithAsyncErrorHandling(source, instance, 3, [onInvalidate]);
549
- };
550
- }
551
- } else {
552
- getter = NOOP;
553
- }
554
- if (cb && deep) {
555
- const baseGetter = getter;
556
- getter = () => traverse(baseGetter());
557
- }
558
- let cleanup;
559
- let onInvalidate = (fn) => {
560
- cleanup = effect.onStop = () => {
561
- callWithErrorHandling(fn, instance, 4);
562
- };
563
- };
564
- let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
565
- const job = () => {
566
- if (!effect.active) {
567
- return;
568
- }
569
- if (cb) {
570
- const newValue = effect.run();
571
- if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
572
- if (cleanup) {
573
- cleanup();
574
- }
575
- callWithAsyncErrorHandling(cb, instance, 3, [
576
- newValue,
577
- oldValue === INITIAL_WATCHER_VALUE ? void 0 : oldValue,
578
- onInvalidate
579
- ]);
580
- oldValue = newValue;
581
- }
582
- } else {
583
- effect.run();
584
- }
585
- };
586
- job.allowRecurse = !!cb;
587
- let scheduler;
588
- if (flush === "sync") {
589
- scheduler = job;
590
- } else if (flush === "post") {
591
- scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
592
- } else {
593
- scheduler = () => {
594
- if (!instance || instance.isMounted) {
595
- queuePreFlushCb(job);
596
- } else {
597
- job();
598
- }
599
- };
600
- }
601
- const effect = new ReactiveEffect(getter, scheduler);
602
- if (cb) {
603
- if (immediate) {
604
- job();
605
- } else {
606
- oldValue = effect.run();
607
- }
608
- } else if (flush === "post") {
609
- queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense);
610
- } else {
611
- effect.run();
612
- }
613
- return () => {
614
- effect.stop();
615
- if (instance && instance.scope) {
616
- remove(instance.scope.effects, effect);
617
- }
618
- };
619
- }
620
- function instanceWatch(source, value, options) {
621
- const publicThis = this.proxy;
622
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
623
- let cb;
624
- if (isFunction(value)) {
625
- cb = value;
626
- } else {
627
- cb = value.handler;
628
- options = value;
629
- }
630
- const cur = currentInstance;
631
- setCurrentInstance(this);
632
- const res = doWatch(getter, cb.bind(publicThis), options);
633
- if (cur) {
634
- setCurrentInstance(cur);
635
- } else {
636
- unsetCurrentInstance();
637
- }
638
- return res;
639
- }
640
- function createPathGetter(ctx, path) {
641
- const segments = path.split(".");
642
- return () => {
643
- let cur = ctx;
644
- for (let i = 0; i < segments.length && cur; i++) {
645
- cur = cur[segments[i]];
646
- }
647
- return cur;
648
- };
649
- }
650
- function traverse(value, seen) {
651
- if (!isObject(value) || value["__v_skip"]) {
652
- return value;
653
- }
654
- seen = seen || new Set();
655
- if (seen.has(value)) {
656
- return value;
657
- }
658
- seen.add(value);
659
- if (isRef(value)) {
660
- traverse(value.value, seen);
661
- } else if (isArray(value)) {
662
- for (let i = 0; i < value.length; i++) {
663
- traverse(value[i], seen);
664
- }
665
- } else if (isSet(value) || isMap(value)) {
666
- value.forEach((v) => {
667
- traverse(v, seen);
668
- });
669
- } else if (isPlainObject(value)) {
670
- for (const key in value) {
671
- traverse(value[key], seen);
672
- }
673
- }
674
- return value;
675
- }
676
- const navSpriteProps = {
677
- target: {
678
- type: Object
679
- },
680
- scrollTarget: {
681
- type: Object
682
- },
683
- view: {
684
- type: Object,
685
- default: { top: 0, bottom: 0 }
686
- },
687
- hashSupport: {
688
- type: Boolean,
689
- default: false
690
- },
691
- mode: {
692
- type: String,
693
- default: "default"
694
- },
695
- maxLevel: {
696
- type: Number,
697
- default: 3
698
- },
699
- title: {
700
- type: String,
701
- default: "menu"
702
- },
703
- indent: {
704
- type: Number,
705
- default: 2
706
- },
707
- width: {
708
- type: Number,
709
- default: 300
710
- },
711
- height: {
712
- type: Number,
713
- default: 400
714
- },
715
- isOpen: {
716
- type: Boolean,
717
- default: true
718
- },
719
- spriteOption: {
720
- type: Object
721
- }
722
- };
723
- var NavSprite = defineComponent({
724
- name: "DNavSprite",
725
- props: navSpriteProps,
726
- emits: ["afterNavInit"],
727
- setup(props) {
728
- return {};
729
- }
730
- });
731
- NavSprite.install = function(app) {
732
- app.component(NavSprite.name, NavSprite);
733
- };
734
- var index = {
735
- title: "NavSprite \u5BFC\u822A\u7CBE\u7075",
736
- category: "\u5BFC\u822A",
737
- status: "10%",
738
- install(app) {
739
- app.use(NavSprite);
740
- }
741
- };
742
- export { NavSprite, index as default };