vue-devui 1.0.0-rc.0 → 1.0.0-rc.11

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 (353) hide show
  1. package/README.md +78 -116
  2. package/alert/index.es.js +74 -45
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8190 -296
  6. package/auto-complete/index.umd.js +29 -1
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +153 -146
  9. package/avatar/index.umd.js +1 -1
  10. package/avatar/style.css +1 -1
  11. package/badge/index.es.js +34 -5
  12. package/badge/index.umd.js +1 -1
  13. package/badge/style.css +1 -1
  14. package/button/index.es.js +5741 -127
  15. package/button/index.umd.js +27 -1
  16. package/button/style.css +1 -1
  17. package/card/index.es.js +63 -35
  18. package/card/index.umd.js +1 -1
  19. package/card/style.css +1 -1
  20. package/checkbox/index.es.js +8068 -255
  21. package/checkbox/index.umd.js +27 -1
  22. package/checkbox/style.css +1 -1
  23. package/{accordion → collapse}/index.d.ts +0 -0
  24. package/collapse/index.es.js +379 -0
  25. package/collapse/index.umd.js +1 -0
  26. package/{anchor → collapse}/package.json +1 -1
  27. package/collapse/style.css +1 -0
  28. package/countdown/index.es.js +5 -7
  29. package/countdown/index.umd.js +1 -1
  30. package/date-picker/index.es.js +8167 -288
  31. package/date-picker/index.umd.js +27 -1
  32. package/date-picker/style.css +1 -1
  33. package/drawer/index.es.js +31 -4
  34. package/drawer/index.umd.js +1 -1
  35. package/drawer/style.css +1 -1
  36. package/dropdown/index.es.js +297 -181
  37. package/dropdown/index.umd.js +1 -1
  38. package/dropdown/style.css +1 -1
  39. package/editable-select/index.es.js +525 -154
  40. package/editable-select/index.umd.js +1 -1
  41. package/editable-select/style.css +1 -1
  42. package/form/index.es.js +1048 -1176
  43. package/form/index.umd.js +16 -16
  44. package/form/style.css +1 -1
  45. package/fullscreen/index.es.js +42 -21
  46. package/fullscreen/index.umd.js +1 -1
  47. package/fullscreen/style.css +1 -1
  48. package/grid/index.es.js +101 -86
  49. package/grid/index.umd.js +1 -1
  50. package/grid/style.css +1 -1
  51. package/icon/index.es.js +197 -56
  52. package/icon/index.umd.js +1 -1
  53. package/icon/style.css +1 -0
  54. package/image-preview/index.es.js +55 -31
  55. package/image-preview/index.umd.js +1 -1
  56. package/image-preview/style.css +1 -1
  57. package/input/index.es.js +8074 -144
  58. package/input/index.umd.js +27 -1
  59. package/input/style.css +1 -1
  60. package/input-number/index.es.js +269 -183
  61. package/input-number/index.umd.js +1 -1
  62. package/input-number/style.css +1 -1
  63. package/layout/index.es.js +40 -25
  64. package/layout/index.umd.js +1 -1
  65. package/layout/style.css +1 -1
  66. package/loading/index.es.js +74 -35
  67. package/loading/index.umd.js +1 -1
  68. package/loading/style.css +1 -1
  69. package/modal/index.es.js +412 -204
  70. package/modal/index.umd.js +1 -1
  71. package/modal/style.css +1 -1
  72. package/notification/index.es.js +307 -57
  73. package/notification/index.umd.js +1 -1
  74. package/notification/style.css +1 -1
  75. package/nuxt/components/ButtonGroup.js +3 -0
  76. package/nuxt/components/CheckboxButton.js +3 -0
  77. package/nuxt/components/CheckboxGroup.js +3 -0
  78. package/nuxt/components/Collapse.js +3 -0
  79. package/nuxt/components/CollapseItem.js +3 -0
  80. package/nuxt/components/DropdownPropsKey.js +3 -0
  81. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  82. package/nuxt/components/FORM_TOKEN.js +3 -0
  83. package/nuxt/components/Icon.js +1 -0
  84. package/nuxt/components/IconGroup.js +3 -0
  85. package/nuxt/components/LABEL_DATA.js +3 -0
  86. package/nuxt/components/LoadingOptions.js +3 -0
  87. package/nuxt/components/Option.js +3 -0
  88. package/nuxt/components/PanelBody.js +3 -0
  89. package/nuxt/components/PanelFooter.js +3 -0
  90. package/nuxt/components/PanelHeader.js +3 -0
  91. package/nuxt/components/RadioButton.js +3 -0
  92. package/nuxt/components/TABLE_TOKEN.js +3 -0
  93. package/nuxt/components/Tab.js +3 -0
  94. package/nuxt/components/TimeSelect.js +3 -0
  95. package/nuxt/components/Timeline.js +3 -0
  96. package/nuxt/components/TimelineItem.js +3 -0
  97. package/nuxt/components/alertProps.js +3 -0
  98. package/nuxt/components/autoCompleteProps.js +3 -0
  99. package/nuxt/components/avatarProps.js +3 -0
  100. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  101. package/nuxt/components/buttonGroupProps.js +3 -0
  102. package/nuxt/components/cardProps.js +3 -0
  103. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  104. package/nuxt/components/checkboxGroupProps.js +3 -0
  105. package/nuxt/components/checkboxProps.js +3 -0
  106. package/nuxt/components/colProps.js +3 -0
  107. package/nuxt/components/colPropsBaseClass.js +3 -0
  108. package/nuxt/components/colPropsBaseStyle.js +3 -0
  109. package/nuxt/components/collapseItemProps.js +3 -0
  110. package/nuxt/components/collapseProps.js +3 -0
  111. package/nuxt/components/countdownProps.js +3 -0
  112. package/nuxt/components/editableSelectProps.js +3 -0
  113. package/nuxt/components/formItemProps.js +3 -0
  114. package/nuxt/components/formProps.js +3 -0
  115. package/nuxt/components/fullscreenProps.js +3 -0
  116. package/nuxt/components/iconProps.js +3 -0
  117. package/nuxt/components/imagePreviewProps.js +3 -0
  118. package/nuxt/components/inputProps.js +3 -0
  119. package/nuxt/components/loadingProps.js +3 -0
  120. package/nuxt/components/modalProps.js +3 -0
  121. package/nuxt/components/paginationProps.js +3 -0
  122. package/nuxt/components/panelProps.js +3 -0
  123. package/nuxt/components/progressProps.js +3 -0
  124. package/nuxt/components/rateProps.js +3 -0
  125. package/nuxt/components/resultProps.js +3 -0
  126. package/nuxt/components/rowProps.js +3 -0
  127. package/nuxt/components/screenSizes.js +3 -0
  128. package/nuxt/components/searchProps.js +3 -0
  129. package/nuxt/components/skeletonProps.js +3 -0
  130. package/nuxt/components/sliderProps.js +3 -0
  131. package/nuxt/components/splitterProps.js +3 -0
  132. package/nuxt/components/statisticProps.js +3 -0
  133. package/nuxt/components/svgIconProps.js +3 -0
  134. package/nuxt/components/switchProps.js +3 -0
  135. package/nuxt/components/tableProps.js +3 -0
  136. package/nuxt/components/tabsProps.js +3 -0
  137. package/nuxt/components/tagProps.js +3 -0
  138. package/nuxt/components/textareaProps.js +3 -0
  139. package/nuxt/components/timeAxisProps.js +3 -0
  140. package/nuxt/components/treeProps.js +3 -0
  141. package/overlay/index.es.js +127 -149
  142. package/overlay/index.umd.js +1 -1
  143. package/overlay/style.css +1 -1
  144. package/package.json +11 -44
  145. package/pagination/index.es.js +158 -148
  146. package/pagination/index.umd.js +1 -1
  147. package/pagination/style.css +1 -1
  148. package/panel/index.es.js +45 -32
  149. package/panel/index.umd.js +1 -1
  150. package/panel/style.css +1 -1
  151. package/popover/index.es.js +317 -246
  152. package/popover/index.umd.js +15 -15
  153. package/popover/style.css +1 -1
  154. package/progress/index.es.js +110 -56
  155. package/progress/index.umd.js +3 -3
  156. package/progress/style.css +1 -1
  157. package/radio/index.es.js +7972 -157
  158. package/radio/index.umd.js +27 -1
  159. package/radio/style.css +1 -1
  160. package/rate/index.es.js +77 -55
  161. package/rate/index.umd.js +1 -1
  162. package/rate/style.css +1 -1
  163. package/result/index.es.js +184 -57
  164. package/result/index.umd.js +1 -1
  165. package/result/style.css +1 -1
  166. package/ripple/index.es.js +47 -42
  167. package/ripple/index.umd.js +1 -1
  168. package/search/index.es.js +3653 -1122
  169. package/search/index.umd.js +18 -18
  170. package/search/style.css +1 -1
  171. package/select/index.es.js +9170 -596
  172. package/select/index.umd.js +27 -1
  173. package/select/style.css +1 -1
  174. package/skeleton/index.es.js +63 -41
  175. package/skeleton/index.umd.js +1 -1
  176. package/skeleton/style.css +1 -1
  177. package/slider/index.es.js +144 -137
  178. package/slider/index.umd.js +1 -1
  179. package/slider/style.css +1 -1
  180. package/splitter/index.es.js +469 -349
  181. package/splitter/index.umd.js +15 -15
  182. package/splitter/style.css +1 -1
  183. package/statistic/index.es.js +41 -34
  184. package/statistic/index.umd.js +1 -1
  185. package/statistic/style.css +1 -1
  186. package/status/index.es.js +27 -6
  187. package/status/index.umd.js +1 -1
  188. package/status/style.css +1 -1
  189. package/style.css +1 -1
  190. package/switch/index.es.js +7802 -64
  191. package/switch/index.umd.js +27 -1
  192. package/switch/style.css +1 -1
  193. package/table/index.es.js +10459 -1511
  194. package/table/index.umd.js +27 -1
  195. package/table/style.css +1 -1
  196. package/tabs/index.es.js +344 -141
  197. package/tabs/index.umd.js +1 -1
  198. package/tabs/style.css +1 -1
  199. package/tag/index.es.js +49 -24
  200. package/tag/index.umd.js +1 -1
  201. package/tag/style.css +1 -1
  202. package/textarea/index.es.js +7921 -83
  203. package/textarea/index.umd.js +35 -1
  204. package/textarea/style.css +1 -1
  205. package/{anchor → time-select}/index.d.ts +0 -0
  206. package/{color-picker → time-select}/index.es.js +4171 -2898
  207. package/time-select/index.umd.js +27 -0
  208. package/{breadcrumb → time-select}/package.json +1 -1
  209. package/time-select/style.css +1 -0
  210. package/{back-top → timeline}/index.d.ts +0 -0
  211. package/timeline/index.es.js +425 -0
  212. package/timeline/index.umd.js +1 -0
  213. package/{back-top → timeline}/package.json +1 -1
  214. package/timeline/style.css +1 -0
  215. package/tooltip/index.es.js +308 -236
  216. package/tooltip/index.umd.js +15 -15
  217. package/tooltip/style.css +1 -1
  218. package/tree/index.es.js +5198 -1850
  219. package/tree/index.umd.js +18 -18
  220. package/tree/style.css +1 -1
  221. package/upload/index.es.js +427 -132
  222. package/upload/index.umd.js +1 -1
  223. package/upload/style.css +1 -1
  224. package/vue-devui.es.js +12064 -15841
  225. package/vue-devui.umd.js +30 -20
  226. package/accordion/index.es.js +0 -720
  227. package/accordion/index.umd.js +0 -1
  228. package/accordion/package.json +0 -7
  229. package/accordion/style.css +0 -1
  230. package/anchor/index.es.js +0 -263
  231. package/anchor/index.umd.js +0 -1
  232. package/anchor/style.css +0 -1
  233. package/back-top/index.es.js +0 -128
  234. package/back-top/index.umd.js +0 -1
  235. package/back-top/style.css +0 -1
  236. package/breadcrumb/index.d.ts +0 -7
  237. package/breadcrumb/index.es.js +0 -127
  238. package/breadcrumb/index.umd.js +0 -1
  239. package/breadcrumb/style.css +0 -1
  240. package/carousel/index.d.ts +0 -7
  241. package/carousel/index.es.js +0 -329
  242. package/carousel/index.umd.js +0 -1
  243. package/carousel/package.json +0 -7
  244. package/carousel/style.css +0 -1
  245. package/cascader/index.d.ts +0 -7
  246. package/cascader/index.es.js +0 -5963
  247. package/cascader/index.umd.js +0 -27
  248. package/cascader/package.json +0 -7
  249. package/cascader/style.css +0 -1
  250. package/color-picker/index.d.ts +0 -7
  251. package/color-picker/index.umd.js +0 -27
  252. package/color-picker/package.json +0 -7
  253. package/color-picker/style.css +0 -1
  254. package/comment/index.d.ts +0 -7
  255. package/comment/index.es.js +0 -86
  256. package/comment/index.umd.js +0 -1
  257. package/comment/package.json +0 -7
  258. package/comment/style.css +0 -1
  259. package/dragdrop/index.d.ts +0 -7
  260. package/dragdrop/index.es.js +0 -157
  261. package/dragdrop/index.umd.js +0 -1
  262. package/dragdrop/package.json +0 -7
  263. package/gantt/index.d.ts +0 -7
  264. package/gantt/index.es.js +0 -523
  265. package/gantt/index.umd.js +0 -1
  266. package/gantt/package.json +0 -7
  267. package/gantt/style.css +0 -1
  268. package/input-icon/index.d.ts +0 -7
  269. package/input-icon/index.es.js +0 -331
  270. package/input-icon/index.umd.js +0 -1
  271. package/input-icon/package.json +0 -7
  272. package/input-icon/style.css +0 -1
  273. package/list/index.d.ts +0 -7
  274. package/list/index.es.js +0 -39
  275. package/list/index.umd.js +0 -1
  276. package/list/package.json +0 -7
  277. package/list/style.css +0 -1
  278. package/nav-sprite/index.d.ts +0 -7
  279. package/nav-sprite/index.es.js +0 -68
  280. package/nav-sprite/index.umd.js +0 -1
  281. package/nav-sprite/package.json +0 -7
  282. package/nuxt/components/Accordion.js +0 -3
  283. package/nuxt/components/Anchor.js +0 -3
  284. package/nuxt/components/BackTop.js +0 -3
  285. package/nuxt/components/Breadcrumb.js +0 -3
  286. package/nuxt/components/Carousel.js +0 -3
  287. package/nuxt/components/CarouselItem.js +0 -3
  288. package/nuxt/components/Cascader.js +0 -3
  289. package/nuxt/components/ColorPicker.js +0 -3
  290. package/nuxt/components/Comment.js +0 -3
  291. package/nuxt/components/FormControl.js +0 -3
  292. package/nuxt/components/FormLabel.js +0 -3
  293. package/nuxt/components/Gantt.js +0 -3
  294. package/nuxt/components/InputIcon.js +0 -3
  295. package/nuxt/components/List.js +0 -3
  296. package/nuxt/components/ListItem.js +0 -3
  297. package/nuxt/components/NavSprite.js +0 -2
  298. package/nuxt/components/QuadrantDiagram.js +0 -3
  299. package/nuxt/components/ReadTip.js +0 -3
  300. package/nuxt/components/StepsGuide.js +0 -3
  301. package/nuxt/components/Sticky.js +0 -2
  302. package/nuxt/components/TagInput.js +0 -3
  303. package/nuxt/components/TimeAxis.js +0 -3
  304. package/nuxt/components/TimeAxisItem.js +0 -3
  305. package/nuxt/components/TimePicker.js +0 -3
  306. package/nuxt/components/Transfer.js +0 -3
  307. package/nuxt/components/TreeSelect.js +0 -3
  308. package/nuxt/components/overlayEmits.js +0 -3
  309. package/nuxt/components/overlayProps.js +0 -3
  310. package/quadrant-diagram/index.d.ts +0 -7
  311. package/quadrant-diagram/index.es.js +0 -5728
  312. package/quadrant-diagram/index.umd.js +0 -27
  313. package/quadrant-diagram/package.json +0 -7
  314. package/quadrant-diagram/style.css +0 -1
  315. package/read-tip/index.d.ts +0 -7
  316. package/read-tip/index.es.js +0 -258
  317. package/read-tip/index.umd.js +0 -1
  318. package/read-tip/package.json +0 -7
  319. package/read-tip/style.css +0 -1
  320. package/steps-guide/index.d.ts +0 -7
  321. package/steps-guide/index.es.js +0 -239
  322. package/steps-guide/index.umd.js +0 -1
  323. package/steps-guide/package.json +0 -7
  324. package/steps-guide/style.css +0 -1
  325. package/sticky/index.d.ts +0 -7
  326. package/sticky/index.es.js +0 -197
  327. package/sticky/index.umd.js +0 -1
  328. package/sticky/package.json +0 -7
  329. package/tag-input/index.d.ts +0 -7
  330. package/tag-input/index.es.js +0 -329
  331. package/tag-input/index.umd.js +0 -1
  332. package/tag-input/package.json +0 -7
  333. package/tag-input/style.css +0 -1
  334. package/time-axis/index.d.ts +0 -7
  335. package/time-axis/index.es.js +0 -299
  336. package/time-axis/index.umd.js +0 -1
  337. package/time-axis/package.json +0 -7
  338. package/time-axis/style.css +0 -1
  339. package/time-picker/index.d.ts +0 -7
  340. package/time-picker/index.es.js +0 -1237
  341. package/time-picker/index.umd.js +0 -1
  342. package/time-picker/package.json +0 -7
  343. package/time-picker/style.css +0 -1
  344. package/transfer/index.d.ts +0 -7
  345. package/transfer/index.es.js +0 -7608
  346. package/transfer/index.umd.js +0 -27
  347. package/transfer/package.json +0 -7
  348. package/transfer/style.css +0 -1
  349. package/tree-select/index.d.ts +0 -7
  350. package/tree-select/index.es.js +0 -623
  351. package/tree-select/index.umd.js +0 -1
  352. package/tree-select/package.json +0 -7
  353. package/tree-select/style.css +0 -1
