@qynpm/ui 1.0.23 → 1.0.25
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 +194 -20
- package/dist/index.cjs +16 -6
- package/dist/index.mjs +51 -34
- 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 +4 -3
- package/dist/qy-checkbox-group/index.cjs +1 -0
- package/dist/qy-checkbox-group/index.mjs +7 -0
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +4 -3
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +2 -2
- package/dist/qy-dropdown/index.cjs +1 -1
- package/dist/qy-dropdown/index.mjs +1 -1
- package/dist/qy-file-picker/index.cjs +1 -0
- package/dist/qy-file-picker/index.mjs +7 -0
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/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 +2 -2
- package/dist/qy-input/index.mjs +6 -3
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +5 -3
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +2 -2
- package/dist/qy-menu-actions/index.cjs +1 -1
- package/dist/qy-menu-actions/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +2 -2
- package/dist/qy-popover/index.cjs +2 -0
- package/dist/qy-popover/index.mjs +8 -0
- package/dist/qy-radio/index.cjs +1 -0
- package/dist/qy-radio/index.mjs +7 -0
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +5 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +4 -3
- 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 -0
- package/dist/qy-switch/index.mjs +7 -0
- 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 -0
- package/dist/qy-tag/index.mjs +7 -0
- package/dist/qy-tooltip/index.cjs +2 -0
- package/dist/qy-tooltip/index.mjs +8 -0
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/index-528z_q7d.cjs +1 -0
- package/dist/shared/index-9v7CIwzO.cjs +1 -0
- package/dist/shared/{index-D7lMppIb.mjs → index-B7uyWUhS.mjs} +63 -63
- package/dist/shared/index-BTPk2zzq.cjs +1 -0
- package/dist/shared/index-BcCZMWAj.cjs +1 -0
- package/dist/shared/index-C1YwUATr.cjs +1 -0
- package/dist/shared/index-C6jcSQSF.mjs +129 -0
- package/dist/shared/index-CbCpXtYr.mjs +68 -0
- package/dist/shared/index-Cl5cuyVG.mjs +54 -0
- package/dist/shared/index-CuusBxhR.cjs +1 -0
- package/dist/shared/{index-BXlQSIWX.mjs → index-DZroPZ8B.mjs} +8 -8
- package/dist/shared/{index-DyK6vf5h.cjs → index-DmhpD4Cp.cjs} +1 -1
- package/dist/shared/index-DrJuMzr1.mjs +90 -0
- package/dist/shared/index-Du2IqeCI.mjs +149 -0
- package/dist/shared/{index-ZLoAI88M.mjs → index-DvQdcj7u.mjs} +1327 -1389
- package/dist/shared/index-EGnVOaC9.cjs +1 -0
- package/dist/shared/index-QQkDJv3q.cjs +1 -0
- package/dist/shared/index-R5B1rjXo.mjs +225 -0
- package/dist/shared/index-yf2Ijz_G.mjs +72 -0
- package/dist/shared/index-zJN0M-bx.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-C3F8M9sD.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKZHI_y-.mjs +106 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CsKjCWIN.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-N12Nn2uu.mjs +61 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BZQLyvw8.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs +166 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DSur831A.mjs +68 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs +132 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs +140 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-ztD-It-2.mjs +121 -0
- package/index.d.ts +145 -7
- package/package.json +43 -1
- package/qy-autocomplete/index.d.ts +5 -5
- package/qy-checkbox/index.d.ts +45 -5
- package/qy-checkbox-group/index.d.ts +48 -0
- package/qy-date-picker/index.d.ts +137 -2
- package/qy-file-picker/index.d.ts +49 -0
- package/qy-image/index.d.ts +28 -28
- package/qy-image-preview/index.d.ts +20 -20
- package/qy-input/index.d.ts +46 -1
- package/qy-input-number/index.d.ts +41 -1
- package/qy-menu-actions/index.d.ts +29 -29
- package/qy-popover/index.d.ts +63 -0
- package/qy-radio/index.d.ts +44 -0
- package/qy-radio-group/index.d.ts +57 -9
- package/qy-select/index.d.ts +64 -2
- package/qy-switch/index.d.ts +46 -0
- package/qy-table-column-settings/index.d.ts +18 -18
- package/qy-tag/index.d.ts +44 -0
- package/qy-tooltip/index.d.ts +54 -0
- package/qy-tree-select/index.d.ts +5 -5
- package/dist/shared/index-B3U7dqMt.cjs +0 -1
- package/dist/shared/index-BbpD7hM0.cjs +0 -1
- package/dist/shared/index-D3l7tLgw.cjs +0 -1
- package/dist/shared/index-NCpeoBUZ.mjs +0 -153
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BJakDlgd.mjs +0 -70
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CelW13DE.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DA1Nh7U1.mjs +0 -130
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DEpXmMj5.mjs +0 -162
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DNEVwqm7.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DfKTEci_.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-gTkP1LWg.mjs +0 -61
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-svvSFv2K.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +0 -152
- /package/dist/shared/{index-CagHZ25z.mjs → index-BYLXkIxS.mjs} +0 -0
- /package/dist/shared/{index-CRZsiNVW.cjs → index-C1p86ezL.cjs} +0 -0
- /package/dist/shared/{index-BO5aWk3f.cjs → index-ClUqUsAv.cjs} +0 -0
- /package/dist/shared/{index-CSxCewXP.mjs → index-Cy_Glkc-.mjs} +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { ElDialog as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { ElDialog as A, ElTable as G, ElTableColumn as H, ElInput as J, ElButton as M } from "element-plus/es";
|
|
2
|
+
import { defineComponent as O, ref as S, watch as P, computed as $, openBlock as C, createBlock as B, withCtx as i, createElementVNode as l, createVNode as o, normalizeClass as X, toDisplayString as T, createElementBlock as E, createCommentVNode as Y, createTextVNode as D } from "vue";
|
|
3
|
+
import { S as Z } from "./index-CbCpXtYr.mjs";
|
|
4
|
+
import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const ee = { class: "qy-table-column-settings" }, te = { class: "qy-table-column-settings__table-wrap" }, le = ["data-testid", "onClick"], ne = {
|
|
5
6
|
class: "qy-table-column-settings__side",
|
|
6
7
|
"data-testid": "settings-side-actions"
|
|
7
|
-
}, ae = { class: "qy-table-column-settings__side-main" },
|
|
8
|
+
}, ae = { class: "qy-table-column-settings__side-main" }, se = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "qy-table-column-settings__selected is-empty"
|
|
10
|
-
},
|
|
11
|
+
}, ie = {
|
|
11
12
|
key: 1,
|
|
12
13
|
class: "qy-table-column-settings__selected"
|
|
13
|
-
},
|
|
14
|
+
}, oe = { class: "qy-table-column-settings__side-footer" }, ue = /* @__PURE__ */ O({
|
|
14
15
|
name: "QyTableColumnSettings",
|
|
15
16
|
__name: "index",
|
|
16
17
|
props: {
|
|
@@ -23,12 +24,12 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
23
24
|
unconfigurableTypes: { default: () => ["index", "selection", "expand", "setup"] }
|
|
24
25
|
},
|
|
25
26
|
emits: ["update:modelValue", "confirm", "reset", "cancel", "delete-cache", "change"],
|
|
26
|
-
setup(
|
|
27
|
-
const m =
|
|
27
|
+
setup(f, { emit: U }) {
|
|
28
|
+
const m = f, r = U, s = S([]), p = S(""), b = (t) => t.map((e) => ({ ...e })), N = () => {
|
|
28
29
|
var t;
|
|
29
|
-
|
|
30
|
+
s.value = b(m.settings), p.value = ((t = s.value[0]) == null ? void 0 : t.key) || "";
|
|
30
31
|
};
|
|
31
|
-
|
|
32
|
+
P(
|
|
32
33
|
() => m.modelValue,
|
|
33
34
|
(t) => {
|
|
34
35
|
t && N();
|
|
@@ -38,41 +39,41 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
41
|
const v = () => {
|
|
41
|
-
r("change",
|
|
42
|
-
},
|
|
43
|
-
() =>
|
|
42
|
+
r("change", b(s.value));
|
|
43
|
+
}, y = (t) => s.value.find((e) => e.key === t), u = $(() => y(p.value)), c = $(
|
|
44
|
+
() => s.value.findIndex((t) => t.key === p.value)
|
|
44
45
|
), w = (t) => !!(t.type && m.unconfigurableTypes.includes(t.type)), z = (t) => t === "left" ? "left" : t === "right" ? "right" : "none", h = (t) => t.type === "index" ? "序号" : t.type === "selection" ? "多选" : t.type === "expand" ? "展开" : t.type === "setup" ? "设置" : t.label || t.prop || t.key, q = (t) => {
|
|
45
46
|
t && (p.value = t.key);
|
|
46
47
|
}, x = (t) => {
|
|
47
48
|
u.value && F(u.value.key, t);
|
|
48
49
|
}, F = (t, e) => {
|
|
49
|
-
const n =
|
|
50
|
+
const n = y(t);
|
|
50
51
|
n && (n.fixed = e, v());
|
|
51
52
|
}, K = (t, e) => {
|
|
52
|
-
const n =
|
|
53
|
+
const n = y(t);
|
|
53
54
|
!n || w(n) || (n.visible = e, v());
|
|
54
55
|
}, L = (t, e) => {
|
|
55
|
-
const n =
|
|
56
|
+
const n = y(t);
|
|
56
57
|
n && (n.width = e, v());
|
|
57
|
-
},
|
|
58
|
-
if (t === e || t < 0 || t >=
|
|
59
|
-
const n = [...
|
|
60
|
-
n.splice(e, 0, g),
|
|
58
|
+
}, _ = (t, e) => {
|
|
59
|
+
if (t === e || t < 0 || t >= s.value.length || e < 0 || e >= s.value.length) return;
|
|
60
|
+
const n = [...s.value], [g] = n.splice(t, 1);
|
|
61
|
+
n.splice(e, 0, g), s.value = n, p.value = g.key, v();
|
|
61
62
|
}, Q = () => {
|
|
62
63
|
var e, n;
|
|
63
64
|
const t = (e = m.defaultSettings) != null && e.length ? m.defaultSettings : m.settings;
|
|
64
|
-
|
|
65
|
+
s.value = b(t), p.value = ((n = s.value[0]) == null ? void 0 : n.key) || "", r("reset", b(s.value)), v();
|
|
65
66
|
}, V = () => {
|
|
66
67
|
r("cancel"), r("update:modelValue", !1);
|
|
67
68
|
}, R = () => {
|
|
68
|
-
r("confirm",
|
|
69
|
+
r("confirm", b(s.value)), r("update:modelValue", !1);
|
|
69
70
|
};
|
|
70
71
|
return (t, e) => {
|
|
71
|
-
const n =
|
|
72
|
-
return C(), B(
|
|
73
|
-
"model-value":
|
|
74
|
-
title:
|
|
75
|
-
width:
|
|
72
|
+
const n = H, g = J, W = G, d = M, j = A;
|
|
73
|
+
return C(), B(j, {
|
|
74
|
+
"model-value": f.modelValue,
|
|
75
|
+
title: f.title,
|
|
76
|
+
width: f.width,
|
|
76
77
|
"append-to-body": "",
|
|
77
78
|
onClose: V
|
|
78
79
|
}, {
|
|
@@ -98,10 +99,10 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
98
99
|
})
|
|
99
100
|
]),
|
|
100
101
|
default: i(() => [
|
|
101
|
-
l("div",
|
|
102
|
-
l("div",
|
|
103
|
-
o(
|
|
104
|
-
data:
|
|
102
|
+
l("div", ee, [
|
|
103
|
+
l("div", te, [
|
|
104
|
+
o(W, {
|
|
105
|
+
data: s.value,
|
|
105
106
|
"row-key": "key",
|
|
106
107
|
height: "400px",
|
|
107
108
|
border: "",
|
|
@@ -116,18 +117,18 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
116
117
|
prop: "label",
|
|
117
118
|
"show-overflow-tooltip": ""
|
|
118
119
|
}, {
|
|
119
|
-
default: i(({ row:
|
|
120
|
+
default: i(({ row: a }) => [
|
|
120
121
|
l("div", {
|
|
121
122
|
class: "qy-table-column-settings__name",
|
|
122
|
-
"data-testid": `table-row-${
|
|
123
|
-
onClick: (k) => q(
|
|
123
|
+
"data-testid": `table-row-${a.key}`,
|
|
124
|
+
onClick: (k) => q(a)
|
|
124
125
|
}, [
|
|
125
126
|
l("span", {
|
|
126
|
-
class:
|
|
127
|
+
class: X(["qy-table-column-settings__fixed-mark", `is-${z(a.fixed)}`]),
|
|
127
128
|
"aria-hidden": "true"
|
|
128
129
|
}, null, 2),
|
|
129
|
-
l("span", null,
|
|
130
|
-
], 8,
|
|
130
|
+
l("span", null, T(h(a)), 1)
|
|
131
|
+
], 8, le)
|
|
131
132
|
]),
|
|
132
133
|
_: 1
|
|
133
134
|
}),
|
|
@@ -136,13 +137,13 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
136
137
|
prop: "width",
|
|
137
138
|
width: "150"
|
|
138
139
|
}, {
|
|
139
|
-
default: i(({ row:
|
|
140
|
+
default: i(({ row: a }) => [
|
|
140
141
|
o(g, {
|
|
141
|
-
"model-value":
|
|
142
|
+
"model-value": a.width,
|
|
142
143
|
size: "small",
|
|
143
144
|
placeholder: "留空自动设置宽度",
|
|
144
145
|
"data-testid": "width",
|
|
145
|
-
"onUpdate:modelValue": (k) => L(
|
|
146
|
+
"onUpdate:modelValue": (k) => L(a.key, k)
|
|
146
147
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
147
148
|
]),
|
|
148
149
|
_: 1
|
|
@@ -152,13 +153,12 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
152
153
|
prop: "visible",
|
|
153
154
|
width: "100"
|
|
154
155
|
}, {
|
|
155
|
-
default: i(({ row:
|
|
156
|
-
o(
|
|
157
|
-
"model-value":
|
|
158
|
-
disabled: w(
|
|
159
|
-
style: { "--el-switch-on-color": "rgb(99 102 241)" },
|
|
156
|
+
default: i(({ row: a }) => [
|
|
157
|
+
o(Z, {
|
|
158
|
+
"model-value": a.visible,
|
|
159
|
+
disabled: w(a),
|
|
160
160
|
"data-testid": "visible-switch",
|
|
161
|
-
"onUpdate:modelValue": (k) => K(
|
|
161
|
+
"onUpdate:modelValue": (k) => K(a.key, !!k)
|
|
162
162
|
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
|
|
163
163
|
]),
|
|
164
164
|
_: 1
|
|
@@ -167,14 +167,14 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
167
167
|
_: 1
|
|
168
168
|
}, 8, ["data"])
|
|
169
169
|
]),
|
|
170
|
-
l("div",
|
|
170
|
+
l("div", ne, [
|
|
171
171
|
l("div", ae, [
|
|
172
|
-
u.value ? (C(),
|
|
172
|
+
u.value ? (C(), E("div", ie, T(h(u.value)), 1)) : (C(), E("div", se, " 请选择列 ")),
|
|
173
173
|
o(d, {
|
|
174
174
|
class: "qy-table-column-settings__side-button",
|
|
175
175
|
disabled: !u.value || c.value === 0,
|
|
176
176
|
"data-action": "top",
|
|
177
|
-
onClick: e[0] || (e[0] = (
|
|
177
|
+
onClick: e[0] || (e[0] = (a) => _(c.value, 0))
|
|
178
178
|
}, {
|
|
179
179
|
default: i(() => [...e[8] || (e[8] = [
|
|
180
180
|
l("span", { class: "qy-table-column-settings__action-icon is-top" }, null, -1),
|
|
@@ -186,7 +186,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
186
186
|
class: "qy-table-column-settings__side-button",
|
|
187
187
|
disabled: !u.value || c.value === 0,
|
|
188
188
|
"data-action": "up",
|
|
189
|
-
onClick: e[1] || (e[1] = (
|
|
189
|
+
onClick: e[1] || (e[1] = (a) => _(c.value, c.value - 1))
|
|
190
190
|
}, {
|
|
191
191
|
default: i(() => [...e[9] || (e[9] = [
|
|
192
192
|
l("span", { class: "qy-table-column-settings__action-icon is-up" }, null, -1),
|
|
@@ -196,9 +196,9 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
196
196
|
}, 8, ["disabled"]),
|
|
197
197
|
o(d, {
|
|
198
198
|
class: "qy-table-column-settings__side-button",
|
|
199
|
-
disabled: !u.value || c.value ===
|
|
199
|
+
disabled: !u.value || c.value === s.value.length - 1,
|
|
200
200
|
"data-action": "down",
|
|
201
|
-
onClick: e[2] || (e[2] = (
|
|
201
|
+
onClick: e[2] || (e[2] = (a) => _(c.value, c.value + 1))
|
|
202
202
|
}, {
|
|
203
203
|
default: i(() => [...e[10] || (e[10] = [
|
|
204
204
|
l("span", { class: "qy-table-column-settings__action-icon is-down" }, null, -1),
|
|
@@ -208,9 +208,9 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
208
208
|
}, 8, ["disabled"]),
|
|
209
209
|
o(d, {
|
|
210
210
|
class: "qy-table-column-settings__side-button",
|
|
211
|
-
disabled: !u.value || c.value ===
|
|
211
|
+
disabled: !u.value || c.value === s.value.length - 1,
|
|
212
212
|
"data-action": "bottom",
|
|
213
|
-
onClick: e[3] || (e[3] = (
|
|
213
|
+
onClick: e[3] || (e[3] = (a) => _(c.value, s.value.length - 1))
|
|
214
214
|
}, {
|
|
215
215
|
default: i(() => [...e[11] || (e[11] = [
|
|
216
216
|
l("span", { class: "qy-table-column-settings__action-icon is-bottom" }, null, -1),
|
|
@@ -222,7 +222,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
222
222
|
class: "qy-table-column-settings__side-button",
|
|
223
223
|
disabled: !u.value,
|
|
224
224
|
"data-action": "fixed-left",
|
|
225
|
-
onClick: e[4] || (e[4] = (
|
|
225
|
+
onClick: e[4] || (e[4] = (a) => x("left"))
|
|
226
226
|
}, {
|
|
227
227
|
default: i(() => [...e[12] || (e[12] = [
|
|
228
228
|
l("span", { class: "qy-table-column-settings__action-icon is-fixed-left" }, null, -1),
|
|
@@ -234,7 +234,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
234
234
|
class: "qy-table-column-settings__side-button",
|
|
235
235
|
disabled: !u.value,
|
|
236
236
|
"data-action": "fixed-right",
|
|
237
|
-
onClick: e[5] || (e[5] = (
|
|
237
|
+
onClick: e[5] || (e[5] = (a) => x("right"))
|
|
238
238
|
}, {
|
|
239
239
|
default: i(() => [...e[13] || (e[13] = [
|
|
240
240
|
l("span", { class: "qy-table-column-settings__action-icon is-fixed-right" }, null, -1),
|
|
@@ -246,7 +246,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
246
246
|
class: "qy-table-column-settings__side-button",
|
|
247
247
|
disabled: !u.value,
|
|
248
248
|
"data-action": "clear-fixed",
|
|
249
|
-
onClick: e[6] || (e[6] = (
|
|
249
|
+
onClick: e[6] || (e[6] = (a) => x(!1))
|
|
250
250
|
}, {
|
|
251
251
|
default: i(() => [...e[14] || (e[14] = [
|
|
252
252
|
l("span", { class: "qy-table-column-settings__action-icon is-clear-fixed" }, null, -1),
|
|
@@ -255,7 +255,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
255
255
|
_: 1
|
|
256
256
|
}, 8, ["disabled"])
|
|
257
257
|
]),
|
|
258
|
-
l("div",
|
|
258
|
+
l("div", oe, [
|
|
259
259
|
o(d, {
|
|
260
260
|
"data-action": "reset",
|
|
261
261
|
onClick: Q
|
|
@@ -266,19 +266,19 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
266
266
|
])]),
|
|
267
267
|
_: 1
|
|
268
268
|
}),
|
|
269
|
-
|
|
269
|
+
f.showDeleteCache ? (C(), B(d, {
|
|
270
270
|
key: 0,
|
|
271
271
|
type: "danger",
|
|
272
272
|
plain: "",
|
|
273
273
|
"data-action": "delete-cache",
|
|
274
|
-
onClick: e[7] || (e[7] = (
|
|
274
|
+
onClick: e[7] || (e[7] = (a) => r("delete-cache"))
|
|
275
275
|
}, {
|
|
276
276
|
default: i(() => [...e[16] || (e[16] = [
|
|
277
277
|
l("span", { class: "qy-table-column-settings__action-icon is-reset" }, null, -1),
|
|
278
278
|
l("span", null, "删除缓存", -1)
|
|
279
279
|
])]),
|
|
280
280
|
_: 1
|
|
281
|
-
})) :
|
|
281
|
+
})) : Y("", !0)
|
|
282
282
|
])
|
|
283
283
|
])
|
|
284
284
|
])
|
|
@@ -287,7 +287,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
|
|
|
287
287
|
}, 8, ["model-value", "title", "width"]);
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
}), pe = /* @__PURE__ */
|
|
290
|
+
}), pe = /* @__PURE__ */ I(ue, [["__scopeId", "data-v-9a39a343"]]);
|
|
291
291
|
export {
|
|
292
292
|
pe as T
|
|
293
293
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),h=require("element-plus"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=t.defineComponent({name:"QySelect",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,Object,Array,null],default:void 0},options:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},objectIdentityKey:{default:void 0},disabledKey:{default:"disabled"},placeholder:{default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},collapseTags:{type:Boolean,default:!1},collapseTagsTooltip:{type:Boolean,default:!1},autoSelectSingle:{type:Boolean,default:!1},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},fitInputWidth:{type:Boolean,default:!0},popperClass:{default:""}},emits:["update:modelValue","change","clear","visible-change","focus","blur"],setup(o,{expose:S,emit:V}){const u=Symbol("invalid-select-value"),a=o,r=V,B=t.useAttrs(),A=t.useSlots(),f=t.ref(null),C=t.computed(()=>Object.fromEntries(Object.entries(B).filter(([e])=>e==="class"||e==="style"||e==="id"||e==="name"||e==="role"||e==="title"||e==="tabindex"||e==="remote"||e==="remoteMethod"||e==="remote-method"||e==="remoteShowSuffix"||e==="remote-show-suffix"||e.startsWith("data-")||e.startsWith("aria-")))),K=t.computed(()=>["qy-select__popper",a.popperClass].filter(Boolean).join(" ")),g=t.computed(()=>{const e=y(a.modelValue);return e===u?void 0:e}),d=t.computed(()=>a.options.map(e=>({raw:e,label:I(e),value:O(e),disabled:!!e[a.disabledKey]}))),p=t.computed(()=>{const e=A.default;return e?e().some(v):!1}),j=t.computed(()=>{if(!a.objectIdentityKey)return;const e=g.value,l=Array.isArray(e)?e.some(c):c(e),n=!p.value&&d.value.some(s=>c(s.value));return l||n?a.objectIdentityKey:void 0});function v(e){return e.type===t.Comment?!1:e.type===t.Text?typeof e.children=="string"&&e.children.trim()!=="":e.type!==t.Fragment||!Array.isArray(e.children)?!0:e.children.some(l=>t.isVNode(l)?v(l):typeof l=="string"?l.trim()!=="":l!=null)}function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function m(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||c(e)?e:u}function y(e){if(e==null)return e;if(Array.isArray(e)){const l=e;return l.every(n=>m(n)!==u)?l:u}return m(e)}function I(e){const l=e[a.labelKey]??e.label??e.value??"";return typeof l=="string"||typeof l=="number"?l:typeof l=="boolean"?String(l):""}function O(e){const l=e[a.valueKey]??e.value??e.label,n=m(l);return n===u?void 0:n}function w(e){return Array.isArray(e)?e.length===0:e===""||e===null||e===void 0}let i=null;t.watch([d,()=>a.modelValue,()=>a.autoSelectSingle,()=>a.disabled,()=>a.multiple],([e])=>b(e),{flush:"post"}),t.onMounted(()=>b(d.value)),t.onUpdated(()=>b(d.value));function b(e){if(!w(a.modelValue)){i=null;return}if(!a.autoSelectSingle||a.disabled||p.value||e.length!==1)return;const[l]=e;if(l.disabled||l.value===void 0)return;const n=x(l.value);if(i&&i.identityKey===a.objectIdentityKey&&i.multiple===a.multiple&&Object.is(i.candidate,n))return;i={candidate:n,identityKey:a.objectIdentityKey,multiple:a.multiple};const s=a.multiple?[l.value]:l.value;r("update:modelValue",s),r("change",s)}function x(e){return!c(e)||!a.objectIdentityKey?e:e[a.objectIdentityKey]??e}function $(e,l){return`${String(e.value??e.label??"")}-${l}`}function T(e){const l=y(e);l!==u&&r("update:modelValue",l)}function z(e){const l=y(e);l!==u&&r("change",l)}function E(){r("clear")}function q(e){r("visible-change",e)}function M(e){r("focus",e)}function P(e){r("blur",e)}function F(){var e,l;(l=(e=f.value)==null?void 0:e.focus)==null||l.call(e)}function H(){var e,l;(l=(e=f.value)==null?void 0:e.blur)==null||l.call(e)}return S({focus:F,blur:H}),(e,l)=>(t.openBlock(),t.createBlock(t.unref(h.ElSelect),t.mergeProps({ref_key:"selectRef",ref:f,class:"qy-select"},C.value,{"model-value":g.value,placeholder:o.placeholder,disabled:o.disabled,clearable:o.clearable,filterable:o.filterable,loading:o.loading,multiple:o.multiple,"collapse-tags":o.collapseTags,"collapse-tags-tooltip":o.collapseTagsTooltip,size:o.size,teleported:o.teleported,"fit-input-width":o.fitInputWidth,"popper-class":K.value,"append-to":o.appendTo,"value-key":j.value,"onUpdate:modelValue":T,onChange:z,onClear:E,onVisibleChange:q,onFocus:M,onBlur:P}),t.createSlots({default:t.withCtx(()=>[p.value?t.renderSlot(e.$slots,"default",{},void 0,!0,0):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(d.value,(n,s)=>(t.openBlock(),t.createBlock(t.unref(h.ElOption),{key:$(n,s),label:n.label,value:n.value,disabled:n.disabled},null,8,["label","value","disabled"]))),128))]),_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,e.$slots.empty?{name:"empty",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty",{},void 0,!0)]),key:"1"}:void 0,e.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading",{},void 0,!0)]),key:"2"}:void 0,e.$slots.tag?{name:"tag",fn:t.withCtx(n=>[t.renderSlot(e.$slots,"tag",t.normalizeProps(t.guardReactiveProps(n)),void 0,!0)]),key:"3"}:void 0]),1040,["model-value","placeholder","disabled","clearable","filterable","loading","multiple","collapse-tags","collapse-tags-tooltip","size","teleported","fit-input-width","popper-class","append-to","value-key"]))}}),W=L._export_sfc(U,[["__scopeId","data-v-3d7d9a0a"]]);exports.Select=W;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),b=require("element-plus"),p=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=t.defineComponent({name:"QyCheckbox",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[Boolean,String,Number],default:!1},value:{type:[Boolean,String,Number]},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:void 0},trueValue:{type:[Boolean,String,Number],default:!0},falseValue:{type:[Boolean,String,Number],default:!1},name:{},id:{},tabindex:{},ariaLabel:{},ariaControls:{}},emits:["update:modelValue","change","focus","blur"],setup(o,{emit:r}){const a=o,l=r,u=t.useAttrs(),i=t.computed(()=>Object.fromEntries(Object.entries(u).filter(([e])=>e==="class"||e==="style"||e==="role"||e==="title"||e.startsWith("data-")||e.startsWith("aria-")))),s=t.computed(()=>a.modelValue===a.trueValue);function n(e){return e?a.trueValue:a.falseValue}function d(e){a.disabled||l("update:modelValue",n(e===!0))}function c(e){a.disabled||l("change",n(e===!0))}function f(e){l("focus",e)}function m(e){l("blur",e)}return(e,x)=>(t.openBlock(),t.createBlock(t.unref(b.ElCheckbox),t.mergeProps(i.value,{class:"qy-checkbox","model-value":s.value,value:a.value,indeterminate:a.indeterminate,disabled:a.disabled||void 0,size:a.size,name:a.name,id:a.id,tabindex:a.tabindex,"aria-label":a.ariaLabel,"aria-controls":a.ariaControls,"onUpdate:modelValue":d,onChange:c,onFocusin:f,onFocusout:m}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","value","indeterminate","disabled","size","name","id","tabindex","aria-label","aria-controls"]))}}),v=p._export_sfc(h,[["__scopeId","data-v-33fb88db"]]);exports.Checkbox=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),x=require("./index.vue_vue_type_style_index_0_lang-BZQLyvw8.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w={class:"qy-menu-actions__panel"},T=["disabled","data-action-key","onClick"],C={key:0,class:"qy-menu-actions__loading"},b={key:0,class:"qy-menu-actions__empty"},E={key:1,class:"qy-menu-actions__inline"},V=["disabled","data-action-key","onClick"],z={key:0,class:"qy-menu-actions__loading"},A={key:0,class:"qy-menu-actions__empty"},M=e.defineComponent({name:"QyMenuActions",__name:"index",props:{actions:{default:()=>[]},row:{},rowIndex:{},context:{},mode:{default:"inline"},emptyText:{default:"无数据"},popoverWidth:{default:150},confirmMethod:{}},emits:["action","confirm-required"],setup(r,{emit:f}){const l=r,y=f,p=e.computed(()=>{var n,o;return{...l.context,row:l.row??((n=l.context)==null?void 0:n.row),rowIndex:l.rowIndex??((o=l.context)==null?void 0:o.rowIndex)}}),d=e.ref(!1),i=e.ref(new Set),v=(n,o)=>({...p.value,target:o.currentTarget,hide:h,setLoading:t=>q(n,t)}),u=n=>typeof n=="function"?n(p.value):!!n,s=e.computed(()=>l.actions.filter(n=>!u(n.hidden))),g=e.computed(()=>s.value.some(n=>a(n))),m=n=>u(n.disabled)||a(n),a=n=>i.value.has(n.key)||u(n.loading),k=(n,o)=>{const t=n.type||o;return{default:"var(--el-text-color-primary)",primary:"var(--el-color-primary)",success:"var(--el-color-success)",warning:"var(--el-color-warning)",danger:"var(--el-color-danger)"}[t]},_=async(n,o)=>{if(o.stopPropagation(),m(n))return;const t=v(n,o);if(n.confirm){if(!l.confirmMethod){y("confirm-required",n,t);return}if(!await l.confirmMethod(n,t))return}y("action",n,t)};function h(){d.value=!1}function q(n,o){const t=new Set(i.value);o?t.add(n.key):t.delete(n.key),i.value=t}return e.onBeforeUnmount(()=>{i.value=new Set}),(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-menu-actions",`is-${r.mode}`])},[r.mode==="popover"?(e.openBlock(),e.createBlock(x._sfc_main,{key:0,open:d.value,"onUpdate:open":o[0]||(o[0]=t=>d.value=t),trigger:"hover",placement:"left",width:r.popoverWidth,"hide-delay":g.value?999999:100,"show-arrow":!1},{reference:e.withCtx(()=>[...o[1]||(o[1]=[e.createElementVNode("button",{class:"qy-menu-actions__trigger",type:"button","aria-label":"行操作"},[e.createElementVNode("svg",{class:"qy-menu-actions__trigger-icon",viewBox:"0 0 24 24","aria-hidden":"true"},[e.createElementVNode("path",{fill:"currentColor",d:"M8 17q.425 0 .713-.288T9 16q0-.425-.288-.712T8 15q-.425 0-.712.288T7 16q0 .425.288.713T8 17m0-4q.425 0 .713-.288T9 12q0-.425-.288-.712T8 11q-.425 0-.712.288T7 12q0 .425.288.713T8 13m0-4q.425 0 .713-.288T9 8q0-.425-.288-.712T8 7q-.425 0-.712.288T7 8q0 .425.288.713T8 9m3 8h6v-2h-6zm0-4h6v-2h-6zm0-4h6V7h-6zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5z"})])],-1)])]),default:e.withCtx(()=>[e.createElementVNode("div",w,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,t=>(e.openBlock(),e.createElementBlock("button",{key:t.key,class:e.normalizeClass(["qy-menu-actions__item",[`is-${t.type||"default"}`,{"is-loading":a(t)}]]),disabled:m(t),"data-action-key":t.key,style:e.normalizeStyle({color:k(t,"default")}),type:"button",onClick:c=>_(t,c)},[a(t)?(e.openBlock(),e.createElementBlock("span",C)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],14,T))),128)),s.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",b,e.toDisplayString(r.emptyText),1))])]),_:1},8,["open","width","hide-delay"])):(e.openBlock(),e.createElementBlock("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,t=>(e.openBlock(),e.createElementBlock("button",{key:t.key,class:e.normalizeClass(["qy-menu-actions__item",[`is-${t.type||"primary"}`,{"is-loading":a(t)}]]),disabled:m(t),"data-action-key":t.key,style:e.normalizeStyle({color:k(t,"primary")}),type:"button",onClick:c=>_(t,c)},[a(t)?(e.openBlock(),e.createElementBlock("span",z)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],14,V))),128)),s.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",A,e.toDisplayString(r.emptyText),1))]))],2))}}),N=B._export_sfc(M,[["__scopeId","data-v-44454ac9"]]);exports.MenuActions=N;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineComponent as E, ref as y, computed as k, openBlock as p, createElementBlock as m, normalizeClass as x, createElementVNode as v, withModifiers as i, withKeys as _, toDisplayString as I, createCommentVNode as C } from "vue";
|
|
2
|
+
import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
const K = ["accept", "disabled"], j = ["tabindex", "aria-disabled", "onKeydown"], L = { class: "qy-file-picker__label" }, P = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "qy-file-picker__hint"
|
|
6
|
+
}, R = ["disabled"], O = /* @__PURE__ */ E({
|
|
7
|
+
name: "QyFilePicker",
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { default: null },
|
|
11
|
+
extensions: { default: () => [] },
|
|
12
|
+
maxSizeMb: { default: 20 },
|
|
13
|
+
disabled: { type: Boolean, default: !1 },
|
|
14
|
+
drag: { type: Boolean, default: !0 },
|
|
15
|
+
placeholder: { default: "请选择文件" }
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:modelValue", "change", "clear", "invalid"],
|
|
18
|
+
setup(n, { expose: D, emit: z }) {
|
|
19
|
+
const t = n, o = z, s = y(null), r = y(!1), c = k(
|
|
20
|
+
() => t.extensions.map((e) => e.trim().replace(/^\./, "").toLowerCase()).filter(Boolean)
|
|
21
|
+
), V = k(
|
|
22
|
+
() => c.value.map((e) => `.${e}`).join(",")
|
|
23
|
+
);
|
|
24
|
+
function u() {
|
|
25
|
+
var e;
|
|
26
|
+
t.disabled || (e = s.value) == null || e.click();
|
|
27
|
+
}
|
|
28
|
+
function b() {
|
|
29
|
+
f(), o("update:modelValue", null), o("change", null), o("clear");
|
|
30
|
+
}
|
|
31
|
+
function q() {
|
|
32
|
+
t.disabled || b();
|
|
33
|
+
}
|
|
34
|
+
function w(e) {
|
|
35
|
+
var d;
|
|
36
|
+
const l = (d = e.target.files) == null ? void 0 : d[0];
|
|
37
|
+
if (t.disabled || !l) {
|
|
38
|
+
f();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
h(l);
|
|
42
|
+
}
|
|
43
|
+
function g() {
|
|
44
|
+
!t.disabled && t.drag && (r.value = !0);
|
|
45
|
+
}
|
|
46
|
+
function B() {
|
|
47
|
+
r.value = !1;
|
|
48
|
+
}
|
|
49
|
+
function F(e) {
|
|
50
|
+
var l, d;
|
|
51
|
+
if (r.value = !1, t.disabled || !t.drag) return;
|
|
52
|
+
const a = (d = (l = e.dataTransfer) == null ? void 0 : l.files) == null ? void 0 : d[0];
|
|
53
|
+
a && h(a);
|
|
54
|
+
}
|
|
55
|
+
function h(e) {
|
|
56
|
+
const a = M(e);
|
|
57
|
+
if (f(), a) {
|
|
58
|
+
o("invalid", a);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
o("update:modelValue", e), o("change", e);
|
|
62
|
+
}
|
|
63
|
+
function M(e) {
|
|
64
|
+
return c.value.length > 0 && !c.value.includes(S(e.name)) ? {
|
|
65
|
+
code: "extension",
|
|
66
|
+
file: e,
|
|
67
|
+
message: `文件后缀必须为 ${c.value.map((a) => `.${a}`).join("、")}`
|
|
68
|
+
} : t.maxSizeMb > 0 && e.size > t.maxSizeMb * 1024 * 1024 ? {
|
|
69
|
+
code: "size",
|
|
70
|
+
file: e,
|
|
71
|
+
message: `文件大小不能超过 ${t.maxSizeMb}MB`
|
|
72
|
+
} : null;
|
|
73
|
+
}
|
|
74
|
+
function S(e) {
|
|
75
|
+
const a = e.lastIndexOf(".");
|
|
76
|
+
return a <= 0 || a === e.length - 1 ? "" : e.slice(a + 1).toLowerCase();
|
|
77
|
+
}
|
|
78
|
+
function f() {
|
|
79
|
+
s.value && (s.value.value = "");
|
|
80
|
+
}
|
|
81
|
+
return D({
|
|
82
|
+
openFileDialog: u,
|
|
83
|
+
clear: b
|
|
84
|
+
}), (e, a) => {
|
|
85
|
+
var l;
|
|
86
|
+
return p(), m("div", {
|
|
87
|
+
class: x(["qy-file-picker", { "is-disabled": n.disabled, "is-dragover": r.value }])
|
|
88
|
+
}, [
|
|
89
|
+
v("input", {
|
|
90
|
+
ref_key: "inputRef",
|
|
91
|
+
ref: s,
|
|
92
|
+
class: "qy-file-picker__input",
|
|
93
|
+
type: "file",
|
|
94
|
+
accept: V.value,
|
|
95
|
+
disabled: n.disabled,
|
|
96
|
+
onChange: w
|
|
97
|
+
}, null, 40, K),
|
|
98
|
+
v("div", {
|
|
99
|
+
class: x(["qy-file-picker__dropzone", { "is-click-only": !n.drag }]),
|
|
100
|
+
role: "button",
|
|
101
|
+
tabindex: n.disabled ? -1 : 0,
|
|
102
|
+
"aria-disabled": n.disabled ? "true" : void 0,
|
|
103
|
+
onClick: u,
|
|
104
|
+
onKeydown: [
|
|
105
|
+
_(i(u, ["prevent"]), ["enter"]),
|
|
106
|
+
_(i(u, ["prevent"]), ["space"])
|
|
107
|
+
],
|
|
108
|
+
onDragenter: i(g, ["prevent"]),
|
|
109
|
+
onDragover: i(g, ["prevent"]),
|
|
110
|
+
onDragleave: i(B, ["prevent"]),
|
|
111
|
+
onDrop: i(F, ["prevent"])
|
|
112
|
+
}, [
|
|
113
|
+
v("span", L, I(((l = n.modelValue) == null ? void 0 : l.name) || n.placeholder), 1),
|
|
114
|
+
n.drag ? (p(), m("span", P, " 点击选择或拖拽单个文件到此处 ")) : C("", !0)
|
|
115
|
+
], 42, j),
|
|
116
|
+
n.modelValue ? (p(), m("button", {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "qy-file-picker__clear",
|
|
119
|
+
type: "button",
|
|
120
|
+
disabled: n.disabled,
|
|
121
|
+
onClick: i(q, ["stop"])
|
|
122
|
+
}, " 清空 ", 8, R)) : C("", !0)
|
|
123
|
+
], 2);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}), A = /* @__PURE__ */ $(O, [["__scopeId", "data-v-dd254c99"]]);
|
|
127
|
+
export {
|
|
128
|
+
A as F
|
|
129
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as s, useAttrs as r, computed as m, openBlock as f, createBlock as v, unref as b, mergeProps as h } from "vue";
|
|
2
|
+
import { ElSwitch as x } from "element-plus";
|
|
3
|
+
import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const V = /* @__PURE__ */ s({
|
|
5
|
+
name: "QySwitch",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { type: [Boolean, String, Number], default: !1 },
|
|
10
|
+
activeValue: { type: [Boolean, String, Number], default: !0 },
|
|
11
|
+
inactiveValue: { type: [Boolean, String, Number], default: !1 },
|
|
12
|
+
disabled: { type: Boolean, default: !1 },
|
|
13
|
+
loading: { type: Boolean, default: !1 },
|
|
14
|
+
size: {},
|
|
15
|
+
activeText: { default: "" },
|
|
16
|
+
inactiveText: { default: "" },
|
|
17
|
+
inlinePrompt: { type: Boolean, default: !1 },
|
|
18
|
+
name: { default: "" },
|
|
19
|
+
id: {},
|
|
20
|
+
tabindex: {},
|
|
21
|
+
ariaLabel: {}
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
24
|
+
setup(e, { emit: i }) {
|
|
25
|
+
const t = i, l = r(), n = m(
|
|
26
|
+
() => Object.fromEntries(
|
|
27
|
+
Object.entries(l).filter(
|
|
28
|
+
([a]) => a === "class" || a === "style" || a === "role" || a === "title" || a.startsWith("data-") || a.startsWith("aria-")
|
|
29
|
+
)
|
|
30
|
+
)
|
|
31
|
+
);
|
|
32
|
+
function d(a) {
|
|
33
|
+
t("focus", a);
|
|
34
|
+
}
|
|
35
|
+
function u(a) {
|
|
36
|
+
t("blur", a);
|
|
37
|
+
}
|
|
38
|
+
function o(a) {
|
|
39
|
+
e.disabled || e.loading || t("update:modelValue", a);
|
|
40
|
+
}
|
|
41
|
+
function c(a) {
|
|
42
|
+
e.disabled || e.loading || t("change", a);
|
|
43
|
+
}
|
|
44
|
+
return (a, B) => (f(), v(b(x), h(n.value, {
|
|
45
|
+
class: "qy-switch",
|
|
46
|
+
"model-value": e.modelValue,
|
|
47
|
+
"active-value": e.activeValue,
|
|
48
|
+
"inactive-value": e.inactiveValue,
|
|
49
|
+
disabled: e.disabled,
|
|
50
|
+
loading: e.loading,
|
|
51
|
+
size: e.size,
|
|
52
|
+
"active-text": e.activeText,
|
|
53
|
+
"inactive-text": e.inactiveText,
|
|
54
|
+
"inline-prompt": e.inlinePrompt,
|
|
55
|
+
name: e.name,
|
|
56
|
+
id: e.id,
|
|
57
|
+
tabindex: e.tabindex,
|
|
58
|
+
"aria-label": e.ariaLabel,
|
|
59
|
+
"onUpdate:modelValue": o,
|
|
60
|
+
onChange: c,
|
|
61
|
+
onFocusin: d,
|
|
62
|
+
onFocusout: u
|
|
63
|
+
}), null, 16, ["model-value", "active-value", "inactive-value", "disabled", "loading", "size", "active-text", "inactive-text", "inline-prompt", "name", "id", "tabindex", "aria-label"]));
|
|
64
|
+
}
|
|
65
|
+
}), z = /* @__PURE__ */ g(V, [["__scopeId", "data-v-35d68835"]]);
|
|
66
|
+
export {
|
|
67
|
+
z as S
|
|
68
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as u, useAttrs as m, computed as l, openBlock as b, createBlock as g, unref as h, mergeProps as y, withCtx as C, renderSlot as v } from "vue";
|
|
2
|
+
import { ElTag as z } from "element-plus";
|
|
3
|
+
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const T = /* @__PURE__ */ u({
|
|
5
|
+
name: "QyTag",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
tone: { default: "neutral" },
|
|
10
|
+
size: { default: "md" },
|
|
11
|
+
effect: { default: "light" },
|
|
12
|
+
closable: { type: Boolean, default: !1 },
|
|
13
|
+
round: { type: Boolean, default: !1 },
|
|
14
|
+
disabled: { type: Boolean, default: !1 }
|
|
15
|
+
},
|
|
16
|
+
emits: ["click", "close"],
|
|
17
|
+
setup(e, { emit: n }) {
|
|
18
|
+
const s = n, o = m(), i = l(() => {
|
|
19
|
+
const t = Object.fromEntries(
|
|
20
|
+
Object.entries(o).filter(
|
|
21
|
+
([a]) => a === "class" || a === "style" || a === "title" || a === "role" || a.startsWith("data-") || a.startsWith("aria-")
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
return e.disabled && (t["aria-disabled"] = "true"), t;
|
|
25
|
+
}), c = l(() => e.tone === "neutral" ? "info" : e.tone), d = l(() => ({ sm: "small", md: "default", lg: "large" })[e.size]);
|
|
26
|
+
function f(t) {
|
|
27
|
+
e.disabled || s("click", t);
|
|
28
|
+
}
|
|
29
|
+
function r(t) {
|
|
30
|
+
e.disabled || s("close", t);
|
|
31
|
+
}
|
|
32
|
+
return (t, a) => (b(), g(h(z), y(i.value, {
|
|
33
|
+
class: ["qy-tag", [
|
|
34
|
+
`qy-tag--${e.tone}`,
|
|
35
|
+
{ "qy-tag--disabled": e.disabled }
|
|
36
|
+
]],
|
|
37
|
+
type: c.value,
|
|
38
|
+
size: d.value,
|
|
39
|
+
effect: e.effect,
|
|
40
|
+
closable: e.closable && !e.disabled,
|
|
41
|
+
round: e.round,
|
|
42
|
+
onClick: f,
|
|
43
|
+
onClose: r
|
|
44
|
+
}), {
|
|
45
|
+
default: C(() => [
|
|
46
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 16, ["class", "type", "size", "effect", "closable", "round"]));
|
|
50
|
+
}
|
|
51
|
+
}), j = /* @__PURE__ */ B(T, [["__scopeId", "data-v-0c5d7c85"]]);
|
|
52
|
+
export {
|
|
53
|
+
j as T
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),r=require("element-plus"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=a.defineComponent({name:"QySwitch",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[Boolean,String,Number],default:!1},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{},activeText:{default:""},inactiveText:{default:""},inlinePrompt:{type:Boolean,default:!1},name:{default:""},id:{},tabindex:{},ariaLabel:{}},emits:["update:modelValue","change","focus","blur"],setup(e,{emit:l}){const i=l,n=a.useAttrs(),u=a.computed(()=>Object.fromEntries(Object.entries(n).filter(([t])=>t==="class"||t==="style"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"))));function d(t){i("focus",t)}function c(t){i("blur",t)}function o(t){e.disabled||e.loading||i("update:modelValue",t)}function s(t){e.disabled||e.loading||i("change",t)}return(t,b)=>(a.openBlock(),a.createBlock(a.unref(r.ElSwitch),a.mergeProps(u.value,{class:"qy-switch","model-value":e.modelValue,"active-value":e.activeValue,"inactive-value":e.inactiveValue,disabled:e.disabled,loading:e.loading,size:e.size,"active-text":e.activeText,"inactive-text":e.inactiveText,"inline-prompt":e.inlinePrompt,name:e.name,id:e.id,tabindex:e.tabindex,"aria-label":e.ariaLabel,"onUpdate:modelValue":o,onChange:s,onFocusin:d,onFocusout:c}),null,16,["model-value","active-value","inactive-value","disabled","loading","size","active-text","inactive-text","inline-prompt","name","id","tabindex","aria-label"]))}}),v=f._export_sfc(m,[["__scopeId","data-v-35d68835"]]);exports.Switch=v;
|
|
@@ -29,16 +29,16 @@ const U = { class: "qy-image__state qy-image__state--error" }, A = { class: "qy-
|
|
|
29
29
|
})), S = a(() => ({
|
|
30
30
|
width: h(v.value.width),
|
|
31
31
|
height: h(v.value.height)
|
|
32
|
-
})),
|
|
32
|
+
})), b = a(() => e.placeholder || l.value), y = a(() => e.preview && !!f.value), k = a(() => (e.previewList.length ? e.previewList : [e.src]).map((r) => I(r)).filter(Boolean));
|
|
33
33
|
P(
|
|
34
34
|
() => [e.src, e.compressor],
|
|
35
|
-
|
|
35
|
+
B,
|
|
36
36
|
{
|
|
37
37
|
immediate: !0,
|
|
38
38
|
deep: !0
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
async function
|
|
41
|
+
async function B() {
|
|
42
42
|
const t = ++m;
|
|
43
43
|
if (o.value = "", l.value = !1, !!e.src)
|
|
44
44
|
try {
|
|
@@ -52,7 +52,7 @@ const U = { class: "qy-image__state qy-image__state--error" }, A = { class: "qy-
|
|
|
52
52
|
l.value = !1, o.value = f.value;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function E(t) {
|
|
56
56
|
s("load", t);
|
|
57
57
|
}
|
|
58
58
|
function x(t) {
|
|
@@ -60,7 +60,7 @@ const U = { class: "qy-image__state qy-image__state--error" }, A = { class: "qy-
|
|
|
60
60
|
}
|
|
61
61
|
function C() {
|
|
62
62
|
y.value && (O({
|
|
63
|
-
urlList:
|
|
63
|
+
urlList: k.value,
|
|
64
64
|
initialIndex: e.initialIndex
|
|
65
65
|
}), s("preview", f.value));
|
|
66
66
|
}
|
|
@@ -78,7 +78,7 @@ const U = { class: "qy-image__state qy-image__state--error" }, A = { class: "qy-
|
|
|
78
78
|
src: o.value,
|
|
79
79
|
fit: d.fit,
|
|
80
80
|
lazy: d.lazy,
|
|
81
|
-
onLoad:
|
|
81
|
+
onLoad: E,
|
|
82
82
|
onError: x
|
|
83
83
|
}, {
|
|
84
84
|
placeholder: n(() => [
|
|
@@ -101,7 +101,7 @@ const U = { class: "qy-image__state qy-image__state--error" }, A = { class: "qy-
|
|
|
101
101
|
], !0)
|
|
102
102
|
]),
|
|
103
103
|
_: 3
|
|
104
|
-
}, 8, ["src", "fit", "lazy"])) :
|
|
104
|
+
}, 8, ["src", "fit", "lazy"])) : b.value ? p(t.$slots, "empty", {}, () => [
|
|
105
105
|
c("div", A, [
|
|
106
106
|
u(i(w), { size: 20 }, {
|
|
107
107
|
default: n(() => [
|
|
@@ -113,7 +113,7 @@ const U = { class: "qy-image__state qy-image__state--error" }, A = { class: "qy-
|
|
|
113
113
|
], !0, 1) : j("", !0)
|
|
114
114
|
], 6));
|
|
115
115
|
}
|
|
116
|
-
}), W = /* @__PURE__ */ R(G, [["__scopeId", "data-v-
|
|
116
|
+
}), W = /* @__PURE__ */ R(G, [["__scopeId", "data-v-c58a417b"]]);
|
|
117
117
|
export {
|
|
118
118
|
W as I
|
|
119
119
|
};
|