vue-devui 1.0.0-beta.9 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/README.md +100 -72
  2. package/accordion/index.es.js +525 -39
  3. package/accordion/index.umd.js +1 -1
  4. package/accordion/style.css +1 -1
  5. package/alert/index.es.js +34 -37
  6. package/alert/index.umd.js +1 -1
  7. package/alert/style.css +1 -1
  8. package/{time-axis → auto-complete}/index.d.ts +0 -0
  9. package/auto-complete/index.es.js +983 -0
  10. package/auto-complete/index.umd.js +1 -0
  11. package/auto-complete/package.json +7 -0
  12. package/auto-complete/style.css +1 -0
  13. package/back-top/index.es.js +5 -3
  14. package/back-top/index.umd.js +1 -1
  15. package/badge/index.es.js +13 -19
  16. package/badge/index.umd.js +1 -1
  17. package/badge/style.css +1 -1
  18. package/breadcrumb/index.es.js +2 -1
  19. package/button/index.es.js +296 -117
  20. package/button/index.umd.js +1 -1
  21. package/button/style.css +1 -1
  22. package/carousel/index.es.js +43 -57
  23. package/carousel/index.umd.js +1 -1
  24. package/cascader/index.es.js +5412 -784
  25. package/cascader/index.umd.js +27 -1
  26. package/cascader/style.css +1 -1
  27. package/checkbox/style.css +1 -1
  28. package/{toast → color-picker}/index.d.ts +0 -0
  29. package/color-picker/index.es.js +8196 -0
  30. package/color-picker/index.umd.js +27 -0
  31. package/color-picker/package.json +7 -0
  32. package/color-picker/style.css +1 -0
  33. package/comment/index.es.js +42 -13
  34. package/comment/index.umd.js +1 -1
  35. package/comment/style.css +1 -1
  36. package/countdown/index.es.js +27 -17
  37. package/countdown/index.umd.js +1 -1
  38. package/countdown/style.css +1 -1
  39. package/date-picker/index.es.js +48 -66
  40. package/date-picker/index.umd.js +1 -1
  41. package/date-picker/style.css +1 -1
  42. package/dragdrop/index.es.js +135 -10
  43. package/dragdrop/index.umd.js +1 -1
  44. package/drawer/index.es.js +169 -223
  45. package/drawer/index.umd.js +1 -1
  46. package/drawer/style.css +1 -1
  47. package/dropdown/index.es.js +463 -300
  48. package/dropdown/index.umd.js +1 -1
  49. package/dropdown/style.css +1 -1
  50. package/editable-select/index.es.js +293 -5660
  51. package/editable-select/index.umd.js +1 -27
  52. package/editable-select/style.css +1 -1
  53. package/form/index.es.js +6210 -531
  54. package/form/index.umd.js +27 -1
  55. package/form/style.css +1 -1
  56. package/fullscreen/index.es.js +112 -133
  57. package/fullscreen/index.umd.js +1 -1
  58. package/fullscreen/style.css +1 -1
  59. package/gantt/index.es.js +6 -18
  60. package/gantt/index.umd.js +1 -1
  61. package/gantt/style.css +1 -1
  62. package/grid/index.es.js +1 -1
  63. package/grid/style.css +1 -1
  64. package/icon/index.es.js +39 -56
  65. package/icon/index.umd.js +1 -1
  66. package/image-preview/index.es.js +35 -16
  67. package/image-preview/index.umd.js +1 -1
  68. package/input/index.es.js +4 -5
  69. package/input/index.umd.js +1 -1
  70. package/input/style.css +1 -1
  71. package/input-icon/index.es.js +42 -41
  72. package/input-icon/index.umd.js +1 -1
  73. package/input-icon/style.css +1 -1
  74. package/input-number/index.es.js +46 -56
  75. package/input-number/index.umd.js +1 -1
  76. package/input-number/style.css +1 -1
  77. package/list/index.d.ts +7 -0
  78. package/list/index.es.js +39 -0
  79. package/list/index.umd.js +1 -0
  80. package/{toast → list}/package.json +1 -1
  81. package/list/style.css +1 -0
  82. package/loading/index.es.js +2 -2
  83. package/modal/index.es.js +304 -765
  84. package/modal/index.umd.js +1 -1
  85. package/modal/style.css +1 -1
  86. package/nav-sprite/index.es.js +1 -675
  87. package/nav-sprite/index.umd.js +1 -1
  88. package/notification/index.d.ts +7 -0
  89. package/notification/index.es.js +284 -0
  90. package/notification/index.umd.js +1 -0
  91. package/notification/package.json +7 -0
  92. package/notification/style.css +1 -0
  93. package/nuxt/components/Accordion.js +3 -0
  94. package/nuxt/components/Alert.js +3 -0
  95. package/nuxt/components/Anchor.js +3 -0
  96. package/nuxt/components/Aside.js +3 -0
  97. package/nuxt/components/AutoComplete.js +3 -0
  98. package/nuxt/components/Avatar.js +3 -0
  99. package/nuxt/components/BackTop.js +3 -0
  100. package/nuxt/components/Badge.js +3 -0
  101. package/nuxt/components/Breadcrumb.js +3 -0
  102. package/nuxt/components/Button.js +3 -0
  103. package/nuxt/components/Card.js +3 -0
  104. package/nuxt/components/Carousel.js +3 -0
  105. package/nuxt/components/CarouselItem.js +3 -0
  106. package/nuxt/components/Cascader.js +3 -0
  107. package/nuxt/components/Checkbox.js +3 -0
  108. package/nuxt/components/Col.js +3 -0
  109. package/nuxt/components/ColorPicker.js +3 -0
  110. package/nuxt/components/Column.js +3 -0
  111. package/nuxt/components/Comment.js +3 -0
  112. package/nuxt/components/Content.js +3 -0
  113. package/nuxt/components/Countdown.js +3 -0
  114. package/nuxt/components/DatePicker.js +3 -0
  115. package/nuxt/components/Drawer.js +3 -0
  116. package/nuxt/components/DrawerService.js +3 -0
  117. package/nuxt/components/Dropdown.js +3 -0
  118. package/nuxt/components/DropdownMenu.js +3 -0
  119. package/nuxt/components/EditableSelect.js +3 -0
  120. package/nuxt/components/FixedOverlay.js +3 -0
  121. package/nuxt/components/FlexibleOverlay.js +3 -0
  122. package/nuxt/components/Footer.js +3 -0
  123. package/nuxt/components/Form.js +3 -0
  124. package/nuxt/components/FormControl.js +3 -0
  125. package/nuxt/components/FormItem.js +3 -0
  126. package/nuxt/components/FormLabel.js +3 -0
  127. package/nuxt/components/FormOperation.js +3 -0
  128. package/nuxt/components/Fullscreen.js +3 -0
  129. package/nuxt/components/Gantt.js +3 -0
  130. package/nuxt/components/Header.js +3 -0
  131. package/nuxt/components/IFileOptions.js +3 -0
  132. package/nuxt/components/IUploadOptions.js +3 -0
  133. package/nuxt/components/Icon.js +2 -0
  134. package/nuxt/components/ImagePreviewService.js +3 -0
  135. package/nuxt/components/Input.js +3 -0
  136. package/nuxt/components/InputIcon.js +3 -0
  137. package/nuxt/components/InputNumber.js +3 -0
  138. package/nuxt/components/Layout.js +3 -0
  139. package/nuxt/components/List.js +3 -0
  140. package/nuxt/components/ListItem.js +3 -0
  141. package/nuxt/components/Loading.js +3 -0
  142. package/nuxt/components/LoadingService.js +3 -0
  143. package/nuxt/components/Modal.js +3 -0
  144. package/nuxt/components/NavSprite.js +2 -0
  145. package/nuxt/components/Notification.js +3 -0
  146. package/nuxt/components/NotificationService.js +3 -0
  147. package/nuxt/components/Pagination.js +3 -0
  148. package/nuxt/components/Panel.js +3 -0
  149. package/nuxt/components/PanelBody.js +3 -0
  150. package/nuxt/components/PanelFooter.js +3 -0
  151. package/nuxt/components/PanelHeader.js +3 -0
  152. package/nuxt/components/Popover.js +3 -0
  153. package/nuxt/components/Progress.js +3 -0
  154. package/nuxt/components/QuadrantDiagram.js +3 -0
  155. package/nuxt/components/Radio.js +3 -0
  156. package/nuxt/components/RadioGroup.js +3 -0
  157. package/nuxt/components/Rate.js +3 -0
  158. package/nuxt/components/ReadTip.js +3 -0
  159. package/nuxt/components/Result.js +3 -0
  160. package/nuxt/components/Row.js +3 -0
  161. package/nuxt/components/Search.js +3 -0
  162. package/nuxt/components/Select.js +3 -0
  163. package/nuxt/components/Skeleton.js +3 -0
  164. package/nuxt/components/SkeletonItem.js +3 -0
  165. package/nuxt/components/Slider.js +3 -0
  166. package/nuxt/components/Splitter.js +3 -0
  167. package/nuxt/components/Statistic.js +3 -0
  168. package/nuxt/components/Status.js +3 -0
  169. package/nuxt/components/StepsGuide.js +3 -0
  170. package/nuxt/components/StickSlider.js +3 -0
  171. package/nuxt/components/Sticky.js +2 -0
  172. package/nuxt/components/Switch.js +3 -0
  173. package/nuxt/components/Table.js +3 -0
  174. package/nuxt/components/Tabs.js +3 -0
  175. package/nuxt/components/Tag.js +3 -0
  176. package/nuxt/components/TagInput.js +3 -0
  177. package/nuxt/components/Textarea.js +3 -0
  178. package/nuxt/components/TimePicker.js +3 -0
  179. package/nuxt/components/Timeline.js +3 -0
  180. package/nuxt/components/TimelineItem.js +3 -0
  181. package/nuxt/components/Tooltip.js +3 -0
  182. package/nuxt/components/Transfer.js +3 -0
  183. package/nuxt/components/Tree.js +3 -0
  184. package/nuxt/components/TreeSelect.js +3 -0
  185. package/nuxt/components/Upload.js +3 -0
  186. package/nuxt/components/UploadStatus.js +3 -0
  187. package/nuxt/components/alertProps.js +3 -0
  188. package/nuxt/components/badgeProps.js +3 -0
  189. package/nuxt/components/buttonProps.js +3 -0
  190. package/nuxt/components/dropdownMenuProps.js +3 -0
  191. package/nuxt/components/fixedOverlayProps.js +3 -0
  192. package/nuxt/components/flexibleOverlayProps.js +3 -0
  193. package/nuxt/components/fullscreenProps.js +3 -0
  194. package/nuxt/components/iconProps.js +2 -0
  195. package/nuxt/components/notificationProps.js +3 -0
  196. package/nuxt/components/overlayEmits.js +3 -0
  197. package/nuxt/components/overlayProps.js +3 -0
  198. package/nuxt/components/paginationProps.js +3 -0
  199. package/nuxt/components/panelProps.js +3 -0
  200. package/nuxt/components/popoverProps.js +3 -0
  201. package/nuxt/components/searchProps.js +3 -0
  202. package/nuxt/components/tooltipProps.js +3 -0
  203. package/nuxt/components/uploadProps.js +3 -0
  204. package/nuxt/index.js +13 -0
  205. package/overlay/index.es.js +156 -205
  206. package/overlay/index.umd.js +1 -1
  207. package/overlay/style.css +1 -1
  208. package/package.json +12 -55
  209. package/pagination/index.es.js +11 -13
  210. package/pagination/index.umd.js +1 -1
  211. package/pagination/style.css +1 -1
  212. package/panel/index.es.js +48 -35
  213. package/panel/index.umd.js +1 -1
  214. package/popover/index.es.js +5954 -189
  215. package/popover/index.umd.js +27 -1
  216. package/popover/style.css +1 -1
  217. package/progress/index.es.js +8 -8
  218. package/progress/index.umd.js +3 -3
  219. package/quadrant-diagram/index.es.js +5405 -166
  220. package/quadrant-diagram/index.umd.js +27 -1
  221. package/radio/index.es.js +8 -14
  222. package/radio/index.umd.js +1 -1
  223. package/radio/style.css +1 -1
  224. package/read-tip/index.es.js +6 -3
  225. package/read-tip/style.css +1 -1
  226. package/result/index.es.js +38 -52
  227. package/result/index.umd.js +1 -1
  228. package/ripple/index.es.js +10 -6
  229. package/search/index.es.js +5428 -200
  230. package/search/index.umd.js +27 -1
  231. package/search/style.css +1 -1
  232. package/select/index.es.js +43 -42
  233. package/select/index.umd.js +1 -1
  234. package/select/style.css +1 -1
  235. package/skeleton/index.es.js +17 -17
  236. package/skeleton/index.umd.js +1 -1
  237. package/slider/index.es.js +4 -6
  238. package/slider/index.umd.js +1 -1
  239. package/slider/style.css +1 -1
  240. package/splitter/index.es.js +5896 -39
  241. package/splitter/index.umd.js +27 -1
  242. package/splitter/style.css +1 -1
  243. package/statistic/index.es.js +19 -32
  244. package/statistic/index.umd.js +1 -1
  245. package/statistic/style.css +1 -1
  246. package/status/index.es.js +1 -4
  247. package/status/index.umd.js +1 -1
  248. package/status/style.css +1 -1
  249. package/steps-guide/index.es.js +6 -3
  250. package/sticky/index.umd.js +1 -1
  251. package/style.css +1 -1
  252. package/table/index.es.js +753 -358
  253. package/table/index.umd.js +1 -1
  254. package/table/style.css +1 -1
  255. package/tabs/index.es.js +3 -4
  256. package/tabs/index.umd.js +1 -1
  257. package/tabs/style.css +1 -1
  258. package/tag/index.es.js +4 -3
  259. package/tag/index.umd.js +1 -1
  260. package/tag/style.css +1 -1
  261. package/tag-input/index.es.js +4 -14
  262. package/tag-input/index.umd.js +1 -1
  263. package/textarea/style.css +1 -1
  264. package/{theme → theme/theme.scss} +0 -0
  265. package/time-picker/index.es.js +309 -123
  266. package/time-picker/index.umd.js +1 -1
  267. package/time-picker/style.css +1 -1
  268. package/timeline/index.d.ts +7 -0
  269. package/{time-axis → timeline}/index.es.js +65 -77
  270. package/timeline/index.umd.js +1 -0
  271. package/{time-axis → timeline}/package.json +1 -1
  272. package/timeline/style.css +1 -0
  273. package/tooltip/index.es.js +5805 -141
  274. package/tooltip/index.umd.js +27 -1
  275. package/tooltip/style.css +1 -1
  276. package/transfer/index.es.js +6521 -630
  277. package/transfer/index.umd.js +27 -1
  278. package/transfer/style.css +1 -1
  279. package/tree/index.es.js +5781 -193
  280. package/tree/index.umd.js +27 -1
  281. package/tree/style.css +1 -1
  282. package/tree-select/index.es.js +138 -39
  283. package/tree-select/index.umd.js +1 -1
  284. package/tree-select/style.css +1 -1
  285. package/upload/index.es.js +450 -2669
  286. package/upload/index.umd.js +1 -1
  287. package/upload/style.css +1 -1
  288. package/vue-devui.es.js +14414 -14096
  289. package/vue-devui.umd.js +19 -19
  290. package/time-axis/index.umd.js +0 -1
  291. package/time-axis/style.css +0 -1
  292. package/toast/index.es.js +0 -2059
  293. package/toast/index.umd.js +0 -1
  294. package/toast/style.css +0 -1
