vue-devui 1.0.0-rc.8 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +188 -149
- package/alert/index.es.js +14 -9
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +8392 -418
- package/auto-complete/index.umd.js +29 -5
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +59 -74
- package/avatar/index.umd.js +1 -1
- package/badge/index.es.js +10 -4
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +191 -53
- package/button/index.umd.js +17 -17
- package/button/style.css +1 -1
- package/card/index.es.js +7 -3
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +8050 -241
- package/checkbox/index.umd.js +27 -1
- package/checkbox/style.css +1 -1
- package/{date-picker → collapse}/index.d.ts +0 -0
- package/collapse/index.es.js +213 -0
- package/collapse/index.umd.js +1 -0
- package/{date-picker → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.es.js +56 -13
- package/countdown/index.umd.js +1 -1
- package/date-picker-pro/index.d.ts +7 -0
- package/date-picker-pro/index.es.js +12022 -0
- package/date-picker-pro/index.umd.js +27 -0
- package/date-picker-pro/package.json +7 -0
- package/date-picker-pro/style.css +1 -0
- package/drawer/index.es.js +24 -7
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +190 -165
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +785 -145
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +399 -300
- package/form/index.umd.js +16 -16
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +2 -2
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +8 -6
- package/grid/index.umd.js +1 -1
- package/icon/index.es.js +185 -23
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +2 -2
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +8220 -45
- package/input/index.umd.js +27 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +279 -204
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +3 -3
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +53 -53
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/mention/index.d.ts +7 -0
- package/mention/index.es.js +8319 -0
- package/mention/index.umd.js +36 -0
- package/mention/package.json +7 -0
- package/mention/style.css +1 -0
- package/menu/index.d.ts +7 -0
- package/menu/index.es.js +921 -0
- package/menu/index.umd.js +1 -0
- package/menu/package.json +7 -0
- package/menu/style.css +1 -0
- package/message/index.d.ts +7 -0
- package/message/index.es.js +539 -0
- package/message/index.umd.js +1 -0
- package/message/package.json +7 -0
- package/message/style.css +1 -0
- package/modal/index.es.js +451 -173
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +212 -70
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/DRangeDatePickerPro.js +3 -0
- package/nuxt/components/DatePickerPro.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/Mention.js +3 -0
- package/nuxt/components/Menu.js +3 -0
- package/nuxt/components/MenuItem.js +3 -0
- package/nuxt/components/Message.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/OptionGroup.js +3 -0
- package/nuxt/components/RadioButton.js +3 -0
- package/nuxt/components/Step.js +3 -0
- package/nuxt/components/Steps.js +3 -0
- package/nuxt/components/SubMenu.js +3 -0
- package/nuxt/components/TABLE_TOKEN.js +3 -0
- package/nuxt/components/TimePicker.js +3 -0
- package/nuxt/components/TimeSelect.js +3 -0
- package/nuxt/components/animationInjectionKey.js +3 -0
- package/nuxt/components/collapseItemProps.js +3 -0
- package/nuxt/components/collapseProps.js +3 -0
- package/nuxt/components/datePickerProCommonProps.js +3 -0
- package/nuxt/components/datePickerProPanelProps.js +3 -0
- package/nuxt/components/datePickerProProps.js +3 -0
- package/nuxt/components/iconProps.js +1 -0
- package/nuxt/components/mentionProps.js +3 -0
- package/nuxt/components/messageProps.js +3 -0
- package/nuxt/components/paginationInjectionKey.js +3 -0
- package/nuxt/components/roundInjectionKey.js +3 -0
- package/nuxt/components/skeletonItemProps.js +3 -0
- package/nuxt/components/stepProps.js +3 -0
- package/nuxt/components/stepsProps.js +3 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/nuxt/components/tableProps.js +3 -0
- package/nuxt/components/timerPickerPanelProps.js +3 -0
- package/nuxt/components/treeNodeProps.js +3 -0
- package/overlay/index.es.js +89 -142
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +8 -4
- package/pagination/index.es.js +10180 -129
- package/pagination/index.umd.js +27 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +4 -0
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.es.js +262 -229
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +2 -2
- package/progress/index.umd.js +2 -2
- package/progress/style.css +1 -1
- package/radio/index.es.js +7954 -156
- package/radio/index.umd.js +27 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +16 -8
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +170 -22
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +3829 -1042
- package/search/index.umd.js +18 -18
- package/search/style.css +1 -1
- package/select/index.es.js +9202 -495
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +89 -263
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +118 -145
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +454 -233
- package/splitter/index.umd.js +13 -13
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +34 -16
- package/statistic/index.umd.js +1 -1
- package/statistic/style.css +1 -1
- package/status/index.es.js +6 -2
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps/index.d.ts +7 -0
- package/steps/index.es.js +387 -0
- package/steps/index.umd.js +1 -0
- package/steps/package.json +7 -0
- package/steps/style.css +1 -0
- package/style.css +1 -1
- package/switch/index.es.js +7787 -62
- package/switch/index.umd.js +27 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +5225 -1726
- package/table/index.umd.js +18 -18
- package/table/style.css +1 -1
- package/tabs/index.es.js +303 -102
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +11 -8
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +7876 -41
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/time-picker/index.d.ts +7 -0
- package/time-picker/index.es.js +9549 -0
- package/time-picker/index.umd.js +27 -0
- package/time-picker/package.json +7 -0
- package/time-picker/style.css +1 -0
- package/time-select/index.d.ts +7 -0
- package/time-select/index.es.js +9607 -0
- package/time-select/index.umd.js +27 -0
- package/time-select/package.json +7 -0
- package/time-select/style.css +1 -0
- package/timeline/index.es.js +170 -22
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +286 -238
- package/tooltip/index.umd.js +14 -14
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +11342 -793
- package/tree/index.umd.js +27 -1
- package/tree/style.css +1 -1
- package/upload/index.es.js +458 -102
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +20475 -11072
- package/vue-devui.umd.js +31 -24
- package/date-picker/index.es.js +0 -1097
- package/date-picker/index.umd.js +0 -1
- package/date-picker/style.css +0 -1
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/Loading.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
- package/nuxt/components/formControlProps.js +0 -3
- package/nuxt/components/overlayEmits.js +0 -3
- package/nuxt/components/overlayProps.js +0 -3
package/loading/index.es.js
CHANGED
|
@@ -21,7 +21,18 @@ var __publicField = (obj, key, value) => {
|
|
|
21
21
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
|
-
import {
|
|
24
|
+
import { h, render, defineComponent, ref, createVNode } from "vue";
|
|
25
|
+
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
26
|
+
function createComponent(component, props, children = null) {
|
|
27
|
+
const vnode = h(component, __spreadValues({}, props), children);
|
|
28
|
+
const container = document.createElement("div");
|
|
29
|
+
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
30
|
+
render(vnode, container);
|
|
31
|
+
return vnode.component;
|
|
32
|
+
}
|
|
33
|
+
function unmountComponent(ComponnetInstance) {
|
|
34
|
+
render(null, ComponnetInstance == null ? void 0 : ComponnetInstance.vnode[COMPONENT_CONTAINER_SYMBOL]);
|
|
35
|
+
}
|
|
25
36
|
class View {
|
|
26
37
|
constructor() {
|
|
27
38
|
__publicField(this, "top", "50%");
|
|
@@ -62,8 +73,8 @@ function createBem(namespace, element, modifier) {
|
|
|
62
73
|
}
|
|
63
74
|
return cls;
|
|
64
75
|
}
|
|
65
|
-
function useNamespace(block) {
|
|
66
|
-
const namespace = `devui-${block}`;
|
|
76
|
+
function useNamespace(block, needDot = false) {
|
|
77
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
67
78
|
const b = () => createBem(namespace);
|
|
68
79
|
const e = (element) => element ? createBem(namespace, element) : "";
|
|
69
80
|
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
@@ -77,7 +88,7 @@ function useNamespace(block) {
|
|
|
77
88
|
}
|
|
78
89
|
var loading$1 = "";
|
|
79
90
|
var Loading = defineComponent({
|
|
80
|
-
name: "
|
|
91
|
+
name: "Loading",
|
|
81
92
|
inheritAttrs: false,
|
|
82
93
|
props: loadingProps,
|
|
83
94
|
setup(props) {
|
|
@@ -138,18 +149,40 @@ var Loading = defineComponent({
|
|
|
138
149
|
}, [message]) : null])])]);
|
|
139
150
|
}
|
|
140
151
|
});
|
|
141
|
-
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
142
|
-
function createComponent(component, props, children = null) {
|
|
143
|
-
const vnode = h(component, __spreadValues({}, props), children);
|
|
144
|
-
const container = document.createElement("div");
|
|
145
|
-
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
146
|
-
render(vnode, container);
|
|
147
|
-
return vnode.component;
|
|
148
|
-
}
|
|
149
|
-
function unmountComponent(ComponnetInstance) {
|
|
150
|
-
render(null, ComponnetInstance == null ? void 0 : ComponnetInstance.vnode[COMPONENT_CONTAINER_SYMBOL]);
|
|
151
|
-
}
|
|
152
152
|
const loadingConstructor$1 = defineComponent(Loading);
|
|
153
|
+
const cacheTarget = /* @__PURE__ */ new WeakMap();
|
|
154
|
+
const loading = {
|
|
155
|
+
open(options = {}) {
|
|
156
|
+
var _a, _b, _c;
|
|
157
|
+
const parent = options.target || document.body;
|
|
158
|
+
if (cacheTarget.has(parent)) {
|
|
159
|
+
return cacheTarget.get(parent);
|
|
160
|
+
}
|
|
161
|
+
if (parent.style) {
|
|
162
|
+
parent.style.position = options.positionType;
|
|
163
|
+
}
|
|
164
|
+
const isFull = document.body === parent;
|
|
165
|
+
options = __spreadValues(__spreadValues({}, new LoadingOptions()), options);
|
|
166
|
+
const instance = createComponent(loadingConstructor$1, __spreadProps(__spreadValues({}, options), {
|
|
167
|
+
isFull
|
|
168
|
+
}), options.loadingTemplateRef ? () => options.loadingTemplateRef : null);
|
|
169
|
+
cacheTarget.set(parent, instance);
|
|
170
|
+
(_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.open();
|
|
171
|
+
parent.appendChild((_b = instance == null ? void 0 : instance.proxy) == null ? void 0 : _b.$el);
|
|
172
|
+
const close = (_c = instance == null ? void 0 : instance.proxy) == null ? void 0 : _c.close;
|
|
173
|
+
if (instance) {
|
|
174
|
+
instance.loadingInstance = instance == null ? void 0 : instance.proxy;
|
|
175
|
+
if (instance.loadingInstance) {
|
|
176
|
+
instance.loadingInstance.close = (...args) => {
|
|
177
|
+
cacheTarget.delete(parent);
|
|
178
|
+
close == null ? void 0 : close(...args);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return instance;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const loadingConstructor = defineComponent(Loading);
|
|
153
186
|
const cacheInstance = /* @__PURE__ */ new WeakSet();
|
|
154
187
|
const isEmpty = (val) => {
|
|
155
188
|
if (!val) {
|
|
@@ -229,13 +262,13 @@ const handleProps = (el, vprops) => {
|
|
|
229
262
|
var _a;
|
|
230
263
|
const props = __spreadValues(__spreadValues({}, new LoadingOptions()), vprops);
|
|
231
264
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
232
|
-
const loadingInstance = createComponent(loadingConstructor
|
|
233
|
-
el.style.position = props.positionType;
|
|
265
|
+
const loadingInstance = createComponent(loadingConstructor, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
266
|
+
el.style.position = props.positionType || "relative";
|
|
234
267
|
el.options = props;
|
|
235
268
|
el.instance = loadingInstance;
|
|
236
269
|
el.mask = (_a = loadingInstance == null ? void 0 : loadingInstance.proxy) == null ? void 0 : _a.$el;
|
|
237
270
|
};
|
|
238
|
-
const
|
|
271
|
+
const LoadingDirective = {
|
|
239
272
|
mounted: function(el, binding, vnode) {
|
|
240
273
|
handleProps(el, vnode.props);
|
|
241
274
|
removeAttribute(el);
|
|
@@ -250,46 +283,13 @@ const loadingDirective = {
|
|
|
250
283
|
toggleLoading(el, binding);
|
|
251
284
|
}
|
|
252
285
|
};
|
|
253
|
-
const loadingConstructor = defineComponent(Loading);
|
|
254
|
-
const cacheTarget = /* @__PURE__ */ new WeakMap();
|
|
255
|
-
const loading = {
|
|
256
|
-
open(options = {}) {
|
|
257
|
-
var _a, _b, _c;
|
|
258
|
-
const parent = options.target || document.body;
|
|
259
|
-
if (cacheTarget.has(parent)) {
|
|
260
|
-
return cacheTarget.get(parent);
|
|
261
|
-
}
|
|
262
|
-
if (parent.style) {
|
|
263
|
-
parent.style.position = options.positionType;
|
|
264
|
-
}
|
|
265
|
-
const isFull = document.body === parent;
|
|
266
|
-
options = __spreadValues(__spreadValues({}, new LoadingOptions()), options);
|
|
267
|
-
const instance = createComponent(loadingConstructor, __spreadProps(__spreadValues({}, options), {
|
|
268
|
-
isFull
|
|
269
|
-
}), options.loadingTemplateRef ? () => options.loadingTemplateRef : null);
|
|
270
|
-
cacheTarget.set(parent, instance);
|
|
271
|
-
(_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.open();
|
|
272
|
-
parent.appendChild((_b = instance == null ? void 0 : instance.proxy) == null ? void 0 : _b.$el);
|
|
273
|
-
const close = (_c = instance == null ? void 0 : instance.proxy) == null ? void 0 : _c.close;
|
|
274
|
-
if (instance) {
|
|
275
|
-
instance.loadingInstance = instance == null ? void 0 : instance.proxy;
|
|
276
|
-
if (instance.loadingInstance) {
|
|
277
|
-
instance.loadingInstance.close = (...args) => {
|
|
278
|
-
cacheTarget.delete(parent);
|
|
279
|
-
close == null ? void 0 : close(...args);
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
return instance;
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
286
|
var index = {
|
|
287
287
|
title: "Loading \u52A0\u8F7D\u63D0\u793A",
|
|
288
288
|
category: "\u53CD\u9988",
|
|
289
289
|
status: "100%",
|
|
290
290
|
install(app) {
|
|
291
|
-
app.directive("
|
|
291
|
+
app.directive("loading", LoadingDirective);
|
|
292
292
|
app.config.globalProperties.$loadingService = loading;
|
|
293
293
|
}
|
|
294
294
|
};
|
|
295
|
-
export {
|
|
295
|
+
export { LoadingDirective, LoadingOptions, loading as LoadingService, index as default, loadingProps };
|
package/loading/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=Object.defineProperty,D=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var
|
|
1
|
+
var B=Object.defineProperty,D=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var v=(s,t,c)=>t in s?B(s,t,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[t]=c,p=(s,t)=>{for(var c in t||(t={}))I.call(t,c)&&v(s,c,t[c]);if(C)for(var c of C(t))W.call(t,c)&&v(s,c,t[c]);return s},_=(s,t)=>D(s,F(t));var u=(s,t,c)=>(v(s,typeof t!="symbol"?t+"":t,c),c);(function(s,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(s=typeof globalThis!="undefined"?globalThis:s||self,t(s.index={},s.Vue))})(this,function(s,t){"use strict";const c=Symbol("dev_component_container");function w(e,o,r=null){const n=t.h(e,p({},o),r),a=document.createElement("div");return n[c]=a,t.render(n,a),n.component}function $(e){t.render(null,e==null?void 0:e.vnode[c])}class N{constructor(){u(this,"top","50%");u(this,"left","50%")}}const T={message:String,backdrop:Boolean,view:{type:Object,default:()=>new N},zIndex:Number,isFull:{type:Boolean,default:!1}};class b{constructor(){u(this,"target");u(this,"message");u(this,"loadingTemplateRef");u(this,"backdrop",!0);u(this,"positionType","relative");u(this,"view",new N);u(this,"zIndex")}}function m(e,o,r){let n=e;return o&&(n+=`__${o}`),r&&(n+=`--${r}`),n}function j(e,o=!1){const r=o?`.devui-${e}`:`devui-${e}`;return{b:()=>m(r),e:l=>l?m(r,l):"",m:l=>l?m(r,"",l):"",em:(l,y)=>l&&y?m(r,l,y):""}}var q="",A=t.defineComponent({name:"Loading",inheritAttrs:!1,props:T,setup(e){const o={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(o.background="none");const r=t.ref(!1);return{style:o,isShow:r,open:()=>{r.value=!0},close:()=>{r.value=!1}}},render(){var l;const{isShow:e,isFull:o,backdrop:r,style:n,message:a,$slots:d}=this,i=j("loading");return e&&t.createVNode("div",{class:[i.b(),o?i.m("full"):""]},[((l=d.default)==null?void 0:l.call(d))||t.createVNode("div",{class:i.e("wrapper")},[r?t.createVNode("div",{class:i.e("mask")},null):null,t.createVNode("div",{style:n,class:i.e("area")},[t.createVNode("div",{class:i.e("busy-default-spinner")},[t.createVNode("div",{class:i.e("bar1")},null),t.createVNode("div",{class:i.e("bar2")},null),t.createVNode("div",{class:i.e("bar3")},null),t.createVNode("div",{class:i.e("bar4")},null)]),a?t.createVNode("span",{class:i.e("text")},[a]):null])])])}});const z=t.defineComponent(A),g=new WeakMap,x={open(e={}){var d,i,l;const o=e.target||document.body;if(g.has(o))return g.get(o);o.style&&(o.style.position=e.positionType);const r=document.body===o;e=p(p({},new b),e);const n=w(z,_(p({},e),{isFull:r}),e.loadingTemplateRef?()=>e.loadingTemplateRef:null);g.set(o,n),(d=n==null?void 0:n.proxy)==null||d.open(),o.appendChild((i=n==null?void 0:n.proxy)==null?void 0:i.$el);const a=(l=n==null?void 0:n.proxy)==null?void 0:l.close;return n&&(n.loadingInstance=n==null?void 0:n.proxy,n.loadingInstance&&(n.loadingInstance.close=(...y)=>{g.delete(o),a==null||a(...y)})),n}},E=t.defineComponent(A),f=new WeakSet,h=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},S=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),M=e=>{switch(S(e)){case"promise":return[e];case"array":return e.some(r=>S(r)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},V=e=>{f.delete(e),e.instance.proxy.close(),$(e.instance)},L=(e,o)=>{var r,n,a;if(o.value){const d=M(o.value);if(d==="error")return;(a=(n=(r=e==null?void 0:e.instance)==null?void 0:r.proxy)==null?void 0:n.open)==null||a.call(n),e.appendChild(e.mask),f.add(e),d&&Promise.all(d).catch(i=>{console.error(new Error("Promise handling errors"),i)}).finally(()=>{V(e)})}else V(e)},P=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},k=(e,o)=>{var d;const r=p(p({},new b),o),n=r.loadingTemplateRef,a=w(E,p({},r),n?()=>n:null);e.style.position=r.positionType||"relative",e.options=r,e.instance=a,e.mask=(d=a==null?void 0:a.proxy)==null?void 0:d.$el},O={mounted:function(e,o,r){k(e,r.props),P(e),!h(o.value)&&L(e,o)},updated:function(e,o,r){!h(o.value)&&f.has(e)||h(o.value)&&!f.has(e)||(!f.has(e)&&k(e,r.props),P(e),L(e,o))}};var R={title:"Loading \u52A0\u8F7D\u63D0\u793A",category:"\u53CD\u9988",status:"100%",install(e){e.directive("loading",O),e.config.globalProperties.$loadingService=x}};s.LoadingDirective=O,s.LoadingOptions=b,s.LoadingService=x,s.default=R,s.loadingProps=T,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
|
package/loading/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #
|
|
1
|
+
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{z-index:var(--devui-z-index-full-page-overlay, 1080);position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:var(--devui-z-index-full-page-overlay, 1080)}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}
|