yahee-components 0.0.90 → 0.0.92
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/annex-upload/annex-upload.vue.js +154 -51
- package/es/annex-upload/annex-upload.vue2.js +2 -119
- package/es/annex-upload/index.js +3 -3
- package/es/border-wrap/border-wrap.vue.js +95 -64
- package/es/border-wrap/border-wrap.vue2.js +2 -46
- package/es/common-import/common-import.vue.js +666 -369
- package/es/common-import/common-import.vue2.js +2 -337
- package/es/common-import/index.js +3 -3
- package/es/complex-search/complex-search.vue.js +36 -36
- package/es/complex-search/complex-search.vue2.js +25 -23
- package/es/copy/copy.vue.js +55 -37
- package/es/copy/copy.vue2.js +2 -34
- package/es/copy/index.js +3 -3
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +213 -114
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +2 -125
- package/es/drop-down-condition/drop-down-condition.vue.js +215 -115
- package/es/drop-down-condition/drop-down-condition.vue2.js +2 -127
- package/es/echart-gauge/echart-gauge.vue.js +140 -12
- package/es/echart-gauge/echart-gauge.vue2.js +2 -147
- package/es/echart-gauge/index.js +3 -3
- package/es/image-upload/image-upload.vue.js +170 -109
- package/es/image-upload/image-upload.vue2.js +2 -91
- package/es/image-upload/index.js +3 -3
- package/es/input/index.js +3 -3
- package/es/input/input.vue.js +38 -17
- package/es/input/input.vue2.js +2 -33
- package/es/left-condition/index.js +3 -3
- package/es/left-condition/left-condition-sub.vue.js +91 -32
- package/es/left-condition/left-condition-sub.vue2.js +2 -76
- package/es/left-condition/left-condition.vue.js +218 -70
- package/es/left-condition/left-condition.vue2.js +2 -160
- package/es/left-condition-enum/index.js +3 -3
- package/es/left-condition-enum/left-condition-enum.vue.js +49 -20
- package/es/left-condition-enum/left-condition-enum.vue2.js +2 -40
- package/es/operation-log/operation-log-content.vue.js +92 -71
- package/es/operation-log/operation-log-content.vue2.js +2 -39
- package/es/operation-log/operation-log-dialog.vue.js +67 -45
- package/es/operation-log/operation-log-dialog.vue2.js +2 -38
- package/es/operation-log/operation-log-form.vue.js +183 -108
- package/es/operation-log/operation-log-form.vue2.js +2 -104
- package/es/operation-log/operation-log.vue.js +228 -119
- package/es/operation-log/operation-log.vue2.js +2 -135
- package/es/packages/components/api/log-server.js +6 -6
- package/es/packages/components/api/upload-server.js +1 -1
- package/es/packages/components/hooks/useEcharts.js +19 -19
- package/es/packages/components/hooks/useImg.js +8 -8
- package/es/scale-screen/index.js +4 -4
- package/es/scale-screen/scale-screen.vue.js +126 -19
- package/es/scale-screen/scale-screen.vue2.js +2 -125
- package/package.json +1 -1
- package/types/src/complex-search/complex-search.vue.d.ts +3 -0
- package/types/src/complex-search/index.d.ts +7 -0
- package/types/src/installs.d.ts +2649 -0
package/es/scale-screen/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withInstall as e } from "../utils/install.js";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
2
|
+
import t from "./scale-screen.vue.js";
|
|
3
|
+
const r = e(t);
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
r as YaheeScaleScreen,
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,130 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { defineComponent as z, reactive as k, ref as v, watch as T, onMounted as L, nextTick as S, onUnmounted as _, createElementBlock as j, openBlock as B, createElementVNode as b, normalizeStyle as x, renderSlot as E } from "vue";
|
|
2
|
+
const M = { class: "yahee-scale-screen" }, O = /* @__PURE__ */ z({
|
|
3
|
+
__name: "scale-screen",
|
|
4
|
+
props: {
|
|
5
|
+
width: {
|
|
6
|
+
type: [String, Number],
|
|
7
|
+
default: 1920
|
|
8
|
+
},
|
|
9
|
+
height: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
default: 1080
|
|
12
|
+
},
|
|
13
|
+
fullScreen: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
autoScale: {
|
|
18
|
+
type: [Object, Boolean],
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
delay: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 500
|
|
24
|
+
},
|
|
25
|
+
boxStyle: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: () => ({})
|
|
28
|
+
},
|
|
29
|
+
wrapperStyle: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => ({})
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup(h) {
|
|
35
|
+
function W(i, l) {
|
|
36
|
+
let o;
|
|
37
|
+
return function(...a) {
|
|
38
|
+
o && clearTimeout(o), o = setTimeout(
|
|
39
|
+
() => {
|
|
40
|
+
typeof i == "function" && i.apply(null, a), clearTimeout(o);
|
|
41
|
+
},
|
|
42
|
+
l > 0 ? l : 100
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const n = h, e = k({
|
|
47
|
+
width: 0,
|
|
48
|
+
height: 0,
|
|
49
|
+
originalWidth: 0,
|
|
50
|
+
originalHeight: 0,
|
|
51
|
+
observer: null
|
|
52
|
+
}), g = {
|
|
53
|
+
box: {
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
backgroundSize: "100% 100%",
|
|
56
|
+
background: "#000",
|
|
57
|
+
width: "100vw",
|
|
58
|
+
height: "100vh"
|
|
59
|
+
},
|
|
60
|
+
wrapper: {
|
|
61
|
+
transitionProperty: "all",
|
|
62
|
+
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
63
|
+
transitionDuration: "500ms",
|
|
64
|
+
position: "relative",
|
|
65
|
+
overflow: "hidden",
|
|
66
|
+
zIndex: 100,
|
|
67
|
+
transformOrigin: "left top"
|
|
68
|
+
}
|
|
69
|
+
}, t = v(), d = v();
|
|
70
|
+
T(
|
|
71
|
+
() => n.autoScale,
|
|
72
|
+
async (i) => {
|
|
73
|
+
i ? (u(), w()) : (m(), H());
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
const f = () => new Promise((i) => {
|
|
77
|
+
d.value.scrollLeft = 0, d.value.scrollTop = 0, S(() => {
|
|
78
|
+
var l, o;
|
|
79
|
+
n.width && n.height ? (e.width = n.width, e.height = n.height) : (e.width = (l = t.value) == null ? void 0 : l.clientWidth, e.height = (o = t.value) == null ? void 0 : o.clientHeight), (!e.originalHeight || !e.originalWidth) && (e.originalWidth = window.screen.width, e.originalHeight = window.screen.height), i();
|
|
80
|
+
});
|
|
81
|
+
}), p = () => {
|
|
82
|
+
e.width && e.height ? (t.value.style.width = `${e.width}px`, t.value.style.height = `${e.height}px`) : (t.value.style.width = `${e.originalWidth}px`, t.value.style.height = `${e.originalHeight}px`);
|
|
83
|
+
}, H = () => {
|
|
84
|
+
t.value && (t.value.style.transform = "", t.value.style.margin = "");
|
|
85
|
+
}, $ = (i) => {
|
|
86
|
+
if (!n.autoScale)
|
|
87
|
+
return;
|
|
88
|
+
const l = t.value.clientWidth, o = t.value.clientHeight, a = document.body.clientWidth, c = document.body.clientHeight;
|
|
89
|
+
t.value.style.transform = `scale(${i},${i})`;
|
|
90
|
+
let r = Math.max((a - l * i) / 2, 0), s = Math.max((c - o * i) / 2, 0);
|
|
91
|
+
typeof n.autoScale == "object" && (!n.autoScale.x && (r = 0), !n.autoScale.y && (s = 0)), t.value.style.margin = `${s}px ${r}px`;
|
|
92
|
+
}, y = () => {
|
|
93
|
+
const i = document.body.clientWidth, l = document.body.clientHeight, o = e.width || e.originalWidth, a = e.height || e.originalHeight, c = i / +o, r = l / +a;
|
|
94
|
+
if (n.fullScreen)
|
|
95
|
+
return t.value.style.transform = `scale(${c},${r})`, !1;
|
|
96
|
+
const s = Math.min(c, r);
|
|
97
|
+
$(s);
|
|
98
|
+
}, u = W(async () => {
|
|
99
|
+
await f(), p(), y();
|
|
100
|
+
}, n.delay), m = () => {
|
|
101
|
+
window.removeEventListener("resize", u);
|
|
102
|
+
}, w = () => {
|
|
103
|
+
window.addEventListener("resize", u);
|
|
104
|
+
};
|
|
105
|
+
return L(() => {
|
|
106
|
+
S(async () => {
|
|
107
|
+
await f(), p(), y(), w();
|
|
108
|
+
});
|
|
109
|
+
}), _(() => {
|
|
110
|
+
m();
|
|
111
|
+
}), (i, l) => (B(), j("div", M, [
|
|
112
|
+
b("section", {
|
|
113
|
+
style: x({ ...g.box, ...h.boxStyle }),
|
|
114
|
+
ref_key: "box",
|
|
115
|
+
ref: d
|
|
14
116
|
}, [
|
|
15
|
-
|
|
117
|
+
b("div", {
|
|
118
|
+
style: x({ ...g.wrapper, ...h.wrapperStyle }),
|
|
119
|
+
ref_key: "screenWrapper",
|
|
120
|
+
ref: t
|
|
121
|
+
}, [
|
|
122
|
+
E(i.$slots, "default")
|
|
123
|
+
], 4)
|
|
16
124
|
], 4)
|
|
17
|
-
]
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
const b = /* @__PURE__ */ m(s, [["render", f], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/scale-screen/scale-screen.vue"]]);
|
|
125
|
+
]));
|
|
126
|
+
}
|
|
127
|
+
});
|
|
21
128
|
export {
|
|
22
|
-
|
|
129
|
+
O as default
|
|
23
130
|
};
|
|
@@ -1,127 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
const k = /* @__PURE__ */ z({
|
|
3
|
-
__name: "scale-screen",
|
|
4
|
-
props: {
|
|
5
|
-
width: {
|
|
6
|
-
type: [String, Number],
|
|
7
|
-
default: 1920
|
|
8
|
-
},
|
|
9
|
-
height: {
|
|
10
|
-
type: [String, Number],
|
|
11
|
-
default: 1080
|
|
12
|
-
},
|
|
13
|
-
fullScreen: {
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: !1
|
|
16
|
-
},
|
|
17
|
-
autoScale: {
|
|
18
|
-
type: [Object, Boolean],
|
|
19
|
-
default: !0
|
|
20
|
-
},
|
|
21
|
-
delay: {
|
|
22
|
-
type: Number,
|
|
23
|
-
default: 500
|
|
24
|
-
},
|
|
25
|
-
boxStyle: {
|
|
26
|
-
type: Object,
|
|
27
|
-
default: () => ({})
|
|
28
|
-
},
|
|
29
|
-
wrapperStyle: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default: () => ({})
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
setup(W, { expose: H }) {
|
|
35
|
-
H();
|
|
36
|
-
function m(i, o) {
|
|
37
|
-
let r;
|
|
38
|
-
return function(...l) {
|
|
39
|
-
r && clearTimeout(r), r = setTimeout(
|
|
40
|
-
() => {
|
|
41
|
-
typeof i == "function" && i.apply(null, l), clearTimeout(r);
|
|
42
|
-
},
|
|
43
|
-
o > 0 ? o : 100
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
const n = W, e = O({
|
|
48
|
-
width: 0,
|
|
49
|
-
height: 0,
|
|
50
|
-
originalWidth: 0,
|
|
51
|
-
originalHeight: 0,
|
|
52
|
-
observer: null
|
|
53
|
-
}), _ = {
|
|
54
|
-
box: {
|
|
55
|
-
overflow: "hidden",
|
|
56
|
-
backgroundSize: "100% 100%",
|
|
57
|
-
background: "#000",
|
|
58
|
-
width: "100vw",
|
|
59
|
-
height: "100vh"
|
|
60
|
-
},
|
|
61
|
-
wrapper: {
|
|
62
|
-
transitionProperty: "all",
|
|
63
|
-
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
64
|
-
transitionDuration: "500ms",
|
|
65
|
-
position: "relative",
|
|
66
|
-
overflow: "hidden",
|
|
67
|
-
zIndex: 100,
|
|
68
|
-
transformOrigin: "left top"
|
|
69
|
-
}
|
|
70
|
-
}, t = S(), h = S();
|
|
71
|
-
M(
|
|
72
|
-
() => n.autoScale,
|
|
73
|
-
async (i) => {
|
|
74
|
-
i ? (a(), y()) : (f(), v());
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
const d = () => new Promise((i) => {
|
|
78
|
-
h.value.scrollLeft = 0, h.value.scrollTop = 0, x(() => {
|
|
79
|
-
var o, r;
|
|
80
|
-
n.width && n.height ? (e.width = n.width, e.height = n.height) : (e.width = (o = t.value) == null ? void 0 : o.clientWidth, e.height = (r = t.value) == null ? void 0 : r.clientHeight), (!e.originalHeight || !e.originalWidth) && (e.originalWidth = window.screen.width, e.originalHeight = window.screen.height), i();
|
|
81
|
-
});
|
|
82
|
-
}), g = () => {
|
|
83
|
-
e.width && e.height ? (t.value.style.width = `${e.width}px`, t.value.style.height = `${e.height}px`) : (t.value.style.width = `${e.originalWidth}px`, t.value.style.height = `${e.originalHeight}px`);
|
|
84
|
-
}, v = () => {
|
|
85
|
-
t.value && (t.value.style.transform = "", t.value.style.margin = "");
|
|
86
|
-
}, w = (i) => {
|
|
87
|
-
if (!n.autoScale)
|
|
88
|
-
return;
|
|
89
|
-
const o = t.value.clientWidth, r = t.value.clientHeight, l = document.body.clientWidth, s = document.body.clientHeight;
|
|
90
|
-
t.value.style.transform = `scale(${i},${i})`;
|
|
91
|
-
let c = Math.max((l - o * i) / 2, 0), u = Math.max((s - r * i) / 2, 0);
|
|
92
|
-
typeof n.autoScale == "object" && (!n.autoScale.x && (c = 0), !n.autoScale.y && (u = 0)), t.value.style.margin = `${u}px ${c}px`;
|
|
93
|
-
}, p = () => {
|
|
94
|
-
const i = document.body.clientWidth, o = document.body.clientHeight, r = e.width || e.originalWidth, l = e.height || e.originalHeight, s = i / +r, c = o / +l;
|
|
95
|
-
if (n.fullScreen)
|
|
96
|
-
return t.value.style.transform = `scale(${s},${c})`, !1;
|
|
97
|
-
const u = Math.min(s, c);
|
|
98
|
-
w(u);
|
|
99
|
-
}, a = m(async () => {
|
|
100
|
-
await d(), g(), p();
|
|
101
|
-
}, n.delay), $ = () => {
|
|
102
|
-
(e.observer = new MutationObserver(() => {
|
|
103
|
-
a();
|
|
104
|
-
})).observe(t.value, {
|
|
105
|
-
attributes: !0,
|
|
106
|
-
attributeFilter: ["style"],
|
|
107
|
-
attributeOldValue: !0
|
|
108
|
-
});
|
|
109
|
-
}, f = () => {
|
|
110
|
-
window.removeEventListener("resize", a);
|
|
111
|
-
}, y = () => {
|
|
112
|
-
window.addEventListener("resize", a);
|
|
113
|
-
};
|
|
114
|
-
T(() => {
|
|
115
|
-
x(async () => {
|
|
116
|
-
await d(), g(), p(), y();
|
|
117
|
-
});
|
|
118
|
-
}), j(() => {
|
|
119
|
-
f();
|
|
120
|
-
});
|
|
121
|
-
const b = { debounce: m, props: n, state: e, styles: _, screenWrapper: t, box: h, initSize: d, updateSize: g, clearScreenWrapperStyle: v, autoScale: w, updateScale: p, onResize: a, initMutationObserver: $, clearListener: f, addListener: y };
|
|
122
|
-
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
123
|
-
}
|
|
124
|
-
});
|
|
1
|
+
import f from "./scale-screen.vue.js";
|
|
125
2
|
export {
|
|
126
|
-
|
|
3
|
+
f as default
|
|
127
4
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../utils/typescript';
|
|
2
|
+
import { DefineComponent } from 'vue';
|
|
3
|
+
export declare const YaheeComplexSearch: SFCWithInstall<DefineComponent> & Record<string, any>;
|
|
4
|
+
export default YaheeComplexSearch;
|
|
5
|
+
export * from './complex-search.vue';
|
|
6
|
+
export * from './complex-search';
|
|
7
|
+
export * from './props';
|