ele-admin-plus 1.1.4-beta.1 → 1.1.4-beta.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.
- package/es/ele-app/style/overwrite.scss +5 -0
- package/es/ele-count-up/index.d.ts +2 -2
- package/es/ele-count-up/index.js +2 -1
- package/es/ele-count-up/props.d.ts +1 -1
- package/es/ele-modal/types/index.d.ts +9 -0
- package/es/ele-modal/util.js +45 -32
- package/es/ele-printer/index.d.ts +1 -0
- package/es/ele-printer/index.js +11 -4
- package/es/ele-pro-layout/index.js +4 -4
- package/es/ele-pro-layout/style/layout-mobile.scss +1 -0
- package/es/ele-tabs/index.js +1 -0
- package/es/ele-xg-player/index.js +1 -0
- package/lib/ele-app/style/overwrite.scss +5 -0
- package/lib/ele-count-up/index.d.ts +2 -2
- package/lib/ele-count-up/index.js +2 -1
- package/lib/ele-count-up/props.d.ts +1 -1
- package/lib/ele-modal/types/index.d.ts +9 -0
- package/lib/ele-modal/util.js +45 -32
- package/lib/ele-printer/index.d.ts +1 -0
- package/lib/ele-printer/index.js +10 -3
- package/lib/ele-pro-layout/index.js +4 -4
- package/lib/ele-pro-layout/style/layout-mobile.scss +1 -0
- package/lib/ele-tabs/index.js +1 -0
- package/lib/ele-xg-player/index.js +1 -0
- package/package.json +4 -4
- package/typings/global.d.ts +52 -52
|
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
reset: () => void;
|
|
18
18
|
update: (newEndVal?: string | number) => void;
|
|
19
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
-
ready: (_instance?: CountUp | undefined) => boolean;
|
|
20
|
+
ready: (_instance?: CountUp | null | undefined) => boolean;
|
|
21
21
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
delay: {
|
|
23
23
|
type: NumberConstructor;
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
};
|
|
30
30
|
options: import("vue").PropType<import("countup.js").CountUpOptions>;
|
|
31
31
|
}>> & {
|
|
32
|
-
onReady?: ((_instance?: CountUp | undefined) => any) | undefined;
|
|
32
|
+
onReady?: ((_instance?: CountUp | null | undefined) => any) | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
delay: number;
|
|
35
35
|
}, {}>;
|
package/es/ele-count-up/index.js
CHANGED
|
@@ -25,3 +25,12 @@ export type PositionValue = 'top' | 'bottom' | 'left' | 'right' | 'leftTop' | 'l
|
|
|
25
25
|
* 初始位置类型
|
|
26
26
|
*/
|
|
27
27
|
export type Position = PositionValue | PositionObject;
|
|
28
|
+
/**
|
|
29
|
+
* 弹窗坐标
|
|
30
|
+
*/
|
|
31
|
+
export interface Location {
|
|
32
|
+
top?: number;
|
|
33
|
+
left?: number;
|
|
34
|
+
topValue?: string;
|
|
35
|
+
leftValue?: string;
|
|
36
|
+
}
|
package/es/ele-modal/util.js
CHANGED
|
@@ -20,6 +20,8 @@ const singleSidebarClass = "ele-state-single-sidebar";
|
|
|
20
20
|
const topLayoutClass = "ele-state-top-layout";
|
|
21
21
|
const expandedClass = "ele-state-expanded";
|
|
22
22
|
const mobileClass = "ele-state-mobile";
|
|
23
|
+
const fixTop = 0.65;
|
|
24
|
+
const fixLeft = 0.65;
|
|
23
25
|
function initModalStyle(modalEl, resizable) {
|
|
24
26
|
modalEl.style.top = modalEl.offsetTop + "px";
|
|
25
27
|
modalEl.style.left = modalEl.offsetLeft + "px";
|
|
@@ -102,8 +104,8 @@ function handleMovable(event, props) {
|
|
|
102
104
|
left: e.clientX - downX + downOL,
|
|
103
105
|
top: e.clientY - downY + downOT
|
|
104
106
|
};
|
|
105
|
-
const limitL = wrapEl.clientWidth - modalEl.clientWidth -
|
|
106
|
-
const limitT = wrapEl.clientHeight - modalEl.clientHeight -
|
|
107
|
+
const limitL = wrapEl.clientWidth - modalEl.clientWidth - fixLeft;
|
|
108
|
+
const limitT = wrapEl.clientHeight - modalEl.clientHeight - fixTop;
|
|
107
109
|
if (!props.moveOut) {
|
|
108
110
|
if (position.left < 0) {
|
|
109
111
|
position.left = 0;
|
|
@@ -138,8 +140,8 @@ function handleMovable(event, props) {
|
|
|
138
140
|
position.top = minLimitT;
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
|
-
modalEl.style.left = `${position.left}px`;
|
|
142
|
-
modalEl.style.top = `${position.top}px`;
|
|
143
|
+
modalEl.style.left = `${Math.floor(position.left)}px`;
|
|
144
|
+
modalEl.style.top = `${Math.floor(position.top)}px`;
|
|
143
145
|
};
|
|
144
146
|
const mouseupFn = function() {
|
|
145
147
|
modalEl.style.userSelect = "";
|
|
@@ -182,7 +184,7 @@ function handleResizable(event, props) {
|
|
|
182
184
|
const mousemoveFn = function(e) {
|
|
183
185
|
if (props.resizable !== "vertical") {
|
|
184
186
|
const w = e.clientX - downX + downW;
|
|
185
|
-
const maxW = wrapEl.clientWidth - modalEl.offsetLeft -
|
|
187
|
+
const maxW = wrapEl.clientWidth - modalEl.offsetLeft - fixLeft;
|
|
186
188
|
const nw = (w < props.minWidth ? props.minWidth : !canMoveOut(props.moveOut, "right") && w > maxW ? maxW : w) + "px";
|
|
187
189
|
modalEl.style.width = nw;
|
|
188
190
|
modalEl.style.maxWidth = nw;
|
|
@@ -190,7 +192,7 @@ function handleResizable(event, props) {
|
|
|
190
192
|
}
|
|
191
193
|
if (props.resizable !== "horizontal") {
|
|
192
194
|
const h = e.clientY - downY + downH;
|
|
193
|
-
const maxH = wrapEl.clientHeight - modalEl.offsetTop -
|
|
195
|
+
const maxH = wrapEl.clientHeight - modalEl.offsetTop - fixTop;
|
|
194
196
|
const nh = (h < props.minHeight ? props.minHeight : !canMoveOut(props.moveOut, "bottom") && h > maxH ? maxH : h) + "px";
|
|
195
197
|
modalEl.style.height = nh;
|
|
196
198
|
modalEl.style.maxHeight = nh;
|
|
@@ -248,60 +250,71 @@ function setModalPosition(modalEl, resizable, position, moveOut) {
|
|
|
248
250
|
if (!wrapEl) {
|
|
249
251
|
return;
|
|
250
252
|
}
|
|
253
|
+
const location = {};
|
|
251
254
|
initModalStyle(modalEl, resizable);
|
|
252
255
|
const canOutB = canMoveOut(moveOut, "bottom");
|
|
253
256
|
const canOutR = canMoveOut(moveOut, "right");
|
|
254
|
-
const t = wrapEl.clientHeight - modalEl.clientHeight - (canOutB ? 0 :
|
|
257
|
+
const t = wrapEl.clientHeight - modalEl.clientHeight - (canOutB ? 0 : fixTop);
|
|
255
258
|
const maxTop = t < 0 ? 0 : t;
|
|
256
|
-
const l = wrapEl.clientWidth - modalEl.clientWidth - (canOutR ? 0 :
|
|
259
|
+
const l = wrapEl.clientWidth - modalEl.clientWidth - (canOutR ? 0 : fixLeft);
|
|
257
260
|
const maxLeft = l < 0 ? 0 : l;
|
|
258
261
|
if (position === "top") {
|
|
259
|
-
|
|
260
|
-
|
|
262
|
+
location.top = 0;
|
|
263
|
+
location.left = maxLeft / 2;
|
|
261
264
|
} else if (position === "bottom") {
|
|
262
|
-
|
|
263
|
-
|
|
265
|
+
location.top = maxTop;
|
|
266
|
+
location.left = maxLeft / 2;
|
|
264
267
|
} else if (position === "left") {
|
|
265
|
-
|
|
266
|
-
|
|
268
|
+
location.top = maxTop / 2;
|
|
269
|
+
location.left = 0;
|
|
267
270
|
} else if (position === "right") {
|
|
268
|
-
|
|
269
|
-
|
|
271
|
+
location.top = maxTop / 2;
|
|
272
|
+
location.left = maxLeft;
|
|
270
273
|
} else if (position === "leftTop") {
|
|
271
|
-
|
|
272
|
-
|
|
274
|
+
location.top = 0;
|
|
275
|
+
location.left = 0;
|
|
273
276
|
} else if (position === "leftBottom") {
|
|
274
|
-
|
|
275
|
-
|
|
277
|
+
location.top = maxTop;
|
|
278
|
+
location.left = 0;
|
|
276
279
|
} else if (position === "rightTop") {
|
|
277
|
-
|
|
278
|
-
|
|
280
|
+
location.top = 0;
|
|
281
|
+
location.left = maxLeft;
|
|
279
282
|
} else if (position === "rightBottom") {
|
|
280
|
-
|
|
281
|
-
|
|
283
|
+
location.top = maxTop;
|
|
284
|
+
location.left = maxLeft;
|
|
282
285
|
} else if (position === "center") {
|
|
283
|
-
|
|
284
|
-
|
|
286
|
+
location.top = maxTop / 2;
|
|
287
|
+
location.left = maxLeft / 2;
|
|
285
288
|
} else if (typeof position === "object") {
|
|
286
289
|
if (position.top != null) {
|
|
287
290
|
if (typeof position.top === "number") {
|
|
288
|
-
|
|
291
|
+
location.top = position.top;
|
|
289
292
|
} else {
|
|
290
|
-
|
|
293
|
+
location.topValue = position.top;
|
|
291
294
|
}
|
|
292
295
|
} else if (position.left != null) {
|
|
293
|
-
|
|
296
|
+
location.top = maxTop / 2;
|
|
294
297
|
}
|
|
295
298
|
if (position.left != null) {
|
|
296
299
|
if (typeof position.left === "number") {
|
|
297
|
-
|
|
300
|
+
location.left = position.left;
|
|
298
301
|
} else {
|
|
299
|
-
|
|
302
|
+
location.leftValue = position.left;
|
|
300
303
|
}
|
|
301
304
|
} else if (position.top != null) {
|
|
302
|
-
|
|
305
|
+
location.left = maxLeft / 2;
|
|
303
306
|
}
|
|
304
307
|
}
|
|
308
|
+
if (location.top != null) {
|
|
309
|
+
modalEl.style.top = `${Math.floor(location.top)}px`;
|
|
310
|
+
} else if (location.topValue != null) {
|
|
311
|
+
modalEl.style.top = location.topValue;
|
|
312
|
+
}
|
|
313
|
+
if (location.left != null) {
|
|
314
|
+
modalEl.style.left = `${Math.floor(location.left)}px`;
|
|
315
|
+
} else if (location.leftValue != null) {
|
|
316
|
+
modalEl.style.left = location.leftValue;
|
|
317
|
+
}
|
|
305
318
|
}
|
|
306
319
|
function setInitPosition(modalEl, resizable, position, moveOut, force) {
|
|
307
320
|
const attr = "ele-position";
|
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
}, {
|
|
13
13
|
container: import("vue").ShallowRef<Element>;
|
|
14
14
|
visible: import("vue").Ref<boolean>;
|
|
15
|
+
isStatic: import("vue").ComputedRef<boolean>;
|
|
15
16
|
print: () => void;
|
|
16
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
18
|
'update:modelValue': (_value: boolean) => boolean;
|
package/es/ele-printer/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, shallowRef, ref, watch, nextTick, openBlock, createBlock, Teleport, createElementVNode, normalizeClass, createElementBlock, normalizeStyle, renderSlot, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, shallowRef, ref, computed, watch, nextTick, openBlock, createBlock, Teleport, createElementVNode, normalizeClass, createElementBlock, normalizeStyle, renderSlot, createCommentVNode } from "vue";
|
|
2
2
|
import { useLicense } from "../ele-config-provider/receiver";
|
|
3
3
|
import { usePrinter, getPrintContainer, doPrintOnFrame, doPrint } from "./util";
|
|
4
4
|
import { printerProps, printerEmits } from "./props";
|
|
@@ -14,6 +14,9 @@ const _sfc_main = defineComponent({
|
|
|
14
14
|
});
|
|
15
15
|
const container = shallowRef(getPrintContainer());
|
|
16
16
|
const visible = ref(false);
|
|
17
|
+
const isStatic = computed(() => {
|
|
18
|
+
return props.static;
|
|
19
|
+
});
|
|
17
20
|
const print = () => {
|
|
18
21
|
if (!authenticated.value) {
|
|
19
22
|
updateModelValue(false);
|
|
@@ -54,7 +57,7 @@ const _sfc_main = defineComponent({
|
|
|
54
57
|
},
|
|
55
58
|
{ immediate: true }
|
|
56
59
|
);
|
|
57
|
-
return { container, visible, print };
|
|
60
|
+
return { container, visible, isStatic, print };
|
|
58
61
|
}
|
|
59
62
|
});
|
|
60
63
|
const _export_sfc = (sfc, props) => {
|
|
@@ -69,10 +72,14 @@ const _hoisted_2 = { key: 1 };
|
|
|
69
72
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
70
73
|
return openBlock(), createBlock(Teleport, {
|
|
71
74
|
to: _ctx.container,
|
|
72
|
-
disabled: _ctx.
|
|
75
|
+
disabled: _ctx.isStatic && !_ctx.visible
|
|
73
76
|
}, [
|
|
74
77
|
createElementVNode("table", {
|
|
75
|
-
class: normalizeClass([
|
|
78
|
+
class: normalizeClass([
|
|
79
|
+
"ele-printer",
|
|
80
|
+
{ "is-open": _ctx.visible },
|
|
81
|
+
{ "is-static": _ctx.isStatic }
|
|
82
|
+
])
|
|
76
83
|
}, [
|
|
77
84
|
_ctx.$slots.header ? (openBlock(), createElementBlock("thead", _hoisted_1, [
|
|
78
85
|
createElementVNode("tr", null, [
|
|
@@ -636,11 +636,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
636
636
|
})
|
|
637
637
|
]), 1032, ["menus", "headerStyle", "active", "ellipsis", "ellipsisProps", "menuTrigger", "itemTrigger", "collapse", "sidebar", "titleSlot", "iconSlot", "levels", "breadcrumb", "breadcrumbSeparator", "homePath", "isHome", "onLogoClick", "onOpen", "onClsoe", "onItemClick"]),
|
|
638
638
|
createVNode(_component_EleWatermark, {
|
|
639
|
-
|
|
639
|
+
class: "ele-admin-main",
|
|
640
640
|
height: 68,
|
|
641
|
-
content: _ctx.watermark,
|
|
642
641
|
disabled: _ctx.authenticated,
|
|
643
|
-
|
|
642
|
+
fixed: true,
|
|
643
|
+
content: _ctx.watermark
|
|
644
644
|
}, {
|
|
645
645
|
default: withCtx(() => [
|
|
646
646
|
_ctx.sidebox ? (openBlock(), createBlock(_component_ProSidebox, {
|
|
@@ -733,7 +733,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
733
733
|
])
|
|
734
734
|
]),
|
|
735
735
|
_: 3
|
|
736
|
-
}, 8, ["
|
|
736
|
+
}, 8, ["disabled", "content"]),
|
|
737
737
|
createElementVNode("div", {
|
|
738
738
|
class: "ele-admin-mask",
|
|
739
739
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.updateCollapse && _ctx.updateCollapse(...args))
|
package/es/ele-tabs/index.js
CHANGED
|
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
reset: () => void;
|
|
18
18
|
update: (newEndVal?: string | number) => void;
|
|
19
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
-
ready: (_instance?: CountUp | undefined) => boolean;
|
|
20
|
+
ready: (_instance?: CountUp | null | undefined) => boolean;
|
|
21
21
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
delay: {
|
|
23
23
|
type: NumberConstructor;
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
};
|
|
30
30
|
options: import("vue").PropType<import("countup.js").CountUpOptions>;
|
|
31
31
|
}>> & {
|
|
32
|
-
onReady?: ((_instance?: CountUp | undefined) => any) | undefined;
|
|
32
|
+
onReady?: ((_instance?: CountUp | null | undefined) => any) | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
delay: number;
|
|
35
35
|
}, {}>;
|
|
@@ -25,3 +25,12 @@ export type PositionValue = 'top' | 'bottom' | 'left' | 'right' | 'leftTop' | 'l
|
|
|
25
25
|
* 初始位置类型
|
|
26
26
|
*/
|
|
27
27
|
export type Position = PositionValue | PositionObject;
|
|
28
|
+
/**
|
|
29
|
+
* 弹窗坐标
|
|
30
|
+
*/
|
|
31
|
+
export interface Location {
|
|
32
|
+
top?: number;
|
|
33
|
+
left?: number;
|
|
34
|
+
topValue?: string;
|
|
35
|
+
leftValue?: string;
|
|
36
|
+
}
|
package/lib/ele-modal/util.js
CHANGED
|
@@ -22,6 +22,8 @@ const singleSidebarClass = "ele-state-single-sidebar";
|
|
|
22
22
|
const topLayoutClass = "ele-state-top-layout";
|
|
23
23
|
const expandedClass = "ele-state-expanded";
|
|
24
24
|
const mobileClass = "ele-state-mobile";
|
|
25
|
+
const fixTop = 0.65;
|
|
26
|
+
const fixLeft = 0.65;
|
|
25
27
|
function initModalStyle(modalEl, resizable) {
|
|
26
28
|
modalEl.style.top = modalEl.offsetTop + "px";
|
|
27
29
|
modalEl.style.left = modalEl.offsetLeft + "px";
|
|
@@ -104,8 +106,8 @@ function handleMovable(event, props) {
|
|
|
104
106
|
left: e.clientX - downX + downOL,
|
|
105
107
|
top: e.clientY - downY + downOT
|
|
106
108
|
};
|
|
107
|
-
const limitL = wrapEl.clientWidth - modalEl.clientWidth -
|
|
108
|
-
const limitT = wrapEl.clientHeight - modalEl.clientHeight -
|
|
109
|
+
const limitL = wrapEl.clientWidth - modalEl.clientWidth - fixLeft;
|
|
110
|
+
const limitT = wrapEl.clientHeight - modalEl.clientHeight - fixTop;
|
|
109
111
|
if (!props.moveOut) {
|
|
110
112
|
if (position.left < 0) {
|
|
111
113
|
position.left = 0;
|
|
@@ -140,8 +142,8 @@ function handleMovable(event, props) {
|
|
|
140
142
|
position.top = minLimitT;
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
|
-
modalEl.style.left = `${position.left}px`;
|
|
144
|
-
modalEl.style.top = `${position.top}px`;
|
|
145
|
+
modalEl.style.left = `${Math.floor(position.left)}px`;
|
|
146
|
+
modalEl.style.top = `${Math.floor(position.top)}px`;
|
|
145
147
|
};
|
|
146
148
|
const mouseupFn = function() {
|
|
147
149
|
modalEl.style.userSelect = "";
|
|
@@ -184,7 +186,7 @@ function handleResizable(event, props) {
|
|
|
184
186
|
const mousemoveFn = function(e) {
|
|
185
187
|
if (props.resizable !== "vertical") {
|
|
186
188
|
const w = e.clientX - downX + downW;
|
|
187
|
-
const maxW = wrapEl.clientWidth - modalEl.offsetLeft -
|
|
189
|
+
const maxW = wrapEl.clientWidth - modalEl.offsetLeft - fixLeft;
|
|
188
190
|
const nw = (w < props.minWidth ? props.minWidth : !canMoveOut(props.moveOut, "right") && w > maxW ? maxW : w) + "px";
|
|
189
191
|
modalEl.style.width = nw;
|
|
190
192
|
modalEl.style.maxWidth = nw;
|
|
@@ -192,7 +194,7 @@ function handleResizable(event, props) {
|
|
|
192
194
|
}
|
|
193
195
|
if (props.resizable !== "horizontal") {
|
|
194
196
|
const h = e.clientY - downY + downH;
|
|
195
|
-
const maxH = wrapEl.clientHeight - modalEl.offsetTop -
|
|
197
|
+
const maxH = wrapEl.clientHeight - modalEl.offsetTop - fixTop;
|
|
196
198
|
const nh = (h < props.minHeight ? props.minHeight : !canMoveOut(props.moveOut, "bottom") && h > maxH ? maxH : h) + "px";
|
|
197
199
|
modalEl.style.height = nh;
|
|
198
200
|
modalEl.style.maxHeight = nh;
|
|
@@ -250,60 +252,71 @@ function setModalPosition(modalEl, resizable, position, moveOut) {
|
|
|
250
252
|
if (!wrapEl) {
|
|
251
253
|
return;
|
|
252
254
|
}
|
|
255
|
+
const location = {};
|
|
253
256
|
initModalStyle(modalEl, resizable);
|
|
254
257
|
const canOutB = canMoveOut(moveOut, "bottom");
|
|
255
258
|
const canOutR = canMoveOut(moveOut, "right");
|
|
256
|
-
const t = wrapEl.clientHeight - modalEl.clientHeight - (canOutB ? 0 :
|
|
259
|
+
const t = wrapEl.clientHeight - modalEl.clientHeight - (canOutB ? 0 : fixTop);
|
|
257
260
|
const maxTop = t < 0 ? 0 : t;
|
|
258
|
-
const l = wrapEl.clientWidth - modalEl.clientWidth - (canOutR ? 0 :
|
|
261
|
+
const l = wrapEl.clientWidth - modalEl.clientWidth - (canOutR ? 0 : fixLeft);
|
|
259
262
|
const maxLeft = l < 0 ? 0 : l;
|
|
260
263
|
if (position === "top") {
|
|
261
|
-
|
|
262
|
-
|
|
264
|
+
location.top = 0;
|
|
265
|
+
location.left = maxLeft / 2;
|
|
263
266
|
} else if (position === "bottom") {
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
location.top = maxTop;
|
|
268
|
+
location.left = maxLeft / 2;
|
|
266
269
|
} else if (position === "left") {
|
|
267
|
-
|
|
268
|
-
|
|
270
|
+
location.top = maxTop / 2;
|
|
271
|
+
location.left = 0;
|
|
269
272
|
} else if (position === "right") {
|
|
270
|
-
|
|
271
|
-
|
|
273
|
+
location.top = maxTop / 2;
|
|
274
|
+
location.left = maxLeft;
|
|
272
275
|
} else if (position === "leftTop") {
|
|
273
|
-
|
|
274
|
-
|
|
276
|
+
location.top = 0;
|
|
277
|
+
location.left = 0;
|
|
275
278
|
} else if (position === "leftBottom") {
|
|
276
|
-
|
|
277
|
-
|
|
279
|
+
location.top = maxTop;
|
|
280
|
+
location.left = 0;
|
|
278
281
|
} else if (position === "rightTop") {
|
|
279
|
-
|
|
280
|
-
|
|
282
|
+
location.top = 0;
|
|
283
|
+
location.left = maxLeft;
|
|
281
284
|
} else if (position === "rightBottom") {
|
|
282
|
-
|
|
283
|
-
|
|
285
|
+
location.top = maxTop;
|
|
286
|
+
location.left = maxLeft;
|
|
284
287
|
} else if (position === "center") {
|
|
285
|
-
|
|
286
|
-
|
|
288
|
+
location.top = maxTop / 2;
|
|
289
|
+
location.left = maxLeft / 2;
|
|
287
290
|
} else if (typeof position === "object") {
|
|
288
291
|
if (position.top != null) {
|
|
289
292
|
if (typeof position.top === "number") {
|
|
290
|
-
|
|
293
|
+
location.top = position.top;
|
|
291
294
|
} else {
|
|
292
|
-
|
|
295
|
+
location.topValue = position.top;
|
|
293
296
|
}
|
|
294
297
|
} else if (position.left != null) {
|
|
295
|
-
|
|
298
|
+
location.top = maxTop / 2;
|
|
296
299
|
}
|
|
297
300
|
if (position.left != null) {
|
|
298
301
|
if (typeof position.left === "number") {
|
|
299
|
-
|
|
302
|
+
location.left = position.left;
|
|
300
303
|
} else {
|
|
301
|
-
|
|
304
|
+
location.leftValue = position.left;
|
|
302
305
|
}
|
|
303
306
|
} else if (position.top != null) {
|
|
304
|
-
|
|
307
|
+
location.left = maxLeft / 2;
|
|
305
308
|
}
|
|
306
309
|
}
|
|
310
|
+
if (location.top != null) {
|
|
311
|
+
modalEl.style.top = `${Math.floor(location.top)}px`;
|
|
312
|
+
} else if (location.topValue != null) {
|
|
313
|
+
modalEl.style.top = location.topValue;
|
|
314
|
+
}
|
|
315
|
+
if (location.left != null) {
|
|
316
|
+
modalEl.style.left = `${Math.floor(location.left)}px`;
|
|
317
|
+
} else if (location.leftValue != null) {
|
|
318
|
+
modalEl.style.left = location.leftValue;
|
|
319
|
+
}
|
|
307
320
|
}
|
|
308
321
|
function setInitPosition(modalEl, resizable, position, moveOut, force) {
|
|
309
322
|
const attr = "ele-position";
|
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
}, {
|
|
13
13
|
container: import("vue").ShallowRef<Element>;
|
|
14
14
|
visible: import("vue").Ref<boolean>;
|
|
15
|
+
isStatic: import("vue").ComputedRef<boolean>;
|
|
15
16
|
print: () => void;
|
|
16
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
18
|
'update:modelValue': (_value: boolean) => boolean;
|
package/lib/ele-printer/index.js
CHANGED
|
@@ -15,6 +15,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
15
15
|
});
|
|
16
16
|
const container = vue.shallowRef(util.getPrintContainer());
|
|
17
17
|
const visible = vue.ref(false);
|
|
18
|
+
const isStatic = vue.computed(() => {
|
|
19
|
+
return props2.static;
|
|
20
|
+
});
|
|
18
21
|
const print = () => {
|
|
19
22
|
if (!authenticated.value) {
|
|
20
23
|
updateModelValue(false);
|
|
@@ -55,7 +58,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
55
58
|
},
|
|
56
59
|
{ immediate: true }
|
|
57
60
|
);
|
|
58
|
-
return { container, visible, print };
|
|
61
|
+
return { container, visible, isStatic, print };
|
|
59
62
|
}
|
|
60
63
|
});
|
|
61
64
|
const _export_sfc = (sfc, props2) => {
|
|
@@ -70,10 +73,14 @@ const _hoisted_2 = { key: 1 };
|
|
|
70
73
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
71
74
|
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
72
75
|
to: _ctx.container,
|
|
73
|
-
disabled: _ctx.
|
|
76
|
+
disabled: _ctx.isStatic && !_ctx.visible
|
|
74
77
|
}, [
|
|
75
78
|
vue.createElementVNode("table", {
|
|
76
|
-
class: vue.normalizeClass([
|
|
79
|
+
class: vue.normalizeClass([
|
|
80
|
+
"ele-printer",
|
|
81
|
+
{ "is-open": _ctx.visible },
|
|
82
|
+
{ "is-static": _ctx.isStatic }
|
|
83
|
+
])
|
|
77
84
|
}, [
|
|
78
85
|
_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_1, [
|
|
79
86
|
vue.createElementVNode("tr", null, [
|
|
@@ -637,11 +637,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
637
637
|
})
|
|
638
638
|
]), 1032, ["menus", "headerStyle", "active", "ellipsis", "ellipsisProps", "menuTrigger", "itemTrigger", "collapse", "sidebar", "titleSlot", "iconSlot", "levels", "breadcrumb", "breadcrumbSeparator", "homePath", "isHome", "onLogoClick", "onOpen", "onClsoe", "onItemClick"]),
|
|
639
639
|
vue.createVNode(_component_EleWatermark, {
|
|
640
|
-
|
|
640
|
+
class: "ele-admin-main",
|
|
641
641
|
height: 68,
|
|
642
|
-
content: _ctx.watermark,
|
|
643
642
|
disabled: _ctx.authenticated,
|
|
644
|
-
|
|
643
|
+
fixed: true,
|
|
644
|
+
content: _ctx.watermark
|
|
645
645
|
}, {
|
|
646
646
|
default: vue.withCtx(() => [
|
|
647
647
|
_ctx.sidebox ? (vue.openBlock(), vue.createBlock(_component_ProSidebox, {
|
|
@@ -734,7 +734,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
734
734
|
])
|
|
735
735
|
]),
|
|
736
736
|
_: 3
|
|
737
|
-
}, 8, ["
|
|
737
|
+
}, 8, ["disabled", "content"]),
|
|
738
738
|
vue.createElementVNode("div", {
|
|
739
739
|
class: "ele-admin-mask",
|
|
740
740
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.updateCollapse && _ctx.updateCollapse(...args))
|
package/lib/ele-tabs/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ele-admin-plus",
|
|
3
|
-
"version": "1.1.4-beta.
|
|
3
|
+
"version": "1.1.4-beta.2",
|
|
4
4
|
"description": "EleAdminPlus Library",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
"dev": "vite --host --config vite.global.ts",
|
|
15
15
|
"dev:needed": "vite --host",
|
|
16
16
|
"build": "esno scripts/build.ts",
|
|
17
|
+
"ts2js": "esno scripts/ts2js.ts",
|
|
17
18
|
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,components}/**/*.{vue,ts}\" --fix",
|
|
18
19
|
"clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite/",
|
|
19
|
-
"clean:lib": "rimraf node_modules"
|
|
20
|
-
"publish:beta": "npm publish --tag beta",
|
|
21
|
-
"publish": "npm publish"
|
|
20
|
+
"clean:lib": "rimraf node_modules"
|
|
22
21
|
},
|
|
23
22
|
"keywords": [],
|
|
24
23
|
"author": "eclouds@foxmail.com",
|
|
@@ -32,6 +31,7 @@
|
|
|
32
31
|
"devDependencies": {
|
|
33
32
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
34
33
|
"@ant-design/colors": "^7.0.0",
|
|
34
|
+
"@babel/types": "^7.22.11",
|
|
35
35
|
"@bytemd/plugin-gfm": "^1.21.0",
|
|
36
36
|
"@bytemd/plugin-highlight": "^1.21.0",
|
|
37
37
|
"@element-plus/icons-vue": "^2.1.0",
|
package/typings/global.d.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
|
2
2
|
declare module 'vue' {
|
|
3
3
|
export interface GlobalComponents {
|
|
4
|
-
EleAlert: typeof import('ele-admin-plus')['EleAlert'];
|
|
5
|
-
EleApp: typeof import('ele-admin-plus')['EleApp'];
|
|
6
|
-
EleAvatarGroup: typeof import('ele-admin-plus')['EleAvatarGroup'];
|
|
7
|
-
EleBarCode: typeof import('ele-admin-plus')['EleBarCode'];
|
|
8
|
-
EleBasicSelect: typeof import('ele-admin-plus')['EleBasicSelect'];
|
|
9
|
-
EleBottomBar: typeof import('ele-admin-plus')['EleBottomBar'];
|
|
10
|
-
EleBreadcrumb: typeof import('ele-admin-plus')['EleBreadcrumb'];
|
|
11
|
-
EleCard: typeof import('ele-admin-plus')['EleCard'];
|
|
12
|
-
EleCheckCard: typeof import('ele-admin-plus')['EleCheckCard'];
|
|
13
|
-
EleConfigProvider: typeof import('ele-admin-plus')['EleConfigProvider'];
|
|
14
|
-
EleCopyable: typeof import('ele-admin-plus')['EleCopyable'];
|
|
15
|
-
EleCountUp: typeof import('ele-admin-plus')['EleCountUp'];
|
|
16
|
-
EleCropper: typeof import('ele-admin-plus')['EleCropper'];
|
|
17
|
-
EleCropperModal: typeof import('ele-admin-plus')['EleCropperModal'];
|
|
18
|
-
EleDashboard: typeof import('ele-admin-plus')['EleDashboard'];
|
|
19
|
-
EleDot: typeof import('ele-admin-plus')['EleDot'];
|
|
20
|
-
EleDrawer: typeof import('ele-admin-plus')['EleDrawer'];
|
|
21
|
-
EleDropdown: typeof import('ele-admin-plus')['EleDropdown'];
|
|
22
|
-
EleEditTag: typeof import('ele-admin-plus')['EleEditTag'];
|
|
23
|
-
EleEllipsis: typeof import('ele-admin-plus')['EleEllipsis'];
|
|
24
|
-
EleFileList: typeof import('ele-admin-plus')['EleFileList'];
|
|
25
|
-
EleFileListTool: typeof import('ele-admin-plus')['EleFileListTool'];
|
|
26
|
-
EleIconSelect: typeof import('ele-admin-plus')['EleIconSelect'];
|
|
27
|
-
EleLoading: typeof import('ele-admin-plus')['EleLoading'];
|
|
28
|
-
EleMapPicker: typeof import('ele-admin-plus')['EleMapPicker'];
|
|
29
|
-
EleMenus: typeof import('ele-admin-plus')['EleMenus'];
|
|
30
|
-
EleModal: typeof import('ele-admin-plus')['EleModal'];
|
|
31
|
-
ElePage: typeof import('ele-admin-plus')['ElePage'];
|
|
32
|
-
ElePagination: typeof import('ele-admin-plus')['ElePagination'];
|
|
33
|
-
ElePopconfirm: typeof import('ele-admin-plus')['ElePopconfirm'];
|
|
34
|
-
ElePopover: typeof import('ele-admin-plus')['ElePopover'];
|
|
35
|
-
ElePrinter: typeof import('ele-admin-plus')['ElePrinter'];
|
|
36
|
-
EleProLayout: typeof import('ele-admin-plus')['EleProLayout'];
|
|
37
|
-
EleProTable: typeof import('ele-admin-plus')['EleProTable'];
|
|
38
|
-
EleQrCode: typeof import('ele-admin-plus')['EleQrCode'];
|
|
39
|
-
EleQrCodeSvg: typeof import('ele-admin-plus')['EleQrCodeSvg'];
|
|
40
|
-
EleSegmented: typeof import('ele-admin-plus')['EleSegmented'];
|
|
41
|
-
EleSplitPanel: typeof import('ele-admin-plus')['EleSplitPanel'];
|
|
42
|
-
EleSteps: typeof import('ele-admin-plus')['EleSteps'];
|
|
43
|
-
EleTabTool: typeof import('ele-admin-plus')['EleTabTool'];
|
|
44
|
-
EleTabWrap: typeof import('ele-admin-plus')['EleTabWrap'];
|
|
45
|
-
EleTable: typeof import('ele-admin-plus')['EleTable'];
|
|
46
|
-
EleTableSelect: typeof import('ele-admin-plus')['EleTableSelect'];
|
|
47
|
-
EleTabs: typeof import('ele-admin-plus')['EleTabs'];
|
|
48
|
-
EleText: typeof import('ele-admin-plus')['EleText'];
|
|
49
|
-
EleTool: typeof import('ele-admin-plus')['EleTool'];
|
|
50
|
-
EleToolbar: typeof import('ele-admin-plus')['EleToolbar'];
|
|
51
|
-
EleTooltip: typeof import('ele-admin-plus')['EleTooltip'];
|
|
52
|
-
EleTour: typeof import('ele-admin-plus')['EleTour'];
|
|
53
|
-
EleUploadList: typeof import('ele-admin-plus')['EleUploadList'];
|
|
54
|
-
EleWatermark: typeof import('ele-admin-plus')['EleWatermark'];
|
|
55
|
-
EleXgPlayer: typeof import('ele-admin-plus')['EleXgPlayer'];
|
|
4
|
+
EleAlert: (typeof import('ele-admin-plus'))['EleAlert'];
|
|
5
|
+
EleApp: (typeof import('ele-admin-plus'))['EleApp'];
|
|
6
|
+
EleAvatarGroup: (typeof import('ele-admin-plus'))['EleAvatarGroup'];
|
|
7
|
+
EleBarCode: (typeof import('ele-admin-plus'))['EleBarCode'];
|
|
8
|
+
EleBasicSelect: (typeof import('ele-admin-plus'))['EleBasicSelect'];
|
|
9
|
+
EleBottomBar: (typeof import('ele-admin-plus'))['EleBottomBar'];
|
|
10
|
+
EleBreadcrumb: (typeof import('ele-admin-plus'))['EleBreadcrumb'];
|
|
11
|
+
EleCard: (typeof import('ele-admin-plus'))['EleCard'];
|
|
12
|
+
EleCheckCard: (typeof import('ele-admin-plus'))['EleCheckCard'];
|
|
13
|
+
EleConfigProvider: (typeof import('ele-admin-plus'))['EleConfigProvider'];
|
|
14
|
+
EleCopyable: (typeof import('ele-admin-plus'))['EleCopyable'];
|
|
15
|
+
EleCountUp: (typeof import('ele-admin-plus'))['EleCountUp'];
|
|
16
|
+
EleCropper: (typeof import('ele-admin-plus'))['EleCropper'];
|
|
17
|
+
EleCropperModal: (typeof import('ele-admin-plus'))['EleCropperModal'];
|
|
18
|
+
EleDashboard: (typeof import('ele-admin-plus'))['EleDashboard'];
|
|
19
|
+
EleDot: (typeof import('ele-admin-plus'))['EleDot'];
|
|
20
|
+
EleDrawer: (typeof import('ele-admin-plus'))['EleDrawer'];
|
|
21
|
+
EleDropdown: (typeof import('ele-admin-plus'))['EleDropdown'];
|
|
22
|
+
EleEditTag: (typeof import('ele-admin-plus'))['EleEditTag'];
|
|
23
|
+
EleEllipsis: (typeof import('ele-admin-plus'))['EleEllipsis'];
|
|
24
|
+
EleFileList: (typeof import('ele-admin-plus'))['EleFileList'];
|
|
25
|
+
EleFileListTool: (typeof import('ele-admin-plus'))['EleFileListTool'];
|
|
26
|
+
EleIconSelect: (typeof import('ele-admin-plus'))['EleIconSelect'];
|
|
27
|
+
EleLoading: (typeof import('ele-admin-plus'))['EleLoading'];
|
|
28
|
+
EleMapPicker: (typeof import('ele-admin-plus'))['EleMapPicker'];
|
|
29
|
+
EleMenus: (typeof import('ele-admin-plus'))['EleMenus'];
|
|
30
|
+
EleModal: (typeof import('ele-admin-plus'))['EleModal'];
|
|
31
|
+
ElePage: (typeof import('ele-admin-plus'))['ElePage'];
|
|
32
|
+
ElePagination: (typeof import('ele-admin-plus'))['ElePagination'];
|
|
33
|
+
ElePopconfirm: (typeof import('ele-admin-plus'))['ElePopconfirm'];
|
|
34
|
+
ElePopover: (typeof import('ele-admin-plus'))['ElePopover'];
|
|
35
|
+
ElePrinter: (typeof import('ele-admin-plus'))['ElePrinter'];
|
|
36
|
+
EleProLayout: (typeof import('ele-admin-plus'))['EleProLayout'];
|
|
37
|
+
EleProTable: (typeof import('ele-admin-plus'))['EleProTable'];
|
|
38
|
+
EleQrCode: (typeof import('ele-admin-plus'))['EleQrCode'];
|
|
39
|
+
EleQrCodeSvg: (typeof import('ele-admin-plus'))['EleQrCodeSvg'];
|
|
40
|
+
EleSegmented: (typeof import('ele-admin-plus'))['EleSegmented'];
|
|
41
|
+
EleSplitPanel: (typeof import('ele-admin-plus'))['EleSplitPanel'];
|
|
42
|
+
EleSteps: (typeof import('ele-admin-plus'))['EleSteps'];
|
|
43
|
+
EleTabTool: (typeof import('ele-admin-plus'))['EleTabTool'];
|
|
44
|
+
EleTabWrap: (typeof import('ele-admin-plus'))['EleTabWrap'];
|
|
45
|
+
EleTable: (typeof import('ele-admin-plus'))['EleTable'];
|
|
46
|
+
EleTableSelect: (typeof import('ele-admin-plus'))['EleTableSelect'];
|
|
47
|
+
EleTabs: (typeof import('ele-admin-plus'))['EleTabs'];
|
|
48
|
+
EleText: (typeof import('ele-admin-plus'))['EleText'];
|
|
49
|
+
EleTool: (typeof import('ele-admin-plus'))['EleTool'];
|
|
50
|
+
EleToolbar: (typeof import('ele-admin-plus'))['EleToolbar'];
|
|
51
|
+
EleTooltip: (typeof import('ele-admin-plus'))['EleTooltip'];
|
|
52
|
+
EleTour: (typeof import('ele-admin-plus'))['EleTour'];
|
|
53
|
+
EleUploadList: (typeof import('ele-admin-plus'))['EleUploadList'];
|
|
54
|
+
EleWatermark: (typeof import('ele-admin-plus'))['EleWatermark'];
|
|
55
|
+
EleXgPlayer: (typeof import('ele-admin-plus'))['EleXgPlayer'];
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
export {};
|