@@ -1,20 +1,4 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- import { defineComponent, createVNode, ref, watch, onMounted, onBeforeUnmount, Fragment, Comment } from "vue";
1
+ import { defineComponent, toRefs, createVNode, ref, watch, onMounted, onBeforeUnmount, Fragment, Comment } from "vue";
18
2
  const carouselProps = {
19
3
  arrowTrigger: {
20
4
  type: String,
@@ -52,49 +36,51 @@ const carouselProps = {
52
36
  type: Function
53
37
  }
54
38
  };
39
+ const iconProps = {
40
+ name: {
41
+ type: String,
42
+ default: "",
43
+ required: true
44
+ },
45
+ size: {
46
+ type: String,
47
+ default: "inherit"
48
+ },
49
+ color: {
50
+ type: String,
51
+ default: "inherit"
52
+ },
53
+ classPrefix: {
54
+ type: String,
55
+ default: "icon"
56
+ }
57
+ };
55
58
  var Icon = defineComponent({
56
59
  name: "DIcon",
57
- props: {
58
- name: {
59
- type: String,
60
- required: true
61
- },
62
- size: {
63
- type: String,
64
- default: "inherit"
65
- },
66
- color: {
67
- type: String,
68
- default: "inherit"
69
- },
70
- classPrefix: {
71
- type: String,
72
- default: "icon"
73
- }
74
- },
60
+ props: iconProps,
75
61
  setup(props) {
76
- return __spreadValues({}, props);
77
- },
78
- render() {
79
62
  const {
80
63
  name,
81
64
  size,
82
65
  color,
83
66
  classPrefix
84
- } = this;
85
- return /^((https?):)?\/\//.test(name) ? createVNode("img", {
86
- "src": name,
87
- "alt": name.split("/")[name.split("/").length - 1],
88
- "style": {
89
- width: size
90
- }
91
- }, null) : createVNode("i", {
92
- "class": `${classPrefix} ${classPrefix}-${name}`,
93
- "style": {
94
- fontSize: size,
95
- color
96
- }
97
- }, null);
67
+ } = toRefs(props);
68
+ return () => {
69
+ return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
70
+ "src": name.value,
71
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
72
+ "style": {
73
+ width: size.value,
74
+ verticalAlign: "text-bottom"
75
+ }
76
+ }, null) : createVNode("i", {
77
+ "class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
78
+ "style": {
79
+ fontSize: size.value,
80
+ color: color.value
81
+ }
82
+ }, null);
83
+ };
98
84
  }
