vue-devui 1.0.0-pre.0 → 1.0.0-rc.2

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 (264) hide show
  1. package/README.md +126 -187
  2. package/alert/index.es.js +28 -30
  3. package/alert/index.umd.js +1 -1
  4. package/auto-complete/index.es.js +67 -82
  5. package/auto-complete/index.umd.js +3 -1
  6. package/auto-complete/style.css +1 -1
  7. package/badge/index.es.js +1 -1
  8. package/badge/index.umd.js +1 -1
  9. package/badge/style.css +1 -1
  10. package/button/index.es.js +39 -40
  11. package/button/index.umd.js +1 -1
  12. package/countdown/index.es.js +2 -1
  13. package/editable-select/index.es.js +122 -163
  14. package/editable-select/index.umd.js +1 -1
  15. package/fullscreen/index.es.js +13 -16
  16. package/fullscreen/index.umd.js +1 -1
  17. package/icon/index.es.js +39 -57
  18. package/icon/index.umd.js +1 -1
  19. package/image-preview/index.es.js +2 -1
  20. package/modal/index.es.js +81 -76
  21. package/modal/index.umd.js +1 -1
  22. package/modal/style.css +1 -1
  23. package/notification/index.es.js +38 -40
  24. package/notification/index.umd.js +1 -1
  25. package/nuxt/components/PanelBody.js +3 -0
  26. package/nuxt/components/PanelFooter.js +3 -0
  27. package/nuxt/components/PanelHeader.js +3 -0
  28. package/nuxt/components/Timeline.js +3 -0
  29. package/nuxt/components/TimelineItem.js +3 -0
  30. package/nuxt/components/alertProps.js +3 -0
  31. package/nuxt/components/fullscreenProps.js +3 -0
  32. package/nuxt/components/iconProps.js +2 -0
  33. package/nuxt/components/paginationProps.js +3 -0
  34. package/nuxt/components/panelProps.js +3 -0
  35. package/nuxt/components/searchProps.js +3 -0
  36. package/nuxt/components/tagProps.js +3 -0
  37. package/overlay/index.es.js +44 -37
  38. package/overlay/index.umd.js +1 -1
  39. package/overlay/style.css +1 -1
  40. package/package.json +8 -43
  41. package/pagination/index.es.js +10 -12
  42. package/pagination/index.umd.js +1 -1
  43. package/panel/index.es.js +45 -32
  44. package/panel/index.umd.js +1 -1
  45. package/popover/index.es.js +46 -39
  46. package/popover/index.umd.js +6 -6
  47. package/popover/style.css +1 -1
  48. package/progress/index.es.js +1 -1
  49. package/progress/index.umd.js +1 -1
  50. package/progress/style.css +1 -1
  51. package/radio/index.es.js +11 -11
  52. package/radio/index.umd.js +1 -1
  53. package/radio/style.css +1 -1
  54. package/read-tip/index.es.js +6 -3
  55. package/result/index.es.js +38 -53
  56. package/result/index.umd.js +1 -1
  57. package/ripple/index.es.js +47 -42
  58. package/ripple/index.umd.js +1 -1
  59. package/search/index.es.js +2 -5
  60. package/search/index.umd.js +4 -4
  61. package/skeleton/index.es.js +17 -17
  62. package/skeleton/index.umd.js +1 -1
  63. package/slider/index.es.js +60 -59
  64. package/slider/index.umd.js +1 -1
  65. package/splitter/index.es.js +215 -160
  66. package/splitter/index.umd.js +11 -11
  67. package/splitter/style.css +1 -1
  68. package/status/index.es.js +1 -4
  69. package/status/index.umd.js +1 -1
  70. package/status/style.css +1 -1
  71. package/style.css +1 -1
  72. package/tag/index.es.js +15 -18
  73. package/tag/index.umd.js +1 -1
  74. package/tag/style.css +1 -1
  75. package/tag-input/index.es.js +4 -2
  76. package/{accordion → timeline}/index.d.ts +0 -0
  77. package/{time-axis → timeline}/index.es.js +65 -78
  78. package/timeline/index.umd.js +1 -0
  79. package/{anchor → timeline}/package.json +1 -1
  80. package/timeline/style.css +1 -0
  81. package/upload/index.es.js +38 -40
  82. package/upload/index.umd.js +1 -1
  83. package/vue-devui.es.js +1478 -1196
  84. package/vue-devui.umd.js +19 -17
  85. package/accordion/index.es.js +0 -720
  86. package/accordion/index.umd.js +0 -1
  87. package/accordion/package.json +0 -7
  88. package/accordion/style.css +0 -1
  89. package/anchor/index.d.ts +0 -7
  90. package/anchor/index.es.js +0 -263
  91. package/anchor/index.umd.js +0 -1
  92. package/anchor/style.css +0 -1
  93. package/back-top/index.d.ts +0 -7
  94. package/back-top/index.es.js +0 -128
  95. package/back-top/index.umd.js +0 -1
  96. package/back-top/package.json +0 -7
  97. package/back-top/style.css +0 -1
  98. package/breadcrumb/index.d.ts +0 -7
  99. package/breadcrumb/index.es.js +0 -127
  100. package/breadcrumb/index.umd.js +0 -1
  101. package/breadcrumb/package.json +0 -7
  102. package/breadcrumb/style.css +0 -1
  103. package/carousel/index.d.ts +0 -7
  104. package/carousel/index.es.js +0 -329
  105. package/carousel/index.umd.js +0 -1
  106. package/carousel/package.json +0 -7
  107. package/carousel/style.css +0 -1
  108. package/cascader/index.d.ts +0 -7
  109. package/cascader/index.es.js +0 -5963
  110. package/cascader/index.umd.js +0 -27
  111. package/cascader/package.json +0 -7
  112. package/cascader/style.css +0 -1
  113. package/color-picker/index.d.ts +0 -7
  114. package/color-picker/index.es.js +0 -8187
  115. package/color-picker/index.umd.js +0 -27
  116. package/color-picker/package.json +0 -7
  117. package/color-picker/style.css +0 -1
  118. package/date-picker/index.d.ts +0 -7
  119. package/date-picker/index.es.js +0 -1171
  120. package/date-picker/index.umd.js +0 -1
  121. package/date-picker/package.json +0 -7
  122. package/date-picker/style.css +0 -1
  123. package/dragdrop/index.d.ts +0 -7
  124. package/dragdrop/index.es.js +0 -157
  125. package/dragdrop/index.umd.js +0 -1
  126. package/dragdrop/package.json +0 -7
  127. package/drawer/index.d.ts +0 -7
  128. package/drawer/index.es.js +0 -234
  129. package/drawer/index.umd.js +0 -1
  130. package/drawer/package.json +0 -7
  131. package/drawer/style.css +0 -1
  132. package/dropdown/index.d.ts +0 -7
  133. package/dropdown/index.es.js +0 -638
  134. package/dropdown/index.umd.js +0 -1
  135. package/dropdown/package.json +0 -7
  136. package/dropdown/style.css +0 -1
  137. package/form/index.d.ts +0 -7
  138. package/form/index.es.js +0 -7865
  139. package/form/index.umd.js +0 -27
  140. package/form/package.json +0 -7
  141. package/form/style.css +0 -1
  142. package/gantt/index.d.ts +0 -7
  143. package/gantt/index.es.js +0 -523
  144. package/gantt/index.umd.js +0 -1
  145. package/gantt/package.json +0 -7
  146. package/gantt/style.css +0 -1
  147. package/input-icon/index.d.ts +0 -7
  148. package/input-icon/index.es.js +0 -331
  149. package/input-icon/index.umd.js +0 -1
  150. package/input-icon/package.json +0 -7
  151. package/input-icon/style.css +0 -1
  152. package/input-number/index.d.ts +0 -7
  153. package/input-number/index.es.js +0 -240
  154. package/input-number/index.umd.js +0 -1
  155. package/input-number/package.json +0 -7
  156. package/input-number/style.css +0 -1
  157. package/list/index.d.ts +0 -7
  158. package/list/index.es.js +0 -39
  159. package/list/index.umd.js +0 -1
  160. package/list/package.json +0 -7
  161. package/list/style.css +0 -1
  162. package/nav-sprite/index.d.ts +0 -7
  163. package/nav-sprite/index.es.js +0 -68
  164. package/nav-sprite/index.umd.js +0 -1
  165. package/nav-sprite/package.json +0 -7
  166. package/nuxt/components/Accordion.js +0 -3
  167. package/nuxt/components/Anchor.js +0 -3
  168. package/nuxt/components/BackTop.js +0 -3
  169. package/nuxt/components/Breadcrumb.js +0 -3
  170. package/nuxt/components/Carousel.js +0 -3
  171. package/nuxt/components/CarouselItem.js +0 -3
  172. package/nuxt/components/Cascader.js +0 -3
  173. package/nuxt/components/ColorPicker.js +0 -3
  174. package/nuxt/components/Column.js +0 -3
  175. package/nuxt/components/DatePicker.js +0 -3
  176. package/nuxt/components/Drawer.js +0 -3
  177. package/nuxt/components/DrawerService.js +0 -3
  178. package/nuxt/components/Dropdown.js +0 -3
  179. package/nuxt/components/DropdownMenu.js +0 -3
  180. package/nuxt/components/Form.js +0 -3
  181. package/nuxt/components/FormControl.js +0 -3
  182. package/nuxt/components/FormItem.js +0 -3
  183. package/nuxt/components/FormLabel.js +0 -3
  184. package/nuxt/components/FormOperation.js +0 -3
  185. package/nuxt/components/Gantt.js +0 -3
  186. package/nuxt/components/InputIcon.js +0 -3
  187. package/nuxt/components/InputNumber.js +0 -3
  188. package/nuxt/components/List.js +0 -3
  189. package/nuxt/components/ListItem.js +0 -3
  190. package/nuxt/components/NavSprite.js +0 -2
  191. package/nuxt/components/QuadrantDiagram.js +0 -3
  192. package/nuxt/components/Select.js +0 -3
  193. package/nuxt/components/StepsGuide.js +0 -3
  194. package/nuxt/components/StickSlider.js +0 -3
  195. package/nuxt/components/Sticky.js +0 -2
  196. package/nuxt/components/Table.js +0 -3
  197. package/nuxt/components/Tabs.js +0 -3
  198. package/nuxt/components/TimeAxis.js +0 -3
  199. package/nuxt/components/TimeAxisItem.js +0 -3
  200. package/nuxt/components/TimePicker.js +0 -3
  201. package/nuxt/components/Tooltip.js +0 -3
  202. package/nuxt/components/Transfer.js +0 -3
  203. package/nuxt/components/Tree.js +0 -3
  204. package/nuxt/components/TreeSelect.js +0 -3
  205. package/nuxt/components/dropdownMenuProps.js +0 -3
  206. package/nuxt/components/tooltipProps.js +0 -3
  207. package/quadrant-diagram/index.d.ts +0 -7
  208. package/quadrant-diagram/index.es.js +0 -5728
  209. package/quadrant-diagram/index.umd.js +0 -27
  210. package/quadrant-diagram/package.json +0 -7
  211. package/quadrant-diagram/style.css +0 -1
  212. package/select/index.d.ts +0 -7
  213. package/select/index.es.js +0 -706
  214. package/select/index.umd.js +0 -1
  215. package/select/package.json +0 -7
  216. package/select/style.css +0 -1
  217. package/steps-guide/index.d.ts +0 -7
  218. package/steps-guide/index.es.js +0 -239
  219. package/steps-guide/index.umd.js +0 -1
  220. package/steps-guide/package.json +0 -7
  221. package/steps-guide/style.css +0 -1
  222. package/sticky/index.d.ts +0 -7
  223. package/sticky/index.es.js +0 -197
  224. package/sticky/index.umd.js +0 -1
  225. package/sticky/package.json +0 -7
  226. package/table/index.d.ts +0 -7
  227. package/table/index.es.js +0 -1969
  228. package/table/index.umd.js +0 -1
  229. package/table/package.json +0 -7
  230. package/table/style.css +0 -1
  231. package/tabs/index.d.ts +0 -7
  232. package/tabs/index.es.js +0 -194
  233. package/tabs/index.umd.js +0 -1
  234. package/tabs/package.json +0 -7
  235. package/tabs/style.css +0 -1
  236. package/time-axis/index.d.ts +0 -7
  237. package/time-axis/index.umd.js +0 -1
  238. package/time-axis/package.json +0 -7
  239. package/time-axis/style.css +0 -1
  240. package/time-picker/index.d.ts +0 -7
  241. package/time-picker/index.es.js +0 -1237
  242. package/time-picker/index.umd.js +0 -1
  243. package/time-picker/package.json +0 -7
  244. package/time-picker/style.css +0 -1
  245. package/tooltip/index.d.ts +0 -7
  246. package/tooltip/index.es.js +0 -5828
  247. package/tooltip/index.umd.js +0 -27
  248. package/tooltip/package.json +0 -7
  249. package/tooltip/style.css +0 -1
  250. package/transfer/index.d.ts +0 -7
  251. package/transfer/index.es.js +0 -7608
  252. package/transfer/index.umd.js +0 -27
  253. package/transfer/package.json +0 -7
  254. package/transfer/style.css +0 -1
  255. package/tree/index.d.ts +0 -7
  256. package/tree/index.es.js +0 -6490
  257. package/tree/index.umd.js +0 -27
  258. package/tree/package.json +0 -7
  259. package/tree/style.css +0 -1
  260. package/tree-select/index.d.ts +0 -7
  261. package/tree-select/index.es.js +0 -623
  262. package/tree-select/index.umd.js +0 -1
  263. package/tree-select/package.json +0 -7
  264. package/tree-select/style.css +0 -1
