@qynpm/ui 1.0.37 → 1.0.39
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 +4 -0
- package/dist/index.cjs +4 -2
- package/dist/index.mjs +52 -49
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-button/index.cjs +1 -1
- package/dist/qy-button/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +1 -1
- package/dist/qy-checkbox-group/index.cjs +1 -1
- package/dist/qy-checkbox-group/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +2 -1
- package/dist/qy-dialog/index.mjs +5 -2
- package/dist/qy-drawer/index.cjs +1 -1
- package/dist/qy-drawer/index.mjs +1 -1
- package/dist/qy-dropdown/index.cjs +1 -1
- package/dist/qy-dropdown/index.mjs +1 -1
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- package/dist/qy-fullscreen/index.cjs +1 -1
- package/dist/qy-fullscreen/index.mjs +1 -1
- package/dist/qy-icon/index.cjs +1 -1
- package/dist/qy-icon/index.mjs +2 -2
- package/dist/qy-icon-picker/index.cjs +1 -1
- package/dist/qy-icon-picker/index.mjs +1 -1
- package/dist/qy-iframe/index.cjs +1 -1
- package/dist/qy-iframe/index.mjs +1 -1
- package/dist/qy-image/index.cjs +1 -1
- package/dist/qy-image/index.mjs +1 -1
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input/index.cjs +1 -1
- package/dist/qy-input/index.mjs +1 -1
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-menu-actions/index.cjs +1 -1
- package/dist/qy-menu-actions/index.mjs +1 -1
- package/dist/qy-pagination/index.cjs +1 -0
- package/dist/qy-pagination/index.mjs +7 -0
- package/dist/qy-popconfirm/index.cjs +1 -1
- package/dist/qy-popconfirm/index.mjs +1 -1
- package/dist/qy-radio/index.cjs +1 -1
- package/dist/qy-radio/index.mjs +1 -1
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-switch/index.cjs +1 -1
- package/dist/qy-switch/index.mjs +1 -1
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +1 -1
- package/dist/qy-tag/index.cjs +1 -1
- package/dist/qy-tag/index.mjs +1 -1
- package/dist/qy-tree-select/index.cjs +1 -1
- package/dist/qy-tree-select/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/{index-BTbiht5h.cjs → index-BsDC3meI.cjs} +1 -1
- package/dist/shared/{index-Crr3HB8g.mjs → index-BzjGYfVd.mjs} +2 -2
- package/dist/shared/{index-DnNIseRJ.cjs → index-CCd7dB4w.cjs} +1 -1
- package/dist/shared/{index-Dwf-JfXM.mjs → index-CJeoAmoJ.mjs} +1 -1
- package/dist/shared/{index-BxxwEr52.mjs → index-D1Xkf7rL.mjs} +1 -1
- package/dist/shared/{index-BQEymEbE.cjs → index-DYLQNCm_.cjs} +1 -1
- package/dist/shared/index-DuP-b_eY.cjs +1 -0
- package/dist/shared/index-Dus42W4E.cjs +1 -0
- package/dist/shared/index-_IQS5Lxm.mjs +2362 -0
- package/dist/shared/{index-CwY_jv_I.cjs → index-elwxiSmc.cjs} +1 -1
- package/dist/shared/{index-BF6f9QDU.mjs → index-lKF1vwdE.mjs} +1 -1
- package/dist/shared/index-zo5J-y0C.mjs +157 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-C6-hVGUO.mjs → index.vue_vue_type_script_setup_true_lang-BvnOeUIM.mjs} +1 -1
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-lvZQ_Cu6.cjs → index.vue_vue_type_script_setup_true_lang-CcbBUYM3.cjs} +1 -1
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DOuk75uN.cjs → index.vue_vue_type_script_setup_true_lang-Cswf_owk.cjs} +1 -1
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-S-rQ0p3E.mjs → index.vue_vue_type_script_setup_true_lang-OmrHTMpe.mjs} +1 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BfQd7yxi.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-CAW_QOyJ.cjs → index.vue_vue_type_style_index_0_lang-D2CH70ZX.cjs} +1 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DOAbOPGO.mjs +403 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-Dr9Elmzn.mjs → index.vue_vue_type_style_index_0_lang-Daww52B9.mjs} +3 -3
- package/index.d.ts +9 -0
- package/package.json +496 -490
- package/qy-pagination/index.d.ts +40 -0
- package/dist/shared/index-3KGa3jVi.mjs +0 -2754
- package/dist/shared/index-Di_xbC7d.cjs +0 -1
- /package/dist/shared/{index-D8kce2jH.cjs → index-9GEoEe00.cjs} +0 -0
- /package/dist/shared/{index-Dr-Q5krU.mjs → index-B25yA5j-.mjs} +0 -0
- /package/dist/shared/{index-JjHutKmT.mjs → index-B3GsIwhf.mjs} +0 -0
- /package/dist/shared/{index-CdnHMuo3.mjs → index-BFG8tzQV.mjs} +0 -0
- /package/dist/shared/{index-BYX0biqw.mjs → index-BXWEn5kQ.mjs} +0 -0
- /package/dist/shared/{index-D5S48q1B.mjs → index-Bd_aS-_F.mjs} +0 -0
- /package/dist/shared/{index-BPaVDCe6.cjs → index-Br_34fum.cjs} +0 -0
- /package/dist/shared/{index-Dc6gLgAz.cjs → index-C1gEZRI5.cjs} +0 -0
- /package/dist/shared/{index-BuUtJrIy.mjs → index-CGq7Q_hV.mjs} +0 -0
- /package/dist/shared/{index-4SkLDBra.mjs → index-CiE6qJCJ.mjs} +0 -0
- /package/dist/shared/{index-Bli6Gx5d.cjs → index-CnVhquq5.cjs} +0 -0
- /package/dist/shared/{index-DnHfk7NM.cjs → index-D0hSquu3.cjs} +0 -0
- /package/dist/shared/{index-nos4Y-fm.cjs → index-D377Dw9z.cjs} +0 -0
- /package/dist/shared/{index-Od6HC8Un.mjs → index-D7WmSi5s.mjs} +0 -0
- /package/dist/shared/{index-Dm8kY2v6.mjs → index-D8OXRBGc.mjs} +0 -0
- /package/dist/shared/{index-DcohgM8A.mjs → index-DQosPVrl.mjs} +0 -0
- /package/dist/shared/{index-C7lRQtzs.cjs → index-DRugp8x0.cjs} +0 -0
- /package/dist/shared/{index-BdTlpKtr.cjs → index-Db0-JPH3.cjs} +0 -0
- /package/dist/shared/{index-DK0hjfWr.mjs → index-DpSbQfft.mjs} +0 -0
- /package/dist/shared/{index-Di4bIOiB.cjs → index-Dt5TyzGy.cjs} +0 -0
- /package/dist/shared/{index-DlGwHshu.cjs → index-EIFVul2W.cjs} +0 -0
- /package/dist/shared/{index-DCzxcvkn.cjs → index-G3BezuiV.cjs} +0 -0
- /package/dist/shared/{index-D8E_xu0N.mjs → index-GQheV777.mjs} +0 -0
- /package/dist/shared/{index-nSFTxVz8.cjs → index-HNFq7v-A.cjs} +0 -0
- /package/dist/shared/{index-DZRFSGxO.mjs → index-KNAOQ6lE.mjs} +0 -0
- /package/dist/shared/{index-C1i-hd-W.cjs → index-MNEYnZEw.cjs} +0 -0
- /package/dist/shared/{index-Bvot0uXo.cjs → index-MPd3qxAh.cjs} +0 -0
- /package/dist/shared/{index-B1b3BksF.mjs → index-nVNx7f9k.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-Dk83TGiU.cjs → index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-CGsXVhJy.mjs → index.vue_vue_type_script_setup_true_lang-wG7OTsWa.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Ch3QcF8t.cjs → index.vue_vue_type_style_index_0_lang-B2thgQml.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-b0y8p1p1.mjs → index.vue_vue_type_style_index_0_lang-BMZqMPZb.mjs} +0 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import { ElDialog as he, ElIcon as xe } from "element-plus/es";
|
|
2
|
+
import { defineComponent as we, useSlots as be, ref as d, computed as C, createVNode as z, watchEffect as ke, watch as te, h as le, onMounted as _e, nextTick as ne, onUnmounted as Ce, openBlock as i, createElementBlock as c, normalizeClass as I, createSlots as ze, withCtx as q, createElementVNode as l, normalizeStyle as A, unref as L, createCommentVNode as v, renderSlot as M, toDisplayString as ae, withModifiers as u, createBlock as ie, withDirectives as qe, vShow as Me } from "vue";
|
|
3
|
+
import Se from "clsx";
|
|
4
|
+
import { ElButton as se } from "element-plus";
|
|
5
|
+
import { Close as Be } from "@element-plus/icons-vue";
|
|
6
|
+
import { useBreakpoints as Ee, useDraggable as Ie } from "@vueuse/core";
|
|
7
|
+
const Le = { class: "text-lg flex items-center pt-2 pl-[var(--content-padding)]" }, De = { key: 0 }, Oe = { key: 1 }, $e = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "icon-[material-symbols--square-outline-rounded]",
|
|
10
|
+
role: "img",
|
|
11
|
+
"aria-hidden": "true"
|
|
12
|
+
}, Te = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "icon-[tdesign--fullscreen-exit-1]",
|
|
15
|
+
role: "img",
|
|
16
|
+
"aria-hidden": "true"
|
|
17
|
+
}, Ze = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "fixed -right-12 top-2 h-9 w-9 hover:bg-gray-600/80 transition-all"
|
|
20
|
+
}, He = { class: "flex justify-between h-[var(--footer-height)] px-[var(--content-padding)] items-center" }, Ae = { class: "flex items-center justify-between w-full pl-1 pr-4 h-full ml-2" }, Ne = { class: "flex items-center gap-2" }, Fe = { class: "text-sm text-gray-700 truncate max-w-[200px]" }, je = { class: "flex items-center gap-2" }, re = 5, N = 2e3, Je = /* @__PURE__ */ we({
|
|
21
|
+
inheritAttrs: !1,
|
|
22
|
+
__name: "index",
|
|
23
|
+
props: {
|
|
24
|
+
open: { type: Boolean, default: !1 },
|
|
25
|
+
title: { default: "" },
|
|
26
|
+
width: { default: "50%" },
|
|
27
|
+
showFooter: { type: Boolean, default: !0 },
|
|
28
|
+
showConfirm: { type: Boolean, default: !0 },
|
|
29
|
+
showCancel: { type: Boolean, default: !0 },
|
|
30
|
+
confirmText: { default: "确 认" },
|
|
31
|
+
cancelText: { default: "取 消" },
|
|
32
|
+
confirmLoading: { type: Boolean, default: !1 },
|
|
33
|
+
confirmDisabled: { type: Boolean, default: !1 },
|
|
34
|
+
closeOnConfirm: { type: Boolean, default: !1 },
|
|
35
|
+
closeOnEscape: { type: Boolean, default: !0 },
|
|
36
|
+
closeOnOverlay: { type: Boolean, default: !1 },
|
|
37
|
+
minimizable: { type: Boolean, default: !0 },
|
|
38
|
+
destroyOnClose: { type: Boolean, default: !1 },
|
|
39
|
+
draggable: { type: Boolean, default: !0 },
|
|
40
|
+
lockScroll: { type: Boolean, default: !0 },
|
|
41
|
+
top: { default: "15vh" },
|
|
42
|
+
fullscreen: { type: Boolean, default: !1 },
|
|
43
|
+
showFullscreen: { type: Boolean, default: !1 },
|
|
44
|
+
size: { default: "default" },
|
|
45
|
+
zIndex: { default: 2e3 }
|
|
46
|
+
},
|
|
47
|
+
emits: ["update:open", "open-change", "confirm", "cancel", "close", "opened", "closed"],
|
|
48
|
+
setup(de, { expose: ce, emit: ue }) {
|
|
49
|
+
let m = 0;
|
|
50
|
+
const t = de, D = be(), F = d(!0), O = d(!1), j = d(N), R = d(null), fe = Ee({
|
|
51
|
+
mobile: 0,
|
|
52
|
+
tablet: 640,
|
|
53
|
+
laptop: 1024,
|
|
54
|
+
desktop: 1280
|
|
55
|
+
}).isSmaller("tablet"), $ = C(() => {
|
|
56
|
+
const e = [];
|
|
57
|
+
return t.showCancel && e.push("cancel"), t.showConfirm && e.push("confirm"), e;
|
|
58
|
+
}), V = C(() => ({
|
|
59
|
+
CancelButton: z(J),
|
|
60
|
+
ConfirmButton: z(G)
|
|
61
|
+
})), U = C(() => !!(D.footer || t.showFooter)), h = d(!1), b = d(!1);
|
|
62
|
+
let T = !1, x = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
63
|
+
const k = d(
|
|
64
|
+
t.showFullscreen && fe ? !0 : t.fullscreen
|
|
65
|
+
), s = ue, W = C(() => t.open);
|
|
66
|
+
ke(() => {
|
|
67
|
+
W.value && (h.value = !1);
|
|
68
|
+
}), te(
|
|
69
|
+
() => t.open,
|
|
70
|
+
(e, o) => {
|
|
71
|
+
if (e) {
|
|
72
|
+
h.value = !1, b.value = !1, x = document.activeElement instanceof HTMLElement ? document.activeElement : x, o === !1 && s("open-change", !0);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
o && !h.value && (h.value = !0, s("open-change", !1), s("close", "external"));
|
|
76
|
+
}
|
|
77
|
+
), te(
|
|
78
|
+
() => t.confirmLoading,
|
|
79
|
+
(e) => {
|
|
80
|
+
e ? T = !0 : T && (T = !1, b.value = !1);
|
|
81
|
+
}
|
|
82
|
+
), ce({
|
|
83
|
+
handleMinimize: H
|
|
84
|
+
});
|
|
85
|
+
const p = `qy-dialog-${Math.random().toString(36).slice(2, 11)}`, w = d(!1);
|
|
86
|
+
let _ = !1;
|
|
87
|
+
const S = d(null), { x: X, y: Z } = Ie(S, {
|
|
88
|
+
initialValue: {
|
|
89
|
+
x: 5,
|
|
90
|
+
y: window.innerHeight - 100 - m * 60
|
|
91
|
+
},
|
|
92
|
+
onMove(e) {
|
|
93
|
+
var o;
|
|
94
|
+
(o = S.value) == null || o.classList.add("dragging"), document.body.classList.add("qy-dialog--dragging"), X.value = Math.max(
|
|
95
|
+
0,
|
|
96
|
+
Math.min(window.innerWidth - 300, e.x)
|
|
97
|
+
), Z.value = Math.max(
|
|
98
|
+
0,
|
|
99
|
+
Math.min(window.innerHeight - 50, e.y)
|
|
100
|
+
);
|
|
101
|
+
},
|
|
102
|
+
onEnd() {
|
|
103
|
+
var e;
|
|
104
|
+
(e = S.value) == null || e.classList.remove("dragging"), document.body.classList.remove("qy-dialog--dragging");
|
|
105
|
+
}
|
|
106
|
+
}), me = C(() => ({
|
|
107
|
+
transform: `translate(${X.value}px, ${Z.value}px)`,
|
|
108
|
+
willChange: "transform"
|
|
109
|
+
}));
|
|
110
|
+
function K(e) {
|
|
111
|
+
const o = e.target, { scrollTop: n, scrollHeight: r, clientHeight: f } = o;
|
|
112
|
+
F.value = n <= re, O.value = r - (n + f) <= re;
|
|
113
|
+
}
|
|
114
|
+
function pe() {
|
|
115
|
+
const e = document.querySelector(`.${p}.el-dialog`);
|
|
116
|
+
e && (R.value = e, e.addEventListener("scroll", K)), B(), s("opened");
|
|
117
|
+
}
|
|
118
|
+
function Y() {
|
|
119
|
+
k.value = !k.value, B();
|
|
120
|
+
}
|
|
121
|
+
function g(e) {
|
|
122
|
+
t.confirmLoading && e !== "external" || h.value || (h.value = !0, oe(), s("update:open", !1), s("open-change", !1), (e === "cancel" || e === "header") && s("cancel"), s("close", e));
|
|
123
|
+
}
|
|
124
|
+
function ge() {
|
|
125
|
+
s("closed"), ne(() => {
|
|
126
|
+
x != null && x.isConnected && x.focus();
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function ye(e) {
|
|
130
|
+
t.showFullscreen && e.detail >= 2 && Y();
|
|
131
|
+
}
|
|
132
|
+
function G() {
|
|
133
|
+
return le(
|
|
134
|
+
se,
|
|
135
|
+
{
|
|
136
|
+
type: "primary",
|
|
137
|
+
class: "dialog__footerBtn",
|
|
138
|
+
loading: t.confirmLoading,
|
|
139
|
+
disabled: t.confirmDisabled || t.confirmLoading || b.value,
|
|
140
|
+
onClick: ve
|
|
141
|
+
},
|
|
142
|
+
() => t.confirmText
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function ve() {
|
|
146
|
+
b.value || t.confirmLoading || t.confirmDisabled || (b.value = !0, s("confirm"), t.closeOnConfirm && g("confirm"));
|
|
147
|
+
}
|
|
148
|
+
function J() {
|
|
149
|
+
return le(
|
|
150
|
+
se,
|
|
151
|
+
{ class: "dialog__footerBtn", onClick: () => g("cancel") },
|
|
152
|
+
() => t.cancelText
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
_e(() => {
|
|
156
|
+
typeof window.qyDialogMaxZIndex > "u" && (window.qyDialogMaxZIndex = N), B(), document.addEventListener("keydown", Q), document.addEventListener("mousedown", ee);
|
|
157
|
+
});
|
|
158
|
+
function P() {
|
|
159
|
+
var r, f;
|
|
160
|
+
const e = (r = document.querySelector(`.${p}`)) == null ? void 0 : r.closest(".el-overlay");
|
|
161
|
+
if (!e) return !1;
|
|
162
|
+
const n = Array.from(
|
|
163
|
+
document.querySelectorAll(".el-overlay")
|
|
164
|
+
).filter((a) => window.getComputedStyle(a).display !== "none").map((a, y) => ({
|
|
165
|
+
overlay: a,
|
|
166
|
+
order: y,
|
|
167
|
+
zIndex: Number.parseInt(
|
|
168
|
+
window.getComputedStyle(a).zIndex || "0",
|
|
169
|
+
10
|
|
170
|
+
)
|
|
171
|
+
}));
|
|
172
|
+
return n.sort(
|
|
173
|
+
(a, y) => a.zIndex - y.zIndex || a.order - y.order
|
|
174
|
+
), ((f = n.at(-1)) == null ? void 0 : f.overlay) === e;
|
|
175
|
+
}
|
|
176
|
+
function Q(e) {
|
|
177
|
+
e.key !== "Escape" || !t.open || !t.closeOnEscape || t.confirmLoading || !P() || (e.preventDefault(), g("escape"));
|
|
178
|
+
}
|
|
179
|
+
function ee(e) {
|
|
180
|
+
if (!t.open || !t.closeOnOverlay || t.confirmLoading || !P() || !(e.target instanceof Node))
|
|
181
|
+
return;
|
|
182
|
+
const o = document.querySelector(`.${p}.el-dialog`), n = o == null ? void 0 : o.closest(".el-overlay");
|
|
183
|
+
!o || !n || !n.contains(e.target) || o.contains(e.target) || g("overlay");
|
|
184
|
+
}
|
|
185
|
+
function B() {
|
|
186
|
+
var y;
|
|
187
|
+
const e = Array.from(
|
|
188
|
+
document.querySelectorAll(".el-overlay")
|
|
189
|
+
).filter((E) => window.getComputedStyle(E).display !== "none" && !E.classList.contains("is-message")), o = (y = document.querySelector(`.${p}`)) == null ? void 0 : y.closest(".el-overlay"), n = document.querySelector(
|
|
190
|
+
`.${p}.el-dialog`
|
|
191
|
+
);
|
|
192
|
+
if (!o || !n) return;
|
|
193
|
+
const r = N;
|
|
194
|
+
window.qyDialogMaxZIndex = window.qyDialogMaxZIndex || r;
|
|
195
|
+
const a = Math.max(
|
|
196
|
+
window.qyDialogMaxZIndex,
|
|
197
|
+
...e.map(
|
|
198
|
+
(E) => parseInt(window.getComputedStyle(E).zIndex || r.toString())
|
|
199
|
+
)
|
|
200
|
+
) + 2;
|
|
201
|
+
window.qyDialogMaxZIndex = a, ne(() => {
|
|
202
|
+
o.style.zIndex = a.toString(), n.style.zIndex = (a + 1).toString(), j.value = a + 1;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
Ce(() => {
|
|
206
|
+
var e;
|
|
207
|
+
document.removeEventListener("keydown", Q), document.removeEventListener("mousedown", ee), (e = R.value) == null || e.removeEventListener("scroll", K), oe();
|
|
208
|
+
});
|
|
209
|
+
function oe() {
|
|
210
|
+
if (!_) {
|
|
211
|
+
w.value = !1;
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
_ = !1, m = Math.max(0, m - 1), w.value = !1;
|
|
215
|
+
}
|
|
216
|
+
function H() {
|
|
217
|
+
var o;
|
|
218
|
+
const e = (o = document.querySelector(`.${p}`)) == null ? void 0 : o.closest(".el-overlay");
|
|
219
|
+
!e || !t.open || (w.value ? (w.value = !1, e.style.display = "block", _ && (_ = !1, m = Math.max(0, m - 1)), B()) : (w.value = !0, e.style.display = "none", _ = !0, m += 1, Z.value = window.innerHeight - 50 - m * 60));
|
|
220
|
+
}
|
|
221
|
+
return (e, o) => {
|
|
222
|
+
const n = xe, r = he;
|
|
223
|
+
return i(), c("div", null, [
|
|
224
|
+
z(r, {
|
|
225
|
+
ref: "dialogRef",
|
|
226
|
+
class: I(["qy-dialog", [
|
|
227
|
+
t.size === "small" && "[&_.el-dialog__header]:!hidden",
|
|
228
|
+
p
|
|
229
|
+
]]),
|
|
230
|
+
"model-value": W.value,
|
|
231
|
+
title: t.title,
|
|
232
|
+
width: t.width,
|
|
233
|
+
top: t.top,
|
|
234
|
+
"align-center": "",
|
|
235
|
+
"append-to-body": "",
|
|
236
|
+
"destroy-on-close": t.destroyOnClose,
|
|
237
|
+
"lock-scroll": t.lockScroll,
|
|
238
|
+
style: {
|
|
239
|
+
"--el-dialog-padding-primary": 0
|
|
240
|
+
},
|
|
241
|
+
"show-close": !1,
|
|
242
|
+
"close-on-press-escape": !1,
|
|
243
|
+
fullscreen: k.value,
|
|
244
|
+
"z-index": j.value,
|
|
245
|
+
onClosed: ge,
|
|
246
|
+
onOpened: pe,
|
|
247
|
+
draggable: t.draggable
|
|
248
|
+
}, ze({
|
|
249
|
+
header: q(() => [
|
|
250
|
+
t.size === "default" ? (i(), c("div", {
|
|
251
|
+
key: 0,
|
|
252
|
+
style: A({
|
|
253
|
+
borderBottom: "1px solid",
|
|
254
|
+
borderColor: F.value ? "transparent" : "var(--block-outline-color)",
|
|
255
|
+
transition: "border-color .2s linear"
|
|
256
|
+
}),
|
|
257
|
+
class: "flex justify-between h-[var(--header-height)]",
|
|
258
|
+
onDblclick: ye
|
|
259
|
+
}, [
|
|
260
|
+
l("div", Le, [
|
|
261
|
+
L(D).header ? L(D).header ? (i(), c("div", Oe, [
|
|
262
|
+
M(e.$slots, "header")
|
|
263
|
+
])) : v("", !0) : (i(), c("span", De, ae(t.title), 1))
|
|
264
|
+
]),
|
|
265
|
+
l("div", {
|
|
266
|
+
class: "flex",
|
|
267
|
+
onMousedown: o[4] || (o[4] = u(() => {
|
|
268
|
+
}, ["stop"]))
|
|
269
|
+
}, [
|
|
270
|
+
t.size === "default" && t.minimizable ? (i(), c("div", {
|
|
271
|
+
key: 0,
|
|
272
|
+
class: "qy-dialog__btn qy-dialog__btn--default",
|
|
273
|
+
onClick: u(H, ["stop"]),
|
|
274
|
+
onMousedown: o[0] || (o[0] = u(() => {
|
|
275
|
+
}, ["stop"]))
|
|
276
|
+
}, [...o[7] || (o[7] = [
|
|
277
|
+
l("span", {
|
|
278
|
+
class: "icon-[material-symbols--minimize] text-xl mb-3",
|
|
279
|
+
role: "img",
|
|
280
|
+
"aria-hidden": "true"
|
|
281
|
+
}, null, -1)
|
|
282
|
+
])], 32)) : v("", !0),
|
|
283
|
+
t.showFullscreen ? (i(), c("div", {
|
|
284
|
+
key: 1,
|
|
285
|
+
class: "qy-dialog__btn qy-dialog__btn--default",
|
|
286
|
+
onClick: u(Y, ["stop"]),
|
|
287
|
+
onMousedown: o[1] || (o[1] = u(() => {
|
|
288
|
+
}, ["stop"]))
|
|
289
|
+
}, [
|
|
290
|
+
k.value ? (i(), c("span", Te)) : (i(), c("span", $e))
|
|
291
|
+
], 32)) : v("", !0),
|
|
292
|
+
l("div", {
|
|
293
|
+
class: "qy-dialog__btn qy-dialog__btn--danger",
|
|
294
|
+
onClick: o[2] || (o[2] = u((f) => g("header"), ["stop"])),
|
|
295
|
+
onMousedown: o[3] || (o[3] = u(() => {
|
|
296
|
+
}, ["stop"]))
|
|
297
|
+
}, [...o[8] || (o[8] = [
|
|
298
|
+
l("span", {
|
|
299
|
+
class: "icon-[ri--close-line] text-xl",
|
|
300
|
+
role: "img",
|
|
301
|
+
"aria-hidden": "true"
|
|
302
|
+
}, null, -1)
|
|
303
|
+
])], 32)
|
|
304
|
+
], 32)
|
|
305
|
+
], 36)) : v("", !0)
|
|
306
|
+
]),
|
|
307
|
+
default: q(() => [
|
|
308
|
+
l("div", {
|
|
309
|
+
class: I(["qy-dialog__wrapper", L(Se)(k.value && "qy-dialog__wrapper--fullscreen")]),
|
|
310
|
+
style: A({
|
|
311
|
+
maxHeight: U.value ? "calc(100vh - var(--header-height) - var(--footer-height) - var(--sides-gap))" : "calc(100vh - var(--header-height) - var(--sides-gap))",
|
|
312
|
+
padding: t.size === "small" ? "var(--small-content-padding)" : "var(--content-padding)"
|
|
313
|
+
})
|
|
314
|
+
}, [
|
|
315
|
+
t.size === "small" ? (i(), c("div", Ze, [
|
|
316
|
+
z(n, {
|
|
317
|
+
size: 36,
|
|
318
|
+
class: "cursor-pointer text-gray-100 active:scale-75 rounded-sm transition-all",
|
|
319
|
+
onClick: o[5] || (o[5] = (f) => g("header"))
|
|
320
|
+
}, {
|
|
321
|
+
default: q(() => [
|
|
322
|
+
z(L(Be))
|
|
323
|
+
]),
|
|
324
|
+
_: 1
|
|
325
|
+
})
|
|
326
|
+
])) : v("", !0),
|
|
327
|
+
M(e.$slots, "default")
|
|
328
|
+
], 6)
|
|
329
|
+
]),
|
|
330
|
+
_: 2
|
|
331
|
+
}, [
|
|
332
|
+
t.showFooter && !e.$slots.footer && Array.isArray($.value) ? {
|
|
333
|
+
name: "footer",
|
|
334
|
+
fn: q(() => [
|
|
335
|
+
l("div", He, [
|
|
336
|
+
l("div", null, [
|
|
337
|
+
M(e.$slots, "footer-left")
|
|
338
|
+
]),
|
|
339
|
+
l("div", {
|
|
340
|
+
class: I([{
|
|
341
|
+
"qy-dialog__footer--outline": O.value
|
|
342
|
+
}, "qy-dialog__footer flex items-center justify-end"])
|
|
343
|
+
}, [
|
|
344
|
+
$.value.includes("cancel") ? (i(), ie(J, { key: 0 })) : v("", !0),
|
|
345
|
+
$.value.includes("confirm") ? (i(), ie(G, { key: 1 })) : v("", !0),
|
|
346
|
+
M(e.$slots, "footer-append")
|
|
347
|
+
], 2)
|
|
348
|
+
])
|
|
349
|
+
]),
|
|
350
|
+
key: "0"
|
|
351
|
+
} : U.value ? {
|
|
352
|
+
name: "footer",
|
|
353
|
+
fn: q(() => [
|
|
354
|
+
l("div", {
|
|
355
|
+
class: I([{
|
|
356
|
+
"qy-dialog__footer--outline": O.value
|
|
357
|
+
}, "qy-dialog__footer px-[var(--content-padding)] min-h-[var(--footer-height)] flex items-center justify-end"])
|
|
358
|
+
}, [
|
|
359
|
+
M(e.$slots, "footer", {
|
|
360
|
+
layouts: V.value,
|
|
361
|
+
layoutsNode: Object.values(V.value)
|
|
362
|
+
})
|
|
363
|
+
], 2)
|
|
364
|
+
]),
|
|
365
|
+
key: "1"
|
|
366
|
+
} : void 0
|
|
367
|
+
]), 1032, ["class", "model-value", "title", "width", "top", "destroy-on-close", "lock-scroll", "fullscreen", "z-index", "draggable"]),
|
|
368
|
+
qe(l("div", {
|
|
369
|
+
ref_key: "minimizedRef",
|
|
370
|
+
ref: S,
|
|
371
|
+
class: "fixed left-0 top-0 bg-white rounded shadow-lg cursor-pointer z-[9999] hover:bg-gray-50",
|
|
372
|
+
style: A([me.value, { width: "300px", height: "50px", "will-change": "transform" }])
|
|
373
|
+
}, [
|
|
374
|
+
l("div", Ae, [
|
|
375
|
+
l("div", Ne, [
|
|
376
|
+
o[9] || (o[9] = l("div", { class: "icon-[mdi--window-restore] text-gray-600" }, null, -1)),
|
|
377
|
+
l("span", Fe, ae(t.title), 1)
|
|
378
|
+
]),
|
|
379
|
+
l("div", je, [
|
|
380
|
+
l("div", {
|
|
381
|
+
class: "p-1 hover:bg-gray-200 rounded",
|
|
382
|
+
onClick: u(H, ["stop"])
|
|
383
|
+
}, [...o[10] || (o[10] = [
|
|
384
|
+
l("div", { class: "icon-[mdi--window-maximize] text-gray-600" }, null, -1)
|
|
385
|
+
])]),
|
|
386
|
+
l("div", {
|
|
387
|
+
class: "p-1 hover:bg-red-100 rounded",
|
|
388
|
+
onClick: o[6] || (o[6] = u((f) => g("header"), ["stop"]))
|
|
389
|
+
}, [...o[11] || (o[11] = [
|
|
390
|
+
l("div", { class: "icon-[mdi--close] text-red-600" }, null, -1)
|
|
391
|
+
])])
|
|
392
|
+
])
|
|
393
|
+
])
|
|
394
|
+
], 4), [
|
|
395
|
+
[Me, w.value]
|
|
396
|
+
])
|
|
397
|
+
]);
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
export {
|
|
402
|
+
Je as _
|
|
403
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as ue, inject as se, ref as d, computed as b, watch as M, nextTick as Q, openBlock as u, createElementBlock as p, createVNode as R, unref as C, withCtx as z, createElementVNode as h, toDisplayString as S, Fragment as de, renderList as pe, withKeys as K, withModifiers as L, normalizeClass as fe, renderSlot as ve, createTextVNode as ye, createCommentVNode as Y, createBlock as me } from "vue";
|
|
2
|
-
import { Q as W } from "./index-
|
|
3
|
-
import { Q as G } from "./index-
|
|
2
|
+
import { Q as W } from "./index-lKF1vwdE.mjs";
|
|
3
|
+
import { Q as G } from "./index-B3GsIwhf.mjs";
|
|
4
4
|
import { QyPopover as he } from "../qy-popover/index.mjs";
|
|
5
|
-
import { n as _e, Q as ke } from "./index-
|
|
5
|
+
import { n as _e, Q as ke } from "./index-D8OXRBGc.mjs";
|
|
6
6
|
function be(l, y) {
|
|
7
7
|
const m = y == null ? "" : String(y), a = l && m ? l.resolve(m) : void 0;
|
|
8
8
|
return Object.freeze({
|
package/index.d.ts
CHANGED
|
@@ -49,12 +49,19 @@ import type QyProgressComponent from './qy-progress'
|
|
|
49
49
|
import type QyStatisticComponent from './qy-statistic'
|
|
50
50
|
import type QyAvatarComponent from './qy-avatar'
|
|
51
51
|
import type QyTreeComponent from './qy-tree'
|
|
52
|
+
import type QyPaginationComponent from './qy-pagination'
|
|
52
53
|
import type QyInputComponent from './qy-input'
|
|
53
54
|
import type QyInputTagComponent from './qy-input-tag'
|
|
54
55
|
import type QyInputNumberComponent from './qy-input-number'
|
|
55
56
|
import type QyDatePickerComponent from './qy-date-picker'
|
|
56
57
|
import type QyMoneyInputComponent from './qy-money-input'
|
|
57
58
|
|
|
59
|
+
export type {
|
|
60
|
+
QyPaginationBinding,
|
|
61
|
+
QyPaginationEmits,
|
|
62
|
+
QyPaginationProps
|
|
63
|
+
} from './qy-pagination'
|
|
64
|
+
|
|
58
65
|
export type {
|
|
59
66
|
QyInputNumberClearValue,
|
|
60
67
|
QyInputNumberControlsPosition,
|
|
@@ -600,6 +607,7 @@ export const QyProgress: typeof QyProgressComponent
|
|
|
600
607
|
export const QyStatistic: typeof QyStatisticComponent
|
|
601
608
|
export const QyAvatar: typeof QyAvatarComponent
|
|
602
609
|
export const QyTree: typeof QyTreeComponent
|
|
610
|
+
export const QyPagination: typeof QyPaginationComponent
|
|
603
611
|
export const QyRemarkImage: Plugin
|
|
604
612
|
export function parseRemarkText(remarkText: string): {
|
|
605
613
|
imageUrl: string
|
|
@@ -690,6 +698,7 @@ declare const _default: Plugin & {
|
|
|
690
698
|
QyStatistic: typeof QyStatisticComponent
|
|
691
699
|
QyAvatar: typeof QyAvatarComponent
|
|
692
700
|
QyTree: typeof QyTreeComponent
|
|
701
|
+
QyPagination: typeof QyPaginationComponent
|
|
693
702
|
QyRemarkImage: typeof QyRemarkImage
|
|
694
703
|
}
|
|
695
704
|
|