vue-devui 1.0.0-beta.16 → 1.0.0-beta.19

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 (190) hide show
  1. package/README.md +29 -21
  2. package/accordion/index.es.js +229 -14
  3. package/accordion/index.umd.js +1 -1
  4. package/accordion/style.css +1 -1
  5. package/alert/index.es.js +28 -30
  6. package/alert/index.umd.js +1 -1
  7. package/alert/style.css +1 -1
  8. package/auto-complete/index.es.js +133 -271
  9. package/auto-complete/index.umd.js +1 -1
  10. package/auto-complete/style.css +1 -1
  11. package/back-top/index.es.js +5 -3
  12. package/back-top/index.umd.js +1 -1
  13. package/badge/index.es.js +13 -19
  14. package/badge/index.umd.js +1 -1
  15. package/badge/style.css +1 -1
  16. package/breadcrumb/index.es.js +2 -1
  17. package/button/index.es.js +95 -122
  18. package/button/index.umd.js +1 -1
  19. package/button/style.css +1 -1
  20. package/carousel/index.es.js +38 -53
  21. package/carousel/index.umd.js +1 -1
  22. package/cascader/index.es.js +5412 -784
  23. package/cascader/index.umd.js +27 -1
  24. package/cascader/style.css +1 -1
  25. package/checkbox/style.css +1 -1
  26. package/color-picker/index.es.js +5517 -281
  27. package/color-picker/index.umd.js +27 -1
  28. package/color-picker/style.css +1 -1
  29. package/countdown/index.es.js +9 -8
  30. package/date-picker/index.es.js +44 -62
  31. package/date-picker/index.umd.js +1 -1
  32. package/date-picker/style.css +1 -1
  33. package/drawer/index.es.js +159 -324
  34. package/drawer/index.umd.js +1 -1
  35. package/drawer/style.css +1 -1
  36. package/dropdown/index.es.js +459 -301
  37. package/dropdown/index.umd.js +1 -1
  38. package/dropdown/style.css +1 -1
  39. package/editable-select/index.es.js +293 -5724
  40. package/editable-select/index.umd.js +1 -27
  41. package/editable-select/style.css +1 -1
  42. package/form/index.es.js +6125 -535
  43. package/form/index.umd.js +27 -1
  44. package/form/style.css +1 -1
  45. package/fullscreen/index.es.js +112 -133
  46. package/fullscreen/index.umd.js +1 -1
  47. package/fullscreen/style.css +1 -1
  48. package/gantt/index.es.js +3 -15
  49. package/gantt/index.umd.js +1 -1
  50. package/gantt/style.css +1 -1
  51. package/grid/index.es.js +1 -1
  52. package/grid/style.css +1 -1
  53. package/icon/index.es.js +39 -57
  54. package/icon/index.umd.js +1 -1
  55. package/image-preview/index.es.js +2 -1
  56. package/input/index.es.js +4 -5
  57. package/input/index.umd.js +1 -1
  58. package/input/style.css +1 -1
  59. package/input-icon/index.es.js +42 -42
  60. package/input-icon/index.umd.js +1 -1
  61. package/input-icon/style.css +1 -1
  62. package/input-number/index.es.js +46 -57
  63. package/input-number/index.umd.js +1 -1
  64. package/input-number/style.css +1 -1
  65. package/{time-axis → list}/index.d.ts +0 -0
  66. package/list/index.es.js +39 -0
  67. package/list/index.umd.js +1 -0
  68. package/{toast → list}/package.json +1 -1
  69. package/list/style.css +1 -0
  70. package/loading/index.es.js +2 -2
  71. package/modal/index.es.js +300 -960
  72. package/modal/index.umd.js +1 -1
  73. package/modal/style.css +1 -1
  74. package/nav-sprite/index.es.js +1 -675
  75. package/nav-sprite/index.umd.js +1 -1
  76. package/{toast → notification}/index.d.ts +0 -0
  77. package/notification/index.es.js +284 -0
  78. package/notification/index.umd.js +1 -0
  79. package/notification/package.json +7 -0
  80. package/notification/style.css +1 -0
  81. package/nuxt/components/DropdownMenu.js +3 -0
  82. package/nuxt/components/IFileOptions.js +3 -0
  83. package/nuxt/components/IUploadOptions.js +3 -0
  84. package/nuxt/components/List.js +3 -0
  85. package/nuxt/components/ListItem.js +3 -0
  86. package/nuxt/components/Notification.js +3 -0
  87. package/nuxt/components/NotificationService.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/Timeline.js +3 -0
  92. package/nuxt/components/TimelineItem.js +3 -0
  93. package/nuxt/components/UploadStatus.js +3 -0
  94. package/nuxt/components/alertProps.js +3 -0
  95. package/nuxt/components/badgeProps.js +3 -0
  96. package/nuxt/components/dropdownMenuProps.js +3 -0
  97. package/nuxt/components/fixedOverlayProps.js +3 -0
  98. package/nuxt/components/flexibleOverlayProps.js +3 -0
  99. package/nuxt/components/fullscreenProps.js +3 -0
  100. package/nuxt/components/iconProps.js +2 -0
  101. package/nuxt/components/notificationProps.js +3 -0
  102. package/nuxt/components/overlayEmits.js +3 -0
  103. package/nuxt/components/overlayProps.js +3 -0
  104. package/nuxt/components/paginationProps.js +3 -0
  105. package/nuxt/components/panelProps.js +3 -0
  106. package/nuxt/components/popoverProps.js +3 -0
  107. package/nuxt/components/searchProps.js +3 -0
  108. package/nuxt/components/tooltipProps.js +3 -0
  109. package/nuxt/components/uploadProps.js +3 -0
  110. package/overlay/index.es.js +152 -198
  111. package/overlay/index.umd.js +1 -1
  112. package/overlay/style.css +1 -1
  113. package/package.json +12 -60
  114. package/pagination/index.es.js +11 -13
  115. package/pagination/index.umd.js +1 -1
  116. package/pagination/style.css +1 -1
  117. package/panel/index.es.js +48 -35
  118. package/panel/index.umd.js +1 -1
  119. package/popover/index.es.js +5954 -201
  120. package/popover/index.umd.js +27 -1
  121. package/popover/style.css +1 -1
  122. package/quadrant-diagram/index.es.js +5405 -166
  123. package/quadrant-diagram/index.umd.js +27 -1
  124. package/radio/style.css +1 -1
  125. package/read-tip/index.es.js +6 -3
  126. package/read-tip/style.css +1 -1
  127. package/result/index.es.js +38 -53
  128. package/result/index.umd.js +1 -1
  129. package/ripple/index.es.js +10 -6
  130. package/search/index.es.js +5428 -200
  131. package/search/index.umd.js +27 -1
  132. package/search/style.css +1 -1
  133. package/select/index.es.js +43 -43
  134. package/select/index.umd.js +1 -1
  135. package/select/style.css +1 -1
  136. package/skeleton/index.es.js +17 -17
  137. package/skeleton/index.umd.js +1 -1
  138. package/slider/index.es.js +2 -1
  139. package/splitter/index.es.js +5815 -99
  140. package/splitter/index.umd.js +27 -1
  141. package/splitter/style.css +1 -1
  142. package/status/index.es.js +1 -4
  143. package/status/index.umd.js +1 -1
  144. package/status/style.css +1 -1
  145. package/steps-guide/index.es.js +6 -3
  146. package/sticky/index.umd.js +1 -1
  147. package/style.css +1 -1
  148. package/table/index.es.js +548 -360
  149. package/table/index.umd.js +1 -1
  150. package/table/style.css +1 -1
  151. package/tabs/index.es.js +3 -4
  152. package/tabs/index.umd.js +1 -1
  153. package/tabs/style.css +1 -1
  154. package/tag/index.es.js +2 -1
  155. package/tag-input/index.es.js +4 -2
  156. package/textarea/style.css +1 -1
  157. package/{theme → theme/theme.scss} +0 -0
  158. package/time-picker/index.es.js +98 -123
  159. package/time-picker/index.umd.js +1 -1
  160. package/time-picker/style.css +1 -1
  161. package/timeline/index.d.ts +7 -0
  162. package/{time-axis → timeline}/index.es.js +65 -78
  163. package/timeline/index.umd.js +1 -0
  164. package/{time-axis → timeline}/package.json +1 -1
  165. package/timeline/style.css +1 -0
  166. package/tooltip/index.es.js +5804 -94
  167. package/tooltip/index.umd.js +27 -1
  168. package/tooltip/style.css +1 -1
  169. package/transfer/index.es.js +5896 -404
  170. package/transfer/index.umd.js +27 -1
  171. package/transfer/style.css +1 -1
  172. package/tree/index.es.js +5439 -814
  173. package/tree/index.umd.js +27 -1
  174. package/tree/style.css +1 -1
  175. package/tree-select/index.es.js +11 -7
  176. package/tree-select/style.css +1 -1
  177. package/upload/index.es.js +335 -2213
  178. package/upload/index.umd.js +1 -1
  179. package/upload/style.css +1 -1
  180. package/vue-devui.es.js +9709 -12248
  181. package/vue-devui.umd.js +20 -20
  182. package/nuxt/components/TimeAxis.js +0 -3
  183. package/nuxt/components/TimeAxisItem.js +0 -3
  184. package/nuxt/components/Toast.js +0 -3
  185. package/nuxt/components/ToastService.js +0 -3
  186. package/time-axis/index.umd.js +0 -1
  187. package/time-axis/style.css +0 -1
  188. package/toast/index.es.js +0 -2063
  189. package/toast/index.umd.js +0 -1
  190. package/toast/style.css +0 -1