@@ -1,234 +0,0 @@
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, Transition, ref, computed, watch, onUnmounted, Teleport, mergeProps, reactive, createApp, isVNode } from "vue";
18
- import { onClickOutside } from "@vueuse/core";
19
- const drawerProps = {
20
- modelValue: {
21
- type: Boolean,
22
- default: false
23
- },
24
- zIndex: {
25
- type: Number,
26
- default: 1e3
27
- },
28
- showOverlay: {
29
- type: Boolean,
30
- default: true
31
- },
32
- escKeyCloseable: {
33
- type: Boolean,
34
- default: true
35
- },
36
- position: {
37
- type: String,
38
- default: "right"
39
- },
40
- lockScroll: {
41
- type: Boolean,
42
- default: true
43
- },
44
- closeOnClickOverlay: {
45
- type: Boolean,
46
- default: true
47
- },
48
- beforeClose: {
49
- type: Function
50
- }
51
- };
52
- const drawerOverlayProps = {
53
- visible: {
54
- type: Boolean,
55
- default: false
56
- }
57
- };
58
- var drawerOverlay = "";
59
- var DrawerOverlay = defineComponent({
60
- name: "DDrawerOverlay",
61
- props: drawerOverlayProps,
62
- emits: ["click"],
63
- setup(props, ctx) {
64
- const handleClick = (e) => {
65
- ctx.emit("click", e);
66
- };
67
- return () => createVNode(Transition, {
68
- "name": "drawer-overlay-fade"
69
- }, {
70
- default: () => [props.visible && createVNode("div", {
71
- "class": "devui-drawer-overlay",
72
- "onClick": handleClick
73
- }, null)]
74
- });
75
- }
76
- });
77
- function lockScroll() {
78
- if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
79
- const scrollTop = document.documentElement.scrollTop;
80
- const style = document.documentElement.getAttribute("style");
81
- document.documentElement.style.position = "fixed";
82
- document.documentElement.style.top = `-${scrollTop}px`;
83
- document.documentElement.style.width = document.documentElement.style.width || "100%";
84
- document.documentElement.style.overflowY = "scroll";
85
- return () => {
86
- if (style) {
87
- document.documentElement.setAttribute("style", style);
88
- } else {
89
- document.documentElement.removeAttribute("style");
90
- }
91
- document.documentElement.scrollTop = scrollTop;
92
- };
93
- }
94
- return;
95
- }
96
- function useDrawer(props, emit) {
97
- const drawerRef = ref();
98
- const drawerClasses = computed(() => ({
99
- "devui-drawer": true,
100
- [`devui-drawer-${props.position}`]: true
101
- }));
102
- const close = () => {
103
- emit("update:modelValue", false);
104
- emit("close");
105
- };
106
- let lockScrollCb;
107
- const execClose = () => {
108
- props.beforeClose ? props.beforeClose(close) : close();
109
- };
110
- const handleOverlayClick = () => {
111
- props.closeOnClickOverlay && execClose();
112
- };
113
- const handleEscClose = (e) => {
114
- e.code === "Escape" && execClose();
115
- };
116
- onClickOutside(drawerRef, execClose);
117
- const removeBodyAdditions = () => {
118
- lockScrollCb == null ? void 0 : lockScrollCb();
119
- document.removeEventListener("keyup", handleEscClose);
120
- };
121
- watch(() => props.modelValue, (val) => {
122
- if (val) {
123
- emit("open");
124
- props.lockScroll && (lockScrollCb = lockScroll());
125
- props.escKeyCloseable && document.addEventListener("keyup", handleEscClose);
126
- } else {
127
- removeBodyAdditions();
128
- }
129
- });
130
- onUnmounted(removeBodyAdditions);
131
- return { drawerRef, drawerClasses, handleOverlayClick };
132
- }
133
- var drawer = "";
134
- var Drawer = defineComponent({
135
- name: "DDrawer",
136
- inheritAttrs: false,
137
- props: drawerProps,
138
- emits: ["close", "update:modelValue", "open"],
139
- setup(props, {
140
- emit,
141
- slots,
142
- attrs
143
- }) {
144
- const {
145
- drawerRef,
146
- drawerClasses,
147
- handleOverlayClick
148
- } = useDrawer(props, emit);
149
- return () => createVNode(Teleport, {
150
- "to": "body"
151
- }, {
152
- default: () => [props.showOverlay && createVNode(DrawerOverlay, {
153
- "visible": props.modelValue,
154
- "style": {
155
- zIndex: props.zIndex
156
- },
157
- "onClick": handleOverlayClick
158
- }, null), createVNode(Transition, {
159
- "name": `drawer-fly-${props.position}`
160
- }, {
161
- default: () => {
162
- var _a;
163
- return [props.modelValue && createVNode("div", mergeProps({
164
- "ref": drawerRef,
165
- "class": drawerClasses.value,
166
- "style": {
167
- zIndex: props.zIndex + 1
168
- }
169
- }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)])];
170
- }
171
- })]
172
- });
173
- }
174
- });
175
- function _isSlot(s) {
176
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
177
- }
178
- const defaultOptions = {
179
- modelValue: false,
180
- content: "",
181
- zIndex: 1e3,
182
- showOverlay: true,
183
- escKeyCloseable: true,
184
- position: "right",
185
- lockScroll: true,
186
- closeOnClickOverlay: true
187
- };
188
- function initInstance(state) {
189
- const container = document.createElement("div");
190
- const content = state.content;
191
- delete state.content;
192
- const app = createApp({
193
- setup() {
194
- const handleVisibleChange = () => {
195
- state.modelValue = false;
196
- };
197
- onUnmounted(() => {
198
- console.log(111);
199
- document.body.removeChild(container);
200
- });
201
- return () => createVNode(Drawer, mergeProps(state, {
202
- "onUpdate:modelValue": handleVisibleChange
203
- }), _isSlot(content) ? content : {
204
- default: () => [content]
205
- });
206
- }
207
- });
208
- document.body.appendChild(container);
209
- app.mount(container);
210
- return app;
211
- }
212
- class DrawerService {
213
- open(options) {
214
- const state = reactive(__spreadValues(__spreadValues({}, defaultOptions), options));
215
- const app = initInstance(state);
216
- state.modelValue = true;
217
- return {
218
- close: () => {
219
- state.modelValue = false;
220
- app.unmount();
221
- }
222
- };
223
- }
224
- }
225
- var index = {
226
- title: "Drawer \u62BD\u5C49\u677F",
227
- category: "\u53CD\u9988",
228
- status: "75%",
229
- install(app) {
230
- app.component(Drawer.name, Drawer);
231
- app.config.globalProperties.$drawerService = new DrawerService();
232
- }
233
- };
234
- export { Drawer, DrawerService, index as default };
@@ -1 +0,0 @@
1
- var x=Object.defineProperty;var C=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var v=(o,e,r)=>e in o?x(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,f=(o,e)=>{for(var r in e||(e={}))N.call(e,r)&&v(o,r,e[r]);if(C)for(var r of C(e))T.call(e,r)&&v(o,r,e[r]);return o};(function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/core"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o.index={},o.Vue,o.core))})(this,function(o,e,r){"use strict";const h={modelValue:{type:Boolean,default:!1},zIndex:{type:Number,default:1e3},showOverlay:{type:Boolean,default:!0},escKeyCloseable:{type:Boolean,default:!0},position:{type:String,default:"right"},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},beforeClose:{type:Function}},b={visible:{type:Boolean,default:!1}};var B="",V=e.defineComponent({name:"DDrawerOverlay",props:b,emits:["click"],setup(t,n){const l=d=>{n.emit("click",d)};return()=>e.createVNode(e.Transition,{name:"drawer-overlay-fade"},{default:()=>[t.visible&&e.createVNode("div",{class:"devui-drawer-overlay",onClick:l},null)]})}});function O(){if(document.documentElement.scrollHeight>document.documentElement.clientHeight){const t=document.documentElement.scrollTop,n=document.documentElement.getAttribute("style");return document.documentElement.style.position="fixed",document.documentElement.style.top=`-${t}px`,document.documentElement.style.width=document.documentElement.style.width||"100%",document.documentElement.style.overflowY="scroll",()=>{n?document.documentElement.setAttribute("style",n):document.documentElement.removeAttribute("style"),document.documentElement.scrollTop=t}}}function E(t,n){const l=e.ref(),d=e.computed(()=>({"devui-drawer":!0,[`devui-drawer-${t.position}`]:!0})),c=()=>{n("update:modelValue",!1),n("close")};let a;const u=()=>{t.beforeClose?t.beforeClose(c):c()},s=()=>{t.closeOnClickOverlay&&u()},p=m=>{m.code==="Escape"&&u()};r.onClickOutside(l,u);const w=()=>{a==null||a(),document.removeEventListener("keyup",p)};return e.watch(()=>t.modelValue,m=>{m?(n("open"),t.lockScroll&&(a=O()),t.escKeyCloseable&&document.addEventListener("keyup",p)):w()}),e.onUnmounted(w),{drawerRef:l,drawerClasses:d,handleOverlayClick:s}}var I="",i=e.defineComponent({name:"DDrawer",inheritAttrs:!1,props:h,emits:["close","update:modelValue","open"],setup(t,{emit:n,slots:l,attrs:d}){const{drawerRef:c,drawerClasses:a,handleOverlayClick:u}=E(t,n);return()=>e.createVNode(e.Teleport,{to:"body"},{default:()=>[t.showOverlay&&e.createVNode(V,{visible:t.modelValue,style:{zIndex:t.zIndex},onClick:u},null),e.createVNode(e.Transition,{name:`drawer-fly-${t.position}`},{default:()=>{var s;return[t.modelValue&&e.createVNode("div",e.mergeProps({ref:c,class:a.value,style:{zIndex:t.zIndex+1}},d),[(s=l.default)==null?void 0:s.call(l)])]}})]})}});function k(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const g={modelValue:!1,content:"",zIndex:1e3,showOverlay:!0,escKeyCloseable:!0,position:"right",lockScroll:!0,closeOnClickOverlay:!0};function D(t){const n=document.createElement("div"),l=t.content;delete t.content;const d=e.createApp({setup(){const c=()=>{t.modelValue=!1};return e.onUnmounted(()=>{console.log(111),document.body.removeChild(n)}),()=>e.createVNode(i,e.mergeProps(t,{"onUpdate:modelValue":c}),k(l)?l:{default:()=>[l]})}});return document.body.appendChild(n),d.mount(n),d}class y{open(n){const l=e.reactive(f(f({},g),n)),d=D(l);return l.modelValue=!0,{close:()=>{l.modelValue=!1,d.unmount()}}}}var S={title:"Drawer \u62BD\u5C49\u677F",category:"\u53CD\u9988",status:"75%",install(t){t.component(i.name,i),t.config.globalProperties.$drawerService=new y}};o.Drawer=i,o.DrawerService=y,o.default=S,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
@@ -1,7 +0,0 @@
1
- {
2
- "name": "drawer",
3
- "version": "0.0.0",
4
- "main": "index.umd.js",
5
- "module": "index.es.js",
6
- "style": "style.css"
7
- }
package/drawer/style.css DELETED
@@ -1 +0,0 @@
1
- .devui-drawer-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(0, 0, 0, .2))}.drawer-overlay-fade-enter-active,.drawer-overlay-fade-leave-active{transition:opacity .1s linear}.drawer-overlay-fade-enter-from,.drawer-overlay-fade-leave-to{opacity:0}.devui-drawer{position:fixed;top:0;bottom:0;width:300px;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-base-bg, #ffffff);transform:translate(0);opacity:1;overflow:auto;box-shadow:var(--devui-shadow-fullscreen-overlay, 0 8px 40px 0) var(--devui-shadow, rgba(0, 0, 0, .2))}.devui-drawer-left{left:0}.devui-drawer-right{right:0}.drawer-fly-right-enter-active{transition:all .3s cubic-bezier(.16,.75,.5,1)}.drawer-fly-right-leave-active{transition:all .3s cubic-bezier(.5,0,.84,.25)}.drawer-fly-right-enter-from,.drawer-fly-right-leave-to{opacity:0;transform:translate(100%)}.drawer-fly-left-enter-active{transition:all .3s cubic-bezier(.16,.75,.5,1)}.drawer-fly-left-leave-active{transition:all .3s cubic-bezier(.5,0,.84,.25)}.drawer-fly-left-enter-from,.drawer-fly-left-leave-to{opacity:0;transform:translate(-100%)}
@@ -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;