@@ -1,239 +0,0 @@
1
- import { reactive, ref, nextTick, computed, defineComponent, onMounted, createVNode, Teleport } from "vue";
2
- var stepsGuide = "";
3
- const stepsGuideProps = {
4
- steps: Array,
5
- stepIndex: {
6
- type: Number,
7
- default: void 0
8
- },
9
- showClose: {
10
- type: Boolean,
11
- default: true
12
- },
13
- showDots: {
14
- type: Boolean,
15
- default: true
16
- },
17
- scrollToTargetSwitch: {
18
- type: Boolean,
19
- default: true
20
- },
21
- zIndex: {
22
- type: Number,
23
- default: 1100
24
- },
25
- stepChange: {
26
- type: Function,
27
- default() {
28
- return true;
29
- }
30
- }
31
- };
32
- function useStepsGuidePosition(props, currentStep) {
33
- const guideClassList = reactive(["devui-steps-guide"]);
34
- const stepsRef = ref(null);
35
- const guidePosition = reactive({
36
- left: "",
37
- top: "",
38
- zIndex: props.zIndex
39
- });
40
- const updateGuidePosition = () => {
41
- if (!currentStep.value || !stepsRef.value)
42
- return;
43
- const baseTop = window.pageYOffset - document.documentElement.clientTop;
44
- const baseLeft = window.pageXOffset - document.documentElement.clientLeft;
45
- const currentStepPosition = currentStep.value.position;
46
- const stepGuideElement = stepsRef.value;
47
- let _left, _top;
48
- if (typeof currentStepPosition !== "string") {
49
- const { top = 0, left = 0, type = "top" } = currentStepPosition;
50
- guideClassList.splice(1, 1, type);
51
- _left = left;
52
- _top = top;
53
- } else {
54
- guideClassList.splice(1, 1, currentStepPosition);
55
- const triggerSelector = currentStep.value.target || currentStep.value.trigger;
56
- const triggerElement = document.querySelector(triggerSelector);
57
- if (!triggerElement) {
58
- console.warn(`${triggerSelector} \u4E0D\u5B58\u5728!`);
59
- return false;
60
- }
61
- const targetRect = triggerElement.getBoundingClientRect();
62
- _left = targetRect.left + triggerElement.clientWidth / 2 - stepGuideElement.clientWidth / 2 + baseLeft;
63
- _top = targetRect.top + triggerElement.clientHeight / 2 - stepGuideElement.clientHeight / 2 + baseTop;
64
- const positionTypes = currentStepPosition.split("-");
65
- switch (positionTypes[0]) {
66
- case "top":
67
- _top += -stepGuideElement.clientHeight / 2 - triggerElement.clientHeight;
68
- break;
69
- case "bottom":
70
- _top += stepGuideElement.clientHeight / 2 + triggerElement.clientHeight;
71
- break;
72
- case "left":
73
- _top += stepGuideElement.clientHeight / 2 - triggerElement.clientHeight;
74
- _left += -stepGuideElement.clientWidth / 2 - triggerElement.clientWidth / 2;
75
- break;
76
- case "right":
77
- _top += stepGuideElement.clientHeight / 2 - triggerElement.clientHeight;
78
- _left += stepGuideElement.clientWidth / 2 + triggerElement.clientWidth / 2;
79
- break;
80
- }
81
- switch (positionTypes[1]) {
82
- case "left":
83
- _left += stepGuideElement.clientWidth / 2 - triggerElement.clientWidth / 2;
84
- break;
85
- case "right":
86
- _left += -stepGuideElement.clientWidth / 2 + triggerElement.clientWidth / 2;
87
- break;
88
- }
89
- }
90
- guidePosition.left = _left + "px";
91
- guidePosition.top = _top + "px";
92
- if (props.scrollToTargetSwitch && typeof stepGuideElement.scrollIntoView === "function") {
93
- nextTick(() => {
94
- stepGuideElement.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
95
- });
96
- }
97
- };
98
- return {
99
- stepsRef,
100
- guidePosition,
101
- guideClassList,
102
- updateGuidePosition
103
- };
104
- }
105
- function useStepsGuideCtrl(props, ctx, updateGuidePosition, stepIndex) {
106
- const stepsCount = computed(() => props.steps.length);
107
- const closeGuide = () => {
108
- const _index = stepIndex.value;
109
- stepIndex.value = -1;
110
- nextTick(() => {
111
- ctx.emit("guide-close", _index);
112
- });
113
- };
114
- const setCurrentIndex = (index2) => {
115
- if (index2 !== -1 && props.stepChange()) {
116
- if (index2 > -1 && index2 < stepsCount.value) {
117
- stepIndex.value = index2;
118
- nextTick(() => {
119
- updateGuidePosition();
120
- });
121
- } else {
122
- console.error(`stepIndex is not within the value range`);
123
- }
124
- }
125
- if (index2 === -1)
126
- closeGuide();
127
- };
128
- return {
129
- stepsCount,
130
- closeGuide,
131
- setCurrentIndex
132
- };
133
- }
134
- var StepsGuide = defineComponent({
135
- name: "DStepsGuide",
136
- props: stepsGuideProps,
137
- emits: ["guide-close", "update:stepIndex"],
138
- setup(props, ctx) {
139
- var _a;
140
- const stepIndexData = ref((_a = props.stepIndex) != null ? _a : 0);
141
- const stepIndex = computed({
142
- set: (val) => {
143
- if (props.stepIndex != null) {
144
- ctx.emit("update:stepIndex", val);
145
- }
146
- stepIndexData.value = val;
147
- },
148
- get: () => stepIndexData.value
149
- });
150
- const currentStep = computed(() => {
151
- const _step = props.steps[stepIndex.value];
152
- if (_step)
153
- _step.position = _step.position || "top";
154
- return _step;
155
- });
156
- const {
157
- stepsRef,
158
- guidePosition,
159
- guideClassList,
160
- updateGuidePosition
161
- } = useStepsGuidePosition(props, currentStep);
162
- const {
163
- stepsCount,
164
- closeGuide,
165
- setCurrentIndex
166
- } = useStepsGuideCtrl(props, ctx, updateGuidePosition, stepIndex);
167
- onMounted(() => {
168
- updateGuidePosition();
169
- });
170
- ctx.expose({
171
- closeGuide,
172
- setCurrentIndex
173
- });
174
- return () => stepIndex.value > -1 && stepsCount.value > 0 ? createVNode(Teleport, {
175
- "to": "body"
176
- }, {
177
- default: () => [createVNode("div", {
178
- "style": guidePosition,
179
- "class": guideClassList,
180
- "ref": stepsRef
181
- }, [createVNode("div", {
182
- "class": "devui-shining-dot"
183
- }, null), createVNode("div", {
184
- "class": "devui-shining-plus"
185
- }, null), createVNode("div", {
186
- "class": "devui-arrow"
187
- }, null), createVNode("div", {
188
- "class": "devui-guide-container"
189
- }, [createVNode("p", {
190
- "class": "devui-title"
191
- }, [currentStep.value.title]), props.showClose ? createVNode("div", {
192
- "class": "icon icon-close",
193
- "onClick": closeGuide
194
- }, null) : null, createVNode("div", {
195
- "class": "devui-content"
196
- }, [currentStep.value.content]), createVNode("div", {
197
- "class": "devui-ctrl"
198
- }, [props.showDots ? createVNode("div", {
199
- "class": "devui-dots"
200
- }, [props.steps.map((step, index2) => {
201
- return createVNode("em", {
202
- "class": ["icon icon-dot-status", currentStep.value === step ? "devui-active" : ""],
203
- "key": index2
204
- }, null);
205
- })]) : null, createVNode("div", {
206
- "class": "devui-guide-btn"
207
- }, [stepIndex.value > 0 ? createVNode("div", {
208
- "class": "devui-prev-step",
209
- "onClick": () => setCurrentIndex(stepIndex.value - 1)
210
- }, ["\u4E0A\u4E00\u6B65"]) : null, stepIndex.value === stepsCount.value - 1 ? createVNode("div", {
211
- "onClick": closeGuide
212
- }, ["\u6211\u77E5\u9053\u5566"]) : createVNode("div", {
213
- "class": "devui-next-step",
214
- "onClick": () => {
215
- setCurrentIndex(stepIndex.value + 1);
216
- }
217
- }, ["\u6211\u77E5\u9053\u5566,\u7EE7\u7EED"])])])])])]
218
- }) : null;
219
- }
220
- });
221
- var StepsGuideDirective = {
222
- mounted(el, binding, vNode) {
223
- },
224
- updated(el, binding) {
225
- }
226
- };
227
- StepsGuide.install = function(app) {
228
- app.component(StepsGuide.name, StepsGuide);
229
- };
230
- var index = {
231
- title: "StepsGuide \u64CD\u4F5C\u6307\u5F15",
232
- category: "\u5BFC\u822A",
233
- status: "80%",
234
- install(app) {
235
- app.use(StepsGuide);
236
- app.directive("StepsGuide", StepsGuideDirective);
237
- }
238
- };
239
- export { StepsGuide, index as default };
@@ -1 +0,0 @@
1
- (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";var x="";const y={steps:Array,stepIndex:{type:Number,default:void 0},showClose:{type:Boolean,default:!0},showDots:{type:Boolean,default:!0},scrollToTargetSwitch:{type:Boolean,default:!0},zIndex:{type:Number,default:1100},stepChange:{type:Function,default(){return!0}}};function b(i,o){const r=e.reactive(["devui-steps-guide"]),n=e.ref(null),l=e.reactive({left:"",top:"",zIndex:i.zIndex});return{stepsRef:n,guidePosition:l,guideClassList:r,updateGuidePosition:()=>{if(!o.value||!n.value)return;const m=window.pageYOffset-document.documentElement.clientTop,c=window.pageXOffset-document.documentElement.clientLeft,p=o.value.position,s=n.value;let d,u;if(typeof p!="string"){const{top:f=0,left:t=0,type:g="top"}=p;r.splice(1,1,g),d=t,u=f}else{r.splice(1,1,p);const f=o.value.target||o.value.trigger,t=document.querySelector(f);if(!t)return console.warn(`${f} \u4E0D\u5B58\u5728!`),!1;const g=t.getBoundingClientRect();d=g.left+t.clientWidth/2-s.clientWidth/2+c,u=g.top+t.clientHeight/2-s.clientHeight/2+m;const C=p.split("-");switch(C[0]){case"top":u+=-s.clientHeight/2-t.clientHeight;break;case"bottom":u+=s.clientHeight/2+t.clientHeight;break;case"left":u+=s.clientHeight/2-t.clientHeight,d+=-s.clientWidth/2-t.clientWidth/2;break;case"right":u+=s.clientHeight/2-t.clientHeight,d+=s.clientWidth/2+t.clientWidth/2;break}switch(C[1]){case"left":d+=s.clientWidth/2-t.clientWidth/2;break;case"right":d+=-s.clientWidth/2+t.clientWidth/2;break}}l.left=d+"px",l.top=u+"px",i.scrollToTargetSwitch&&typeof s.scrollIntoView=="function"&&e.nextTick(()=>{s.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})}}}function N(i,o,r,n){const l=e.computed(()=>i.steps.length),v=()=>{const c=n.value;n.value=-1,e.nextTick(()=>{o.emit("guide-close",c)})};return{stepsCount:l,closeGuide:v,setCurrentIndex:c=>{c!==-1&&i.stepChange()&&(c>-1&&c<l.value?(n.value=c,e.nextTick(()=>{r()})):console.error("stepIndex is not within the value range")),c===-1&&v()}}}var h=e.defineComponent({name:"DStepsGuide",props:y,emits:["guide-close","update:stepIndex"],setup(i,o){var f;const r=e.ref((f=i.stepIndex)!=null?f:0),n=e.computed({set:t=>{i.stepIndex!=null&&o.emit("update:stepIndex",t),r.value=t},get:()=>r.value}),l=e.computed(()=>{const t=i.steps[n.value];return t&&(t.position=t.position||"top"),t}),{stepsRef:v,guidePosition:m,guideClassList:c,updateGuidePosition:p}=b(i,l),{stepsCount:s,closeGuide:d,setCurrentIndex:u}=N(i,o,p,n);return e.onMounted(()=>{p()}),o.expose({closeGuide:d,setCurrentIndex:u}),()=>n.value>-1&&s.value>0?e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode("div",{style:m,class:c,ref:v},[e.createVNode("div",{class:"devui-shining-dot"},null),e.createVNode("div",{class:"devui-shining-plus"},null),e.createVNode("div",{class:"devui-arrow"},null),e.createVNode("div",{class:"devui-guide-container"},[e.createVNode("p",{class:"devui-title"},[l.value.title]),i.showClose?e.createVNode("div",{class:"icon icon-close",onClick:d},null):null,e.createVNode("div",{class:"devui-content"},[l.value.content]),e.createVNode("div",{class:"devui-ctrl"},[i.showDots?e.createVNode("div",{class:"devui-dots"},[i.steps.map((t,g)=>e.createVNode("em",{class:["icon icon-dot-status",l.value===t?"devui-active":""],key:g},null))]):null,e.createVNode("div",{class:"devui-guide-btn"},[n.value>0?e.createVNode("div",{class:"devui-prev-step",onClick:()=>u(n.value-1)},["\u4E0A\u4E00\u6B65"]):null,n.value===s.value-1?e.createVNode("div",{onClick:d},["\u6211\u77E5\u9053\u5566"]):e.createVNode("div",{class:"devui-next-step",onClick:()=>{u(n.value+1)}},["\u6211\u77E5\u9053\u5566,\u7EE7\u7EED"])])])])])]}):null}}),V={mounted(i,o,r){},updated(i,o){}};h.install=function(i){i.component(h.name,h)};var w={title:"StepsGuide \u64CD\u4F5C\u6307\u5F15",category:"\u5BFC\u822A",status:"80%",install(i){i.use(h),i.directive("StepsGuide",V)}};a.StepsGuide=h,a.default=w,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
@@ -1,7 +0,0 @@
1
- {
2
- "name": "steps-guide",
3
- "version": "0.0.0",
4
- "main": "index.umd.js",
5
- "module": "index.es.js",
6
- "style": "style.css"
7
- }
@@ -1 +0,0 @@
1
- @charset "UTF-8";.devui-steps-guide{width:400px;min-height:160px;background:#5e7ce0;box-shadow:var(--devui-shadow-length-feedback-overlay, 0 4px 16px 0) #5170ff4d;border-radius:var(--devui-border-radius-feedback, 4px);font-size:12px;color:#fff;padding:20px;position:absolute}.devui-steps-guide .devui-title{font-size:12px;opacity:1;margin:0 0 20px;padding:0}.devui-steps-guide>.devui-arrow,.devui-steps-guide>.devui-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.devui-steps-guide>.devui-arrow{border-width:8px}.devui-steps-guide.left>.devui-arrow{top:23px;right:-6px;margin-top:-3px;border-right-width:0;transform:rotate(-135deg);border-left-color:#5e7ce0}.devui-steps-guide.top>.devui-arrow,.devui-steps-guide.top-left>.devui-arrow,.devui-steps-guide.top-right>.devui-arrow{bottom:-6px;border-bottom-width:0;border-top-color:#5e7ce0;transform:rotate(135deg)}.devui-steps-guide.top>.devui-arrow{left:calc(50% - 4px)}.devui-steps-guide.top-left>.devui-arrow{left:23px}.devui-steps-guide.top-right>.devui-arrow{right:23px;transform:rotate(-135deg)}.devui-steps-guide.right>.devui-arrow{top:23px;left:-6px;margin-top:-3px;border-left-width:0;transform:rotate(135deg);border-right-color:#5e7ce0}.devui-steps-guide.bottom>.devui-arrow,.devui-steps-guide.bottom-left>.devui-arrow,.devui-steps-guide.bottom-right>.devui-arrow{top:-6px;margin-left:3px;border-top-width:0;border-bottom-color:#5e7ce0}.devui-steps-guide.bottom>.devui-arrow{left:calc(50% - 4px);transform:rotate(-135deg)}.devui-steps-guide.bottom-right>.devui-arrow{right:23px;transform:rotate(135deg)}.devui-steps-guide.bottom-left>.devui-arrow{left:23px;transform:rotate(-135deg)}.devui-steps-guide>.devui-shining-dot,.devui-steps-guide .devui-shining-plus{position:absolute;background:#5e7ce0;width:6px;height:6px;border-radius:var(--devui-border-radius-feedback, 4px)}.devui-steps-guide.left>.devui-shining-dot,.devui-steps-guide.left>.devui-shining-plus{top:21px;right:-30px}.devui-steps-guide.right>.devui-shining-dot,.devui-steps-guide.right>.devui-shining-plus{top:21px;left:-30px}.devui-steps-guide.top>.devui-shining-dot,.devui-steps-guide.top>.devui-shining-plus{left:calc(50% - 3px);bottom:-30px}.devui-steps-guide.top-left>.devui-shining-dot,.devui-steps-guide.top-left>.devui-shining-plus{left:21px;bottom:-30px}.devui-steps-guide.top-right>.devui-shining-dot,.devui-steps-guide.top-right>.devui-shining-plus{right:21px;bottom:-30px}.devui-steps-guide.bottom>.devui-shining-dot,.devui-steps-guide.bottom>.devui-shining-plus{left:calc(50% - 3px);top:-30px}.devui-steps-guide.bottom-right>.devui-shining-dot,.devui-steps-guide.bottom-right>.devui-shining-plus{top:-30px;right:21px}.devui-steps-guide.bottom-left>.devui-shining-dot,.devui-steps-guide.bottom-left>.devui-shining-plus{top:-30px;left:21px}.devui-steps-guide .devui-shining-plus{animation:devui-glow 2s 0s infinite}.devui-steps-guide .devui-guide-container{position:relative}.devui-steps-guide .devui-guide-container>.icon-close{position:absolute;top:0;right:0;cursor:pointer}.devui-steps-guide .devui-guide-container .devui-ctrl{display:flex;flex-wrap:wrap}.devui-steps-guide .devui-guide-container .devui-ctrl .devui-dots{color:#fff;position:relative;top:25px;font-size:12px;height:30px}.devui-steps-guide .devui-guide-container .devui-ctrl .devui-dots>em{opacity:.2;margin:0 5px 0 2px}.devui-steps-guide .devui-guide-container .devui-ctrl .devui-dots>em.devui-active{opacity:1}.devui-steps-guide .devui-guide-container .devui-ctrl .devui-guide-btn{display:flex;flex-flow:row nowrap;flex-grow:1;justify-content:flex-end;padding:20px 0 0;white-space:nowrap}.devui-steps-guide .devui-guide-container .devui-ctrl .devui-guide-btn>div{color:#fff;background:rgba(255,255,255,.1);border-radius:4px;padding:5px 15px;cursor:pointer;margin-left:10px}.devui-steps-guide .devui-guide-container .devui-ctrl .devui-guide-btn>div.devui-prev-step{background:none;border:solid 1px rgba(255,255,255,.1)}@keyframes devui-glow{0%{transform:scale(1);opacity:.5}25%{transform:scale(2);opacity:.3}50%{transform:scale(3);opacity:.1}75%{transform:scale(2);opacity:.3}to{transform:scale(1);opacity:.5}}
package/sticky/index.d.ts DELETED
@@ -1,7 +0,0 @@
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;
@@ -1,197 +0,0 @@
1
- import { defineComponent, reactive, watch, onMounted, ref, createVNode } from "vue";
2
- var Sticky = defineComponent({
3
- name: "DSticky",
4
- props: {
5
- zIndex: {
6
- type: Number
7
- },
8
- container: {
9
- type: Object
10
- },
11
- view: {
12
- type: Object,
13
- default: () => {
14
- return {
15
- top: 0,
16
- bottom: 0
17
- };
18
- }
19
- },
20
- scrollTarget: {
21
- type: Object
22
- }
23
- },
24
- emits: ["statusChange"],
25
- setup(props, ctx) {
26
- const {
27
- slots
28
- } = ctx;
29
- let container;
30
- let scrollTarget;
31
- let scrollTimer;
32
- let scrollPreStart;
33
- const THROTTLE_DELAY = 16;
34
- const THROTTLE_TRIGGER = 100;
35
- let parentNode;
36
- let containerLeft = 0;
37
- const state = reactive({
38
- status: "normal"
39
- });
40
- watch(() => props.zIndex, () => {
41
- init();
42
- });
43
- watch(() => props.container, () => {
44
- init();
45
- });
46
- watch(() => props.scrollTarget, () => {
47
- init();
48
- });
49
- watch(() => state.status, () => {
50
- ctx.emit("statusChange", state.status);
51
- }, {
52
- immediate: true
53
- });
54
- const init = () => {
55
- parentNode = stickyRef.value.parentElement;
56
- if (!props.container) {
57
- container = parentNode;
58
- } else {
59
- container = props.container;
60
- }
61
- stickyRef.value.style.zIndex = props.zIndex;
62
- scrollTarget = props.scrollTarget || window;
63
- scrollTarget.addEventListener("scroll", throttle);
64
- initScrollStatus(scrollTarget);
65
- };
66
- const initScrollStatus = (target) => {
67
- const scrollTargets = target === window ? [document.documentElement, document.body] : [target];
68
- let flag = false;
69
- scrollTargets.forEach((scrollTarget2) => {
70
- if (scrollTarget2.scrollTop && scrollTarget2.scrollTop > 0) {
71
- flag = true;
72
- }
73
- });
74
- if (flag) {
75
- setTimeout(scrollHandler);
76
- }
77
- };
78
- const statusProcess = (status) => {
79
- const wrapper = stickyRef.value || document.createElement("div");
80
- switch (status) {
81
- case "normal":
82
- wrapper.style.top = "auto";
83
- wrapper.style.left = "auto";
84
- wrapper.style.position = "static";
85
- break;
86
- case "follow":
87
- const scrollTargetElement = scrollTarget;
88
- const viewOffset = scrollTarget && scrollTarget !== window ? scrollTargetElement.getBoundingClientRect().top : 0;
89
- wrapper.style.top = +viewOffset + (props.view && props.view.top || 0) + "px";
90
- wrapper.style.left = wrapper.getBoundingClientRect().left + "px";
91
- wrapper.style.position = "fixed";
92
- break;
93
- case "stay":
94
- wrapper.style.top = calculateRelativePosition(wrapper, parentNode, "top") + "px";
95
- wrapper.style.left = "auto";
96
- wrapper.style.position = "relative";
97
- break;
98
- case "remain":
99
- if (wrapper.style.position !== "fixed" && wrapper.style.position !== "absolute") {
100
- wrapper.style.top = calculateRelativePosition(wrapper, parentNode, "top") + "px";
101
- wrapper.style.left = "auto";
102
- wrapper.style.position = "absolute";
103
- }
104
- wrapper.style.top = calculateRemainPosition(wrapper, parentNode, container) + "px";
105
- wrapper.style.left = calculateRelativePosition(wrapper, parentNode, "left") + "px";
106
- wrapper.style.position = "relative";
107
- break;
108
- }
109
- };
110
- const throttle = () => {
111
- const fn = scrollAndResizeHock;
112
- const time = Date.now();
113
- if (scrollTimer) {
114
- clearTimeout(scrollTimer);
115
- }
116
- if (!scrollPreStart) {
117
- scrollPreStart = time;
118
- }
119
- if (time - scrollPreStart > THROTTLE_TRIGGER) {
120
- fn();
121
- scrollPreStart = null;
122
- scrollTimer = null;
123
- } else {
124
- scrollTimer = setTimeout(() => {
125
- fn();
126
- scrollPreStart = null;
127
- scrollTimer = null;
128
- }, THROTTLE_DELAY);
129
- }
130
- };
131
- const scrollAndResizeHock = () => {
132
- if (container.getBoundingClientRect().left - (containerLeft || 0) !== 0) {
133
- state.status = "stay";
134
- containerLeft = container.getBoundingClientRect().left;
135
- } else {
136
- scrollHandler();
137
- }
138
- };
139
- const scrollHandler = () => {
140
- const scrollTargetElement = scrollTarget;
141
- const wrapper = stickyRef.value || document.createElement("div");
142
- const viewOffsetTop = scrollTarget && scrollTarget !== window ? scrollTargetElement.getBoundingClientRect().top : 0;
143
- const computedStyle = window.getComputedStyle(container);
144
- if (parentNode.getBoundingClientRect().top - viewOffsetTop > (props.view && props.view.top || 0)) {
145
- state.status = "normal";
146
- statusProcess(state.status);
147
- } else if (container.getBoundingClientRect().top + parseInt(computedStyle.paddingTop, 10) + parseInt(computedStyle.borderTopWidth, 10) - viewOffsetTop >= (props.view && props.view.top || 0)) {
148
- state.status = "normal";
149
- statusProcess(state.status);
150
- } else if (container.getBoundingClientRect().bottom - parseInt(computedStyle.paddingBottom, 10) - parseInt(computedStyle.borderBottomWidth, 10) < viewOffsetTop + (props.view && props.view.top || 0) + wrapper.getBoundingClientRect().height + (props.view && props.view.bottom || 0)) {
151
- state.status = "remain";
152
- statusProcess(state.status);
153
- } else if (container.getBoundingClientRect().top + parseInt(computedStyle.paddingTop, 10) - viewOffsetTop < (props.view && props.view.top || 0)) {
154
- state.status = "follow";
155
- statusProcess(state.status);
156
- }
157
- };
158
- const calculateRelativePosition = (element, relativeElement, direction) => {
159
- const key = {
160
- left: ["left", "Left"],
161
- top: ["top", "Top"]
162
- };
163
- if (window && window.getComputedStyle) {
164
- const computedStyle = window.getComputedStyle(relativeElement);
165
- return element.getBoundingClientRect()[key[direction][0]] - relativeElement.getBoundingClientRect()[key[direction][0]] - parseInt(computedStyle[direction === "left" ? "paddingLeft" : "paddingTop"], 10) - parseInt(computedStyle[direction === "left" ? "borderLeftWidth" : "borderTopWidth"], 10);
166
- }
167
- };
168
- const calculateRemainPosition = (element, relativeElement, container2) => {
169
- if (window && window.getComputedStyle) {
170
- const computedStyle = window.getComputedStyle(container2);
171
- const result = container2.getBoundingClientRect().height - element.getBoundingClientRect().height + container2.getBoundingClientRect().top - relativeElement.getBoundingClientRect().top - parseInt(computedStyle["paddingTop"], 10) - parseInt(computedStyle["borderTopWidth"], 10) - parseInt(computedStyle["paddingBottom"], 10) - parseInt(computedStyle["borderBottomWidth"], 10);
172
- return result < 0 ? 0 : result;
173
- }
174
- };
175
- onMounted(() => {
176
- init();
177
- });
178
- const stickyRef = ref();
179
- return () => {
180
- return createVNode("div", {
181
- "ref": stickyRef
182
- }, [slots.default ? slots.default() : ""]);
183
- };
184
- }
185
- });
186
- Sticky.install = function(app) {
187
- app.component(Sticky.name, Sticky);
188
- };
189
- var index = {
190
- title: "Sticky \u4FBF\u8D34",
191
- category: "\u901A\u7528",
192
- status: "50%",
193
- install(app) {
194
- app.use(Sticky);
195
- }
196
- };
197
- export { Sticky, index as default };
@@ -1 +0,0 @@
1
- (function(a,i){typeof exports=="object"&&typeof module!="undefined"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(a=typeof globalThis!="undefined"?globalThis:a||self,i(a.index={},a.Vue))})(this,function(a,i){"use strict";var r=i.defineComponent({name:"DSticky",props:{zIndex:{type:Number},container:{type:Object},view:{type:Object,default:()=>({top:0,bottom:0})},scrollTarget:{type:Object}},emits:["statusChange"],setup(e,h){const{slots:C}=h;let c,d,f,g;const B=16,S=100;let u,R=0;const s=i.reactive({status:"normal"});i.watch(()=>e.zIndex,()=>{w()}),i.watch(()=>e.container,()=>{w()}),i.watch(()=>e.scrollTarget,()=>{w()}),i.watch(()=>s.status,()=>{h.emit("statusChange",s.status)},{immediate:!0});const w=()=>{u=p.value.parentElement,e.container?c=e.container:c=u,p.value.style.zIndex=e.zIndex,d=e.scrollTarget||window,d.addEventListener("scroll",x),I(d)},I=l=>{const t=l===window?[document.documentElement,document.body]:[l];let o=!1;t.forEach(n=>{n.scrollTop&&n.scrollTop>0&&(o=!0)}),o&&setTimeout(v)},y=l=>{const t=p.value||document.createElement("div");switch(l){case"normal":t.style.top="auto",t.style.left="auto",t.style.position="static";break;case"follow":const n=d&&d!==window?d.getBoundingClientRect().top:0;t.style.top=+n+(e.view&&e.view.top||0)+"px",t.style.left=t.getBoundingClientRect().left+"px",t.style.position="fixed";break;case"stay":t.style.top=T(t,u,"top")+"px",t.style.left="auto",t.style.position="relative";break;case"remain":t.style.position!=="fixed"&&t.style.position!=="absolute"&&(t.style.top=T(t,u,"top")+"px",t.style.left="auto",t.style.position="absolute"),t.style.top=k(t,u,c)+"px",t.style.left=T(t,u,"left")+"px",t.style.position="relative";break}},x=()=>{const l=E,t=Date.now();f&&clearTimeout(f),g||(g=t),t-g>S?(l(),g=null,f=null):f=setTimeout(()=>{l(),g=null,f=null},B)},E=()=>{c.getBoundingClientRect().left-(R||0)!==0?(s.status="stay",R=c.getBoundingClientRect().left):v()},v=()=>{const l=d,t=p.value||document.createElement("div"),o=d&&d!==window?l.getBoundingClientRect().top:0,n=window.getComputedStyle(c);u.getBoundingClientRect().top-o>(e.view&&e.view.top||0)||c.getBoundingClientRect().top+parseInt(n.paddingTop,10)+parseInt(n.borderTopWidth,10)-o>=(e.view&&e.view.top||0)?(s.status="normal",y(s.status)):c.getBoundingClientRect().bottom-parseInt(n.paddingBottom,10)-parseInt(n.borderBottomWidth,10)<o+(e.view&&e.view.top||0)+t.getBoundingClientRect().height+(e.view&&e.view.bottom||0)?(s.status="remain",y(s.status)):c.getBoundingClientRect().top+parseInt(n.paddingTop,10)-o<(e.view&&e.view.top||0)&&(s.status="follow",y(s.status))},T=(l,t,o)=>{const n={left:["left","Left"],top:["top","Top"]};if(window&&window.getComputedStyle){const m=window.getComputedStyle(t);return l.getBoundingClientRect()[n[o][0]]-t.getBoundingClientRect()[n[o][0]]-parseInt(m[o==="left"?"paddingLeft":"paddingTop"],10)-parseInt(m[o==="left"?"borderLeftWidth":"borderTopWidth"],10)}},k=(l,t,o)=>{if(window&&window.getComputedStyle){const n=window.getComputedStyle(o),m=o.getBoundingClientRect().height-l.getBoundingClientRect().height+o.getBoundingClientRect().top-t.getBoundingClientRect().top-parseInt(n.paddingTop,10)-parseInt(n.borderTopWidth,10)-parseInt(n.paddingBottom,10)-parseInt(n.borderBottomWidth,10);return m<0?0:m}};i.onMounted(()=>{w()});const p=i.ref();return()=>i.createVNode("div",{ref:p},[C.default?C.default():""])}});r.install=function(e){e.component(r.name,r)};var b={title:"Sticky \u4FBF\u8D34",category:"\u901A\u7528",status:"50%",install(e){e.use(r)}};a.Sticky=r,a.default=b,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
@@ -1,7 +0,0 @@
1
- {
2
- "name": "sticky",
3
- "version": "0.0.0",
4
- "main": "index.umd.js",
5
- "module": "index.es.js",
6
- "style": "style.css"
7
- }
@@ -1,7 +0,0 @@
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;