@@ -1,678 +1,4 @@
1
- const EMPTY_OBJ = {};
2
- const NOOP = () => {
3
- };
4
- const extend = Object.assign;
5
- const remove = (arr, el) => {
6
- const i = arr.indexOf(el);
7
- if (i > -1) {
8
- arr.splice(i, 1);
9
- }
10
- };
11
- const isArray = Array.isArray;
12
- const isMap = (val) => toTypeString(val) === "[object Map]";
13
- const isSet = (val) => toTypeString(val) === "[object Set]";
14
- const isFunction = (val) => typeof val === "function";
15
- const isString = (val) => typeof val === "string";
16
- const isSymbol = (val) => typeof val === "symbol";
17
- const isObject = (val) => val !== null && typeof val === "object";
18
- const isPromise = (val) => {
19
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
20
- };
21
- const objectToString = Object.prototype.toString;
22
- const toTypeString = (value) => objectToString.call(value);
23
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
24
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
25
- const def = (obj, key, value) => {
26
- Object.defineProperty(obj, key, {
27
- configurable: true,
28
- enumerable: false,
29
- value
30
- });
31
- };
32
- let activeEffectScope;
33
- function recordEffectScope(effect, scope) {
34
- scope = scope || activeEffectScope;
35
- if (scope && scope.active) {
36
- scope.effects.push(effect);
37
- }
38
- }
39
- const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
40
- const newTracked = (dep) => (dep.n & trackOpBit) > 0;
41
- const initDepMarkers = ({ deps }) => {
42
- if (deps.length) {
43
- for (let i = 0; i < deps.length; i++) {
44
- deps[i].w |= trackOpBit;
45
- }
46
- }
47
- };
48
- const finalizeDepMarkers = (effect) => {
49
- const { deps } = effect;
50
- if (deps.length) {
51
- let ptr = 0;
52
- for (let i = 0; i < deps.length; i++) {
53
- const dep = deps[i];
54
- if (wasTracked(dep) && !newTracked(dep)) {
55
- dep.delete(effect);
56
- } else {
57
- deps[ptr++] = dep;
58
- }
59
- dep.w &= ~trackOpBit;
60
- dep.n &= ~trackOpBit;
61
- }
62
- deps.length = ptr;
63
- }
64
- };
65
- let effectTrackDepth = 0;
66
- let trackOpBit = 1;
67
- const maxMarkerBits = 30;
68
- const effectStack = [];
69
- let activeEffect;
70
- class ReactiveEffect {
71
- constructor(fn, scheduler = null, scope) {
72
- this.fn = fn;
73
- this.scheduler = scheduler;
74
- this.active = true;
75
- this.deps = [];
76
- recordEffectScope(this, scope);
77
- }
78
- run() {
79
- if (!this.active) {
80
- return this.fn();
81
- }
82
- if (!effectStack.includes(this)) {
83
- try {
84
- effectStack.push(activeEffect = this);
85
- enableTracking();
86
- trackOpBit = 1 << ++effectTrackDepth;
87
- if (effectTrackDepth <= maxMarkerBits) {
88
- initDepMarkers(this);
89
- } else {
90
- cleanupEffect(this);
91
- }
92
- return this.fn();
93
- } finally {
94
- if (effectTrackDepth <= maxMarkerBits) {
95
- finalizeDepMarkers(this);
96
- }
97
- trackOpBit = 1 << --effectTrackDepth;
98
- resetTracking();
99
- effectStack.pop();
100
- const n = effectStack.length;
101
- activeEffect = n > 0 ? effectStack[n - 1] : void 0;
102
- }
103
- }
104
- }
105
- stop() {
106
- if (this.active) {
107
- cleanupEffect(this);
108
- if (this.onStop) {
109
- this.onStop();
110
- }
111
- this.active = false;
112
- }
113
- }
114
- }
115
- function cleanupEffect(effect) {
116
- const { deps } = effect;
117
- if (deps.length) {
118
- for (let i = 0; i < deps.length; i++) {
119
- deps[i].delete(effect);
120
- }
121
- deps.length = 0;
122
- }
123
- }
124
- let shouldTrack = true;
125
- const trackStack = [];
126
- function enableTracking() {
127
- trackStack.push(shouldTrack);
128
- shouldTrack = true;
129
- }
130
- function resetTracking() {
131
- const last = trackStack.pop();
132
- shouldTrack = last === void 0 ? true : last;
133
- }
134
- new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol));
135
- function isReactive(value) {
136
- if (isReadonly(value)) {
137
- return isReactive(value["__v_raw"]);
138
- }
139
- return !!(value && value["__v_isReactive"]);
140
- }
141
- function isReadonly(value) {
142
- return !!(value && value["__v_isReadonly"]);
143
- }
144
- function markRaw(value) {
145
- def(value, "__v_skip", true);
146
- return value;
147
- }
148
- function isRef(r) {
149
- return Boolean(r && r.__v_isRef === true);
150
- }
151
- function unref(ref) {
152
- return isRef(ref) ? ref.value : ref;
153
- }
154
- const shallowUnwrapHandlers = {
155
- get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
156
- set: (target, key, value, receiver) => {
157
- const oldValue = target[key];
158
- if (isRef(oldValue) && !isRef(value)) {
159
- oldValue.value = value;
160
- return true;
161
- } else {
162
- return Reflect.set(target, key, value, receiver);
163
- }
164
- }
165
- };
166
- function proxyRefs(objectWithRefs) {
167
- return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
168
- }
169
- Promise.resolve();
170
- function queueEffectWithSuspense(fn, suspense) {
171
- if (suspense && suspense.pendingBranch) {
172
- if (isArray(fn)) {
173
- suspense.effects.push(...fn);
174
- } else {
175
- suspense.effects.push(fn);
176
- }
177
- } else {
178
- queuePostFlushCb(fn);
179
- }
180
- }
181
- function defineComponent(options) {
182
- return isFunction(options) ? { setup: options, name: options.name } : options;
183
- }
184
- function resolveMergedOptions(instance) {
185
- const base = instance.type;
186
- const { mixins, extends: extendsOptions } = base;
187
- const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
188
- const cached = cache.get(base);
189
- let resolved;
190
- if (cached) {
191
- resolved = cached;
192
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
193
- {
194
- resolved = base;
195
- }
196
- } else {
197
- resolved = {};
198
- if (globalMixins.length) {
199
- globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
200
- }
201
- mergeOptions(resolved, base, optionMergeStrategies);
202
- }
203
- cache.set(base, resolved);
204
- return resolved;
205
- }
206
- function mergeOptions(to, from, strats, asMixin = false) {
207
- const { mixins, extends: extendsOptions } = from;
208
- if (extendsOptions) {
209
- mergeOptions(to, extendsOptions, strats, true);
210
- }
211
- if (mixins) {
212
- mixins.forEach((m) => mergeOptions(to, m, strats, true));
213
- }
214
- for (const key in from) {
215
- if (asMixin && key === "expose")
216
- ;
217
- else {
218
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
219
- to[key] = strat ? strat(to[key], from[key]) : from[key];
220
- }
221
- }
222
- return to;
223
- }
224
- const internalOptionMergeStrats = {
225
- data: mergeDataFn,
226
- props: mergeObjectOptions,
227
- emits: mergeObjectOptions,
228
- methods: mergeObjectOptions,
229
- computed: mergeObjectOptions,
230
- beforeCreate: mergeAsArray,
231
- created: mergeAsArray,
232
- beforeMount: mergeAsArray,
233
- mounted: mergeAsArray,
234
- beforeUpdate: mergeAsArray,
235
- updated: mergeAsArray,
236
- beforeDestroy: mergeAsArray,
237
- beforeUnmount: mergeAsArray,
238
- destroyed: mergeAsArray,
239
- unmounted: mergeAsArray,
240
- activated: mergeAsArray,
241
- deactivated: mergeAsArray,
242
- errorCaptured: mergeAsArray,
243
- serverPrefetch: mergeAsArray,
244
- components: mergeObjectOptions,
245
- directives: mergeObjectOptions,
246
- watch: mergeWatchOptions,
247
- provide: mergeDataFn,
248
- inject: mergeInject
249
- };
250
- function mergeDataFn(to, from) {
251
- if (!from) {
252
- return to;
253
- }
254
- if (!to) {
255
- return from;
256
- }
257
- return function mergedDataFn() {
258
- return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
259
- };
260
- }
261
- function mergeInject(to, from) {
262
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
263
- }
264
- function normalizeInject(raw) {
265
- if (isArray(raw)) {
266
- const res = {};
267
- for (let i = 0; i < raw.length; i++) {
268
- res[raw[i]] = raw[i];
269
- }
270
- return res;
271
- }
272
- return raw;
273
- }
274
- function mergeAsArray(to, from) {
275
- return to ? [...new Set([].concat(to, from))] : from;
276
- }
277
- function mergeObjectOptions(to, from) {
278
- return to ? extend(extend(Object.create(null), to), from) : from;
279
- }
280
- function mergeWatchOptions(to, from) {
281
- if (!to)
282
- return from;
283
- if (!from)
284
- return to;
285
- const merged = extend(Object.create(null), to);
286
- for (const key in from) {
287
- merged[key] = mergeAsArray(to[key], from[key]);
288
- }
289
- return merged;
290
- }
291
- const queuePostRenderEffect = queueEffectWithSuspense;
292
- const getPublicInstance = (i) => {
293
- if (!i)
294
- return null;
295
- if (isStatefulComponent(i))
296
- return getExposeProxy(i) || i.proxy;
297
- return getPublicInstance(i.parent);
298
- };
299
- const publicPropertiesMap = extend(Object.create(null), {
300
- $: (i) => i,
301
- $el: (i) => i.vnode.el,
302
- $data: (i) => i.data,
303
- $props: (i) => i.props,
304
- $attrs: (i) => i.attrs,
305
- $slots: (i) => i.slots,
306
- $refs: (i) => i.refs,
307
- $parent: (i) => getPublicInstance(i.parent),
308
- $root: (i) => getPublicInstance(i.root),
309
- $emit: (i) => i.emit,
310
- $options: (i) => resolveMergedOptions(i),
311
- $forceUpdate: (i) => () => queueJob(i.update),
312
- $nextTick: (i) => nextTick.bind(i.proxy),
313
- $watch: (i) => instanceWatch.bind(i)
314
- });
315
- let currentInstance = null;
316
- const setCurrentInstance = (instance) => {
317
- currentInstance = instance;
318
- instance.scope.on();
319
- };
320
- const unsetCurrentInstance = () => {
321
- currentInstance && currentInstance.scope.off();
322
- currentInstance = null;
323
- };
324
- function isStatefulComponent(instance) {
325
- return instance.vnode.shapeFlag & 4;
326
- }
327
- function getExposeProxy(instance) {
328
- if (instance.exposed) {
329
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
330
- get(target, key) {
331
- if (key in target) {
332
- return target[key];
333
- } else if (key in publicPropertiesMap) {
334
- return publicPropertiesMap[key](instance);
335
- }
336
- }
337
- }));
338
- }
339
- }
340
- function callWithErrorHandling(fn, instance, type, args) {
341
- let res;
342
- try {
343
- res = args ? fn(...args) : fn();
344
- } catch (err) {
345
- handleError(err, instance, type);
346
- }
347
- return res;
348
- }
349
- function callWithAsyncErrorHandling(fn, instance, type, args) {
350
- if (isFunction(fn)) {
351
- const res = callWithErrorHandling(fn, instance, type, args);
352
- if (res && isPromise(res)) {
353
- res.catch((err) => {
354
- handleError(err, instance, type);
355
- });
356
- }
357
- return res;
358
- }
359
- const values = [];
360
- for (let i = 0; i < fn.length; i++) {
361
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
362
- }
363
- return values;
364
- }
365
- function handleError(err, instance, type, throwInDev = true) {
366
- const contextVNode = instance ? instance.vnode : null;
367
- if (instance) {
368
- let cur = instance.parent;
369
- const exposedInstance = instance.proxy;
370
- const errorInfo = type;
371
- while (cur) {
372
- const errorCapturedHooks = cur.ec;
373
- if (errorCapturedHooks) {
374
- for (let i = 0; i < errorCapturedHooks.length; i++) {
375
- if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
376
- return;
377
- }
378
- }
379
- }
380
- cur = cur.parent;
381
- }
382
- const appErrorHandler = instance.appContext.config.errorHandler;
383
- if (appErrorHandler) {
384
- callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
385
- return;
386
- }
387
- }
388
- logError(err, type, contextVNode, throwInDev);
389
- }
390
- function logError(err, type, contextVNode, throwInDev = true) {
391
- {
392
- console.error(err);
393
- }
394
- }
395
- let isFlushing = false;
396
- let isFlushPending = false;
397
- const queue = [];
398
- let flushIndex = 0;
399
- const pendingPreFlushCbs = [];
400
- let activePreFlushCbs = null;
401
- let preFlushIndex = 0;
402
- const pendingPostFlushCbs = [];
403
- let activePostFlushCbs = null;
404
- let postFlushIndex = 0;
405
- const resolvedPromise = Promise.resolve();
406
- let currentFlushPromise = null;
407
- let currentPreFlushParentJob = null;
408
- function nextTick(fn) {
409
- const p = currentFlushPromise || resolvedPromise;
410
- return fn ? p.then(this ? fn.bind(this) : fn) : p;
411
- }
412
- function findInsertionIndex(id) {
413
- let start = flushIndex + 1;
414
- let end = queue.length;
415
- while (start < end) {
416
- const middle = start + end >>> 1;
417
- const middleJobId = getId(queue[middle]);
418
- middleJobId < id ? start = middle + 1 : end = middle;
419
- }
420
- return start;
421
- }
422
- function queueJob(job) {
423
- if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) {
424
- if (job.id == null) {
425
- queue.push(job);
426
- } else {
427
- queue.splice(findInsertionIndex(job.id), 0, job);
428
- }
429
- queueFlush();
430
- }
431
- }
432
- function queueFlush() {
433
- if (!isFlushing && !isFlushPending) {
434
- isFlushPending = true;
435
- currentFlushPromise = resolvedPromise.then(flushJobs);
436
- }
437
- }
438
- function queueCb(cb, activeQueue, pendingQueue, index2) {
439
- if (!isArray(cb)) {
440
- if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index2 + 1 : index2)) {
441
- pendingQueue.push(cb);
442
- }
443
- } else {
444
- pendingQueue.push(...cb);
445
- }
446
- queueFlush();
447
- }
448
- function queuePreFlushCb(cb) {
449
- queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);
450
- }
451
- function queuePostFlushCb(cb) {
452
- queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);
453
- }
454
- function flushPreFlushCbs(seen, parentJob = null) {
455
- if (pendingPreFlushCbs.length) {
456
- currentPreFlushParentJob = parentJob;
457
- activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
458
- pendingPreFlushCbs.length = 0;
459
- for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
460
- activePreFlushCbs[preFlushIndex]();
461
- }
462
- activePreFlushCbs = null;
463
- preFlushIndex = 0;
464
- currentPreFlushParentJob = null;
465
- flushPreFlushCbs(seen, parentJob);
466
- }
467
- }
468
- function flushPostFlushCbs(seen) {
469
- if (pendingPostFlushCbs.length) {
470
- const deduped = [...new Set(pendingPostFlushCbs)];
471
- pendingPostFlushCbs.length = 0;
472
- if (activePostFlushCbs) {
473
- activePostFlushCbs.push(...deduped);
474
- return;
475
- }
476
- activePostFlushCbs = deduped;
477
- activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
478
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
479
- activePostFlushCbs[postFlushIndex]();
480
- }
481
- activePostFlushCbs = null;
482
- postFlushIndex = 0;
483
- }
484
- }
485
- const getId = (job) => job.id == null ? Infinity : job.id;
486
- function flushJobs(seen) {
487
- isFlushPending = false;
488
- isFlushing = true;
489
- flushPreFlushCbs(seen);
490
- queue.sort((a, b) => getId(a) - getId(b));
491
- const check = NOOP;
492
- try {
493
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
494
- const job = queue[flushIndex];
495
- if (job && job.active !== false) {
496
- if (false)
497
- ;
498
- callWithErrorHandling(job, null, 14);
499
- }
500
- }
501
- } finally {
502
- flushIndex = 0;
503
- queue.length = 0;
504
- flushPostFlushCbs();
505
- isFlushing = false;
506
- currentFlushPromise = null;
507
- if (queue.length || pendingPreFlushCbs.length || pendingPostFlushCbs.length) {
508
- flushJobs(seen);
509
- }
510
- }
511
- }
512
- const INITIAL_WATCHER_VALUE = {};
513
- function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
514
- const instance = currentInstance;
515
- let getter;
516
- let forceTrigger = false;
517
- let isMultiSource = false;
518
- if (isRef(source)) {
519
- getter = () => source.value;
520
- forceTrigger = !!source._shallow;
521
- } else if (isReactive(source)) {
522
- getter = () => source;
523
- deep = true;
524
- } else if (isArray(source)) {
525
- isMultiSource = true;
526
- forceTrigger = source.some(isReactive);
527
- getter = () => source.map((s) => {
528
- if (isRef(s)) {
529
- return s.value;
530
- } else if (isReactive(s)) {
531
- return traverse(s);
532
- } else if (isFunction(s)) {
533
- return callWithErrorHandling(s, instance, 2);
534
- } else
535
- ;
536
- });
537
- } else if (isFunction(source)) {
538
- if (cb) {
539
- getter = () => callWithErrorHandling(source, instance, 2);
540
- } else {
541
- getter = () => {
542
- if (instance && instance.isUnmounted) {
543
- return;
544
- }
545
- if (cleanup) {
546
- cleanup();
547
- }
548
- return callWithAsyncErrorHandling(source, instance, 3, [onInvalidate]);
549
- };
550
- }
551
- } else {
552
- getter = NOOP;
553
- }
554
- if (cb && deep) {
555
- const baseGetter = getter;
556
- getter = () => traverse(baseGetter());
557
- }
558
- let cleanup;
559
- let onInvalidate = (fn) => {
560
- cleanup = effect.onStop = () => {
561
- callWithErrorHandling(fn, instance, 4);
562
- };
563
- };
564
- let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
565
- const job = () => {
566
- if (!effect.active) {
567
- return;
568
- }
569
- if (cb) {
570
- const newValue = effect.run();
571
- if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
572
- if (cleanup) {
573
- cleanup();
574
- }
575
- callWithAsyncErrorHandling(cb, instance, 3, [
576
- newValue,
577
- oldValue === INITIAL_WATCHER_VALUE ? void 0 : oldValue,
578
- onInvalidate
579
- ]);
580
- oldValue = newValue;
581
- }
582
- } else {
583
- effect.run();
584
- }
585
- };
586
- job.allowRecurse = !!cb;
587
- let scheduler;
588
- if (flush === "sync") {
589
- scheduler = job;
590
- } else if (flush === "post") {
591
- scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
592
- } else {
593
- scheduler = () => {
594
- if (!instance || instance.isMounted) {
595
- queuePreFlushCb(job);
596
- } else {
597
- job();
598
- }
599
- };
600
- }
601
- const effect = new ReactiveEffect(getter, scheduler);
602
- if (cb) {
603
- if (immediate) {
604
- job();
605
- } else {
606
- oldValue = effect.run();
607
- }
608
- } else if (flush === "post") {
609
- queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense);
610
- } else {
611
- effect.run();
612
- }
613
- return () => {
614
- effect.stop();
615
- if (instance && instance.scope) {
616
- remove(instance.scope.effects, effect);
617
- }
618
- };
619
- }
620
- function instanceWatch(source, value, options) {
621
- const publicThis = this.proxy;
622
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
623
- let cb;
624
- if (isFunction(value)) {
625
- cb = value;
626
- } else {
627
- cb = value.handler;
628
- options = value;
629
- }
630
- const cur = currentInstance;
631
- setCurrentInstance(this);
632
- const res = doWatch(getter, cb.bind(publicThis), options);
633
- if (cur) {
634
- setCurrentInstance(cur);
635
- } else {
636
- unsetCurrentInstance();
637
- }
638
- return res;
639
- }
640
- function createPathGetter(ctx, path) {
641
- const segments = path.split(".");
642
- return () => {
643
- let cur = ctx;
644
- for (let i = 0; i < segments.length && cur; i++) {
645
- cur = cur[segments[i]];
646
- }
647
- return cur;
648
- };
649
- }
650
- function traverse(value, seen) {
651
- if (!isObject(value) || value["__v_skip"]) {
652
- return value;
653
- }
654
- seen = seen || new Set();
655
- if (seen.has(value)) {
656
- return value;
657
- }
658
- seen.add(value);
659
- if (isRef(value)) {
660
- traverse(value.value, seen);
661
- } else if (isArray(value)) {
662
- for (let i = 0; i < value.length; i++) {
663
- traverse(value[i], seen);
664
- }
665
- } else if (isSet(value) || isMap(value)) {
666
- value.forEach((v) => {
667
- traverse(v, seen);
668
- });
669
- } else if (isPlainObject(value)) {
670
- for (const key in value) {
671
- traverse(value[key], seen);
672
- }
673
- }
674
- return value;
675
- }
1
+ import { defineComponent } from "vue";
676
2
  const navSpriteProps = {
677
3
  target: {
678
4
  type: Object
@@ -1 +1 @@
1
- (function(g,F){typeof exports=="object"&&typeof module!="undefined"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(g=typeof globalThis!="undefined"?globalThis:g||self,F(g.index={}))})(this,function(g){"use strict";const F={},X=()=>{},T=Object.assign,be=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},j=Array.isArray,me=e=>J(e)==="[object Map]",xe=e=>J(e)==="[object Set]",d=e=>typeof e=="function",Se=e=>typeof e=="string",Pe=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",Oe=e=>Z(e)&&d(e.then)&&d(e.catch),we=Object.prototype.toString,J=e=>we.call(e),ve=e=>J(e)==="[object Object]",Q=(e,t)=>!Object.is(e,t),Ce=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})};let _e;function Ie(e,t){t=t||_e,t&&t.active&&t.effects.push(e)}const ke=e=>(e.w&m)>0,Fe=e=>(e.n&m)>0,Te=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=m},je=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const i=t[r];ke(i)&&!Fe(i)?i.delete(e):t[n++]=i,i.w&=~m,i.n&=~m}t.length=n}};let D=0,m=1;const ee=30,E=[];let te;class Ee{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],Ie(this,r)}run(){if(!this.active)return this.fn();if(!E.includes(this))try{return E.push(te=this),Me(),m=1<<++D,D<=ee?Te(this):ne(this),this.fn()}finally{D<=ee&&je(this),m=1<<--D,Ne(),E.pop();const t=E.length;te=t>0?E[t-1]:void 0}}stop(){this.active&&(ne(this),this.onStop&&this.onStop(),this.active=!1)}}function ne(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let W=!0;const re=[];function Me(){re.push(W),W=!0}function Ne(){const e=re.pop();W=e===void 0?!0:e}new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Pe));function M(e){return Re(e)?M(e.__v_raw):!!(e&&e.__v_isReactive)}function Re(e){return!!(e&&e.__v_isReadonly)}function $e(e){return Ce(e,"__v_skip",!0),e}function P(e){return Boolean(e&&e.__v_isRef===!0)}function Ae(e){return P(e)?e.value:e}const Be={get:(e,t,n)=>Ae(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return P(i)&&!P(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function qe(e){return M(e)?e:new Proxy(e,Be)}Promise.resolve();function De(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):et(e)}function He(e){return d(e)?{setup:e,name:e.name}:e}function Ue(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,s=o.get(t);let c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(h=>H(c,h,l,!0)),H(c,t,l)),o.set(t,c),c}function H(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&H(e,o,n,!0),i&&i.forEach(l=>H(e,l,n,!0));for(const l in t)if(!(r&&l==="expose")){const s=Ve[l]||n&&n[l];e[l]=s?s(e[l],t[l]):t[l]}return e}const Ve={data:ie,props:x,emits:x,methods:x,computed:x,beforeCreate:u,created:u,beforeMount:u,mounted:u,beforeUpdate:u,updated:u,beforeDestroy:u,beforeUnmount:u,destroyed:u,unmounted:u,activated:u,deactivated:u,errorCaptured:u,serverPrefetch:u,components:x,directives:x,watch:We,provide:ie,inject:Je};function ie(e,t){return t?e?function(){return T(d(e)?e.call(this,this):e,d(t)?t.call(this,this):t)}:t:e}function Je(e,t){return x(se(e),se(t))}function se(e){if(j(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function u(e,t){return e?[...new Set([].concat(e,t))]:t}function x(e,t){return e?T(T(Object.create(null),e),t):t}function We(e,t){if(!e)return t;if(!t)return e;const n=T(Object.create(null),e);for(const r in t)n[r]=u(e[r],t[r]);return n}const oe=De,L=e=>e?ze(e)?Ge(e)||e.proxy:L(e.parent):null,le=T(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>L(e.parent),$root:e=>L(e.root),$emit:e=>e.emit,$options:e=>Ue(e),$forceUpdate:e=>()=>Ze(e.update),$nextTick:e=>Ke.bind(e.proxy),$watch:e=>rt.bind(e)});let O=null;const ce=e=>{O=e,e.scope.on()},Le=()=>{O&&O.scope.off(),O=null};function ze(e){return e.vnode.shapeFlag&4}function Ge(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(qe($e(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in le)return le[n](e)}}))}function w(e,t,n,r){let i;try{i=r?e(...r):e()}catch(o){ue(o,t,n)}return i}function z(e,t,n,r){if(d(e)){const o=w(e,t,n,r);return o&&Oe(o)&&o.catch(l=>{ue(l,t,n)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(z(e[o],t,n,r));return i}function ue(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const l=t.proxy,s=n;for(;o;){const h=o.ec;if(h){for(let S=0;S<h.length;S++)if(h[S](e,l,s)===!1)return}o=o.parent}const c=t.appContext.config.errorHandler;if(c){w(c,null,10,[e,l,s]);return}}Ye(e,n,i,r)}function Ye(e,t,n,r=!0){console.error(e)}let U=!1,G=!1;const a=[];let y=0;const N=[];let R=null,v=0;const $=[];let b=null,C=0;const fe=Promise.resolve();let Y=null,K=null;function Ke(e){const t=Y||fe;return e?t.then(this?e.bind(this):e):t}function Xe(e){let t=y+1,n=a.length;for(;t<n;){const r=t+n>>>1;A(a[r])<e?t=r+1:n=r}return t}function Ze(e){(!a.length||!a.includes(e,U&&e.allowRecurse?y+1:y))&&e!==K&&(e.id==null?a.push(e):a.splice(Xe(e.id),0,e),ae())}function ae(){!U&&!G&&(G=!0,Y=fe.then(he))}function pe(e,t,n,r){j(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),ae()}function Qe(e){pe(e,R,N,v)}function et(e){pe(e,b,$,C)}function de(e,t=null){if(N.length){for(K=t,R=[...new Set(N)],N.length=0,v=0;v<R.length;v++)R[v]();R=null,v=0,K=null,de(e,t)}}function tt(e){if($.length){const t=[...new Set($)];if($.length=0,b){b.push(...t);return}for(b=t,b.sort((n,r)=>A(n)-A(r)),C=0;C<b.length;C++)b[C]();b=null,C=0}}const A=e=>e.id==null?1/0:e.id;function he(e){G=!1,U=!0,de(e),a.sort((n,r)=>A(n)-A(r));const t=X;try{for(y=0;y<a.length;y++){const n=a[y];n&&n.active!==!1&&w(n,null,14)}}finally{y=0,a.length=0,tt(),U=!1,Y=null,(a.length||N.length||$.length)&&he(e)}}const ge={};function nt(e,t,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:l}=F){const s=O;let c,h=!1,S=!1;if(P(e)?(c=()=>e.value,h=!!e._shallow):M(e)?(c=()=>e,r=!0):j(e)?(S=!0,h=e.some(M),c=()=>e.map(f=>{if(P(f))return f.value;if(M(f))return _(f);if(d(f))return w(f,s,2)})):d(e)?t?c=()=>w(e,s,2):c=()=>{if(!(s&&s.isUnmounted))return q&&q(),z(e,s,3,[ye])}:c=X,t&&r){const f=c;c=()=>_(f())}let q,ye=f=>{q=p.onStop=()=>{w(f,s,4)}},I=S?[]:ge;const k=()=>{if(!!p.active)if(t){const f=p.run();(r||h||(S?f.some((ot,lt)=>Q(ot,I[lt])):Q(f,I)))&&(q&&q(),z(t,s,3,[f,I===ge?void 0:I,ye]),I=f)}else p.run()};k.allowRecurse=!!t;let V;i==="sync"?V=k:i==="post"?V=()=>oe(k,s&&s.suspense):V=()=>{!s||s.isMounted?Qe(k):k()};const p=new Ee(c,V);return t?n?k():I=p.run():i==="post"?oe(p.run.bind(p),s&&s.suspense):p.run(),()=>{p.stop(),s&&s.scope&&be(s.scope.effects,p)}}function rt(e,t,n){const r=this.proxy,i=Se(e)?e.includes(".")?it(r,e):()=>r[e]:e.bind(r,r);let o;d(t)?o=t:(o=t.handler,n=t);const l=O;ce(this);const s=nt(i,o.bind(r),n);return l?ce(l):Le(),s}function it(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function _(e,t){if(!Z(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),P(e))_(e.value,t);else if(j(e))for(let n=0;n<e.length;n++)_(e[n],t);else if(xe(e)||me(e))e.forEach(n=>{_(n,t)});else if(ve(e))for(const n in e)_(e[n],t);return e}var B=He({name:"DNavSprite",props:{target:{type:Object},scrollTarget:{type:Object},view:{type:Object,default:{top:0,bottom:0}},hashSupport:{type:Boolean,default:!1},mode:{type:String,default:"default"},maxLevel:{type:Number,default:3},title:{type:String,default:"menu"},indent:{type:Number,default:2},width:{type:Number,default:300},height:{type:Number,default:400},isOpen:{type:Boolean,default:!0},spriteOption:{type:Object}},emits:["afterNavInit"],setup(e){return{}}});B.install=function(e){e.component(B.name,B)};var st={title:"NavSprite \u5BFC\u822A\u7CBE\u7075",category:"\u5BFC\u822A",status:"10%",install(e){e.use(B)}};g.NavSprite=B,g.default=st,Object.defineProperty(g,"__esModule",{value:!0}),g[Symbol.toStringTag]="Module"});
1
+ (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){"use strict";const i={target:{type:Object},scrollTarget:{type:Object},view:{type:Object,default:{top:0,bottom:0}},hashSupport:{type:Boolean,default:!1},mode:{type:String,default:"default"},maxLevel:{type:Number,default:3},title:{type:String,default:"menu"},indent:{type:Number,default:2},width:{type:Number,default:300},height:{type:Number,default:400},isOpen:{type:Boolean,default:!0},spriteOption:{type:Object}};var u=t.defineComponent({name:"DNavSprite",props:i,emits:["afterNavInit"],setup(n){return{}}});u.install=function(n){n.component(u.name,u)};var p={title:"NavSprite \u5BFC\u822A\u7CBE\u7075",category:"\u5BFC\u822A",status:"10%",install(n){n.use(u)}};e.NavSprite=u,e.default=p,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"});
File without changes