99
85
  });
100
86
  var carousel = "";
@@ -297,7 +283,7 @@ var Carousel = defineComponent({
297
283
  }, null))]) : null]);
298
284
  }
299
285
  });
300
- var CarouseItem = defineComponent({
286
+ var CarouselItem = defineComponent({
301
287
  name: "DCarouselItem",
302
288
  render() {
303
289
  var _a;
@@ -313,8 +299,8 @@ var CarouseItem = defineComponent({
313
299
  Carousel.install = function(app) {
314
300
  app.component(Carousel.name, Carousel);
315
301
  };
316
- CarouseItem.install = function(app) {
317
- app.component(CarouseItem.name, CarouseItem);
302
+ CarouselItem.install = function(app) {
303
+ app.component(CarouselItem.name, CarouselItem);
318
304
  };
319
305
  var index = {
320
306
  title: "Carousel \u8D70\u9A6C\u706F",
@@ -322,7 +308,7 @@ var index = {
322
308
  status: "80%",
323
309
  install(app) {
324
310
  app.use(Carousel);
325
- app.use(CarouseItem);
311
+ app.use(CarouselItem);
326
312
  }
327
313
  };
328
- export { Carousel, index as default };
314
+ export { Carousel, CarouselItem, index as default };
@@ -1 +1 @@
1
- var F=Object.defineProperty;var R=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var $=(a,e,s)=>e in a?F(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s,k=(a,e)=>{for(var s in e||(e={}))_.call(e,s)&&$(a,s,e[s]);if(R)for(var s of R(e))q.call(e,s)&&$(a,s,e[s]);return a};(function(a,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(a=typeof globalThis!="undefined"?globalThis:a||self,e(a.index={},a.Vue))})(this,function(a,e){"use strict";const s={arrowTrigger:{type:String,default:"hover"},autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:3e3},height:{type:String,default:"100%"},showDots:{type:Boolean,default:!0},dotTrigger:{type:String,default:"click"},dotPosition:{type:String,default:"bottom"},activeIndex:{type:Number,default:0},activeIndexChange:{type:Function}};var b=e.defineComponent({name:"DIcon",props:{name:{type:String,required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}},setup(t){return k({},t)},render(){const{name:t,size:d,color:i,classPrefix:g}=this;return/^((https?):)?\/\//.test(t)?e.createVNode("img",{src:t,alt:t.split("/")[t.split("/").length-1],style:{width:d}},null):e.createVNode("i",{class:`${g} ${g}-${t}`,style:{fontSize:d,color:i}},null)}}),O="",w=e.defineComponent({name:"DCarousel",props:s,emits:["update:activeIndex"],setup(t,{emit:d}){const{arrowTrigger:i,autoplay:g,autoplaySpeed:T,dotTrigger:M,activeIndex:V,activeIndexChange:C}=t,S=500,o=e.ref(0),y=e.ref(!1),u=e.ref(0),f=e.ref(null),r=e.ref(null),c=e.ref(null);e.watch(()=>i,()=>{y.value=i==="always"},{immediate:!0}),e.watch(()=>V,()=>{u.value=V},{immediate:!0});const m=n=>{r.value&&(r.value.style.left=`${-n*100}%`)},N=n=>{setTimeout(()=>{r.value&&(r.value.style.transition=""),n.style.transform="",m(u.value)},S)},v=(n,l)=>{if(f.value){const h=f.value.getBoundingClientRect();n.style.transform=`translateX(${(l?-o.value:o.value)*h.width}px)`}},p=n=>{if(n===u.value||!f.value||!r.value)return;r.value.style.transition=`left ${S}ms ease`;let l=u.value;if(n<0&&u.value===0){l=o.value-1;const h=r.value.children[l];v(h,!0),m(-1),N(h)}else if(n>=o.value&&u.value===o.value-1){l=0;const h=r.value.children[l];v(h,!1),m(o.value),N(h)}else l=n<0?0:n>o.value-1?o.value-1:n,m(l);u.value=l,d("update:activeIndex",l),C==null||C(l),P()},j=()=>{p(u.value-1)},x=()=>{p(u.value+1)},A=n=>{i==="hover"&&(y.value=n==="enter")},B=(n,l)=>{l===M&&p(n)},D=()=>{c.value&&(clearTimeout(c.value),c.value=null)},P=()=>{D(),g&&T&&(c.value=setTimeout(()=>{x()},T))},z=n=>{o.value=n,P()};return e.onMounted(()=>{r.value&&(r.value.style.transition=`left ${S}ms ease`,r.value.style.left="0%"),P()}),e.onBeforeUnmount(()=>{D()}),{wrapperRef:f,containerRef:r,showArrow:y,currentIndex:u,itemCount:o,changeItemCount:z,goto:p,prev:j,next:x,arrowMouseEvent:A,switchStep:B}},render(){var m,N;const{showArrow:t,currentIndex:d,itemCount:i,arrowTrigger:g,height:T,showDots:M,dotPosition:V,prev:C,next:S,arrowMouseEvent:o,switchStep:y,changeItemCount:u,$slots:f}=this,r=(N=(m=f.default)==null?void 0:m.call(f))!=null?N:[];let c=r;return c.length===1&&c[0].type===e.Fragment&&(c=(c[0].children||[]).filter(v=>(v==null?void 0:v.type)!==e.Comment)),c.length!==i&&u(c.length),e.createVNode("div",{class:"devui-carousel-container",style:{height:T},onMouseenter:()=>o("enter"),onMouseleave:()=>o("leave")},[g!=="never"&&t?e.createVNode("div",{class:"devui-carousel-arrow"},[e.createVNode("button",{class:"arrow-left",onClick:()=>C()},[e.createVNode(b,{name:"arrow-left"},null)]),e.createVNode("button",{class:"arrow-right",onClick:()=>S()},[e.createVNode(b,{name:"arrow-right"},null)])]):null,e.createVNode("div",{class:"devui-carousel-item-wrapper",ref:"wrapperRef"},[e.createVNode("div",{class:"devui-carousel-item-container",style:{width:`${i*100}%`},ref:"containerRef"},[r])]),i>0&&M?e.createVNode("ul",{class:["devui-carousel-dots",V]},[c.map((v,p)=>e.createVNode("li",{class:{"dot-item":!0,active:d===p},onClick:()=>y(p,"click"),onMouseenter:()=>y(p,"hover")},null))]):null])}}),I=e.defineComponent({name:"DCarouselItem",render(){var i;const{$slots:t}=this,d=(i=t.default)==null?void 0:i.call(t);return e.createVNode("div",{class:"d-carousel-item "},[d])}});w.install=function(t){t.component(w.name,w)},I.install=function(t){t.component(I.name,I)};var E={title:"Carousel \u8D70\u9A6C\u706F",category:"\u6570\u636E\u5C55\u793A",status:"80%",install(t){t.use(w),t.use(I)}};a.Carousel=w,a.default=E,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
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 R={arrowTrigger:{type:String,default:"hover"},autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:3e3},height:{type:String,default:"100%"},showDots:{type:Boolean,default:!0},dotTrigger:{type:String,default:"click"},dotPosition:{type:String,default:"bottom"},activeIndex:{type:Number,default:0},activeIndexChange:{type:Function}},D={name:{type:String,default:"",required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}};var b=e.defineComponent({name:"DIcon",props:D,setup(a){const{name:i,size:n,color:C,classPrefix:p}=e.toRefs(a);return()=>/^((https?):)?\/\//.test(i.value)?e.createVNode("img",{src:i.value,alt:i.value.split("/")[i.value.split("/").length-1],style:{width:n.value,verticalAlign:"text-bottom"}},null):e.createVNode("i",{class:`${p.value} ${p.value}-${i.value}`,style:{fontSize:n.value,color:C.value}},null)}}),B="",y=e.defineComponent({name:"DCarousel",props:R,emits:["update:activeIndex"],setup(a,{emit:i}){const{arrowTrigger:n,autoplay:C,autoplaySpeed:p,dotTrigger:V,activeIndex:T,activeIndexChange:S}=a,I=500,o=e.ref(0),g=e.ref(!1),s=e.ref(0),d=e.ref(null),l=e.ref(null),u=e.ref(null);e.watch(()=>n,()=>{g.value=n==="always"},{immediate:!0}),e.watch(()=>T,()=>{s.value=T},{immediate:!0});const v=t=>{l.value&&(l.value.style.left=`${-t*100}%`)},N=t=>{setTimeout(()=>{l.value&&(l.value.style.transition=""),t.style.transform="",v(s.value)},I)},m=(t,r)=>{if(d.value){const h=d.value.getBoundingClientRect();t.style.transform=`translateX(${(r?-o.value:o.value)*h.width}px)`}},f=t=>{if(t===s.value||!d.value||!l.value)return;l.value.style.transition=`left ${I}ms ease`;let r=s.value;if(t<0&&s.value===0){r=o.value-1;const h=l.value.children[r];m(h,!0),v(-1),N(h)}else if(t>=o.value&&s.value===o.value-1){r=0;const h=l.value.children[r];m(h,!1),v(o.value),N(h)}else r=t<0?0:t>o.value-1?o.value-1:t,v(r);s.value=r,i("update:activeIndex",r),S==null||S(r),P()},k=()=>{f(s.value-1)},M=()=>{f(s.value+1)},A=t=>{n==="hover"&&(g.value=t==="enter")},E=(t,r)=>{r===V&&f(t)},x=()=>{u.value&&(clearTimeout(u.value),u.value=null)},P=()=>{x(),C&&p&&(u.value=setTimeout(()=>{M()},p))},j=t=>{o.value=t,P()};return e.onMounted(()=>{l.value&&(l.value.style.transition=`left ${I}ms ease`,l.value.style.left="0%"),P()}),e.onBeforeUnmount(()=>{x()}),{wrapperRef:d,containerRef:l,showArrow:g,currentIndex:s,itemCount:o,changeItemCount:j,goto:f,prev:k,next:M,arrowMouseEvent:A,switchStep:E}},render(){var v,N;const{showArrow:a,currentIndex:i,itemCount:n,arrowTrigger:C,height:p,showDots:V,dotPosition:T,prev:S,next:I,arrowMouseEvent:o,switchStep:g,changeItemCount:s,$slots:d}=this,l=(N=(v=d.default)==null?void 0:v.call(d))!=null?N:[];let u=l;return u.length===1&&u[0].type===e.Fragment&&(u=(u[0].children||[]).filter(m=>(m==null?void 0:m.type)!==e.Comment)),u.length!==n&&s(u.length),e.createVNode("div",{class:"devui-carousel-container",style:{height:p},onMouseenter:()=>o("enter"),onMouseleave:()=>o("leave")},[C!=="never"&&a?e.createVNode("div",{class:"devui-carousel-arrow"},[e.createVNode("button",{class:"arrow-left",onClick:()=>S()},[e.createVNode(b,{name:"arrow-left"},null)]),e.createVNode("button",{class:"arrow-right",onClick:()=>I()},[e.createVNode(b,{name:"arrow-right"},null)])]):null,e.createVNode("div",{class:"devui-carousel-item-wrapper",ref:"wrapperRef"},[e.createVNode("div",{class:"devui-carousel-item-container",style:{width:`${n*100}%`},ref:"containerRef"},[l])]),n>0&&V?e.createVNode("ul",{class:["devui-carousel-dots",T]},[u.map((m,f)=>e.createVNode("li",{class:{"dot-item":!0,active:i===f},onClick:()=>g(f,"click"),onMouseenter:()=>g(f,"hover")},null))]):null])}}),w=e.defineComponent({name:"DCarouselItem",render(){var n;const{$slots:a}=this,i=(n=a.default)==null?void 0:n.call(a);return e.createVNode("div",{class:"d-carousel-item "},[i])}});y.install=function(a){a.component(y.name,y)},w.install=function(a){a.component(w.name,w)};var $={title:"Carousel \u8D70\u9A6C\u706F",category:"\u6570\u636E\u5C55\u793A",status:"80%",install(a){a.use(y),a.use(w)}};c.Carousel=y,c.CarouselItem=w,c.default=$,Object.defineProperty(c,"__esModule",{value:!0}),c[Symbol.toStringTag]="Module"});