@qynpm/ui 1.0.21 → 1.0.23
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 +451 -352
- package/dist/index.cjs +8 -2
- package/dist/index.mjs +36 -27
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-autocomplete/index.cjs +1 -1
- package/dist/qy-autocomplete/index.mjs +4 -2
- package/dist/qy-button/index.cjs +2 -0
- package/dist/qy-button/index.mjs +5 -0
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +4 -2
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +4 -2
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +2 -2
- package/dist/qy-dropdown/index.cjs +2 -0
- package/dist/qy-dropdown/index.mjs +5 -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 +3 -1
- package/dist/qy-image-preview/index.cjs +1 -1
- package/dist/qy-image-preview/index.mjs +6 -3
- 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 -1
- package/dist/qy-input/index.mjs +2 -1
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +4 -2
- 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 +2 -2
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +4 -2
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +2 -2
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +2 -2
- package/dist/qy-tree-select/index.cjs +1 -1
- package/dist/qy-tree-select/index.mjs +4 -2
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/shared/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/shared/index-B3U7dqMt.cjs +1 -0
- package/dist/shared/index-BO5aWk3f.cjs +1 -0
- package/dist/shared/index-BXlQSIWX.mjs +119 -0
- package/dist/shared/index-BbpD7hM0.cjs +1 -0
- package/dist/shared/index-CRZsiNVW.cjs +1 -0
- package/dist/shared/index-CSxCewXP.mjs +127 -0
- package/dist/shared/index-CagHZ25z.mjs +162 -0
- package/dist/shared/index-D3l7tLgw.cjs +1 -0
- package/dist/shared/{index-BWIOoRpy.mjs → index-D7lMppIb.mjs} +1 -1
- package/dist/shared/index-DyK6vf5h.cjs +1 -0
- package/dist/shared/{index-B4JNbDHG.mjs → index-NCpeoBUZ.mjs} +1 -1
- package/dist/shared/index-ZLoAI88M.mjs +3418 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-5gku7Zwv.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BJakDlgd.mjs +70 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-C-Pf9TJ0.mjs +152 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CelW13DE.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DA1Nh7U1.mjs +130 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DEpXmMj5.mjs +162 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DNEVwqm7.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DWS8bsiP.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DfKTEci_.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DoL8xnpo.mjs +48 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs +94 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-gTkP1LWg.mjs +61 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-svvSFv2K.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +152 -0
- package/dist/shared/install-CxBnxbuN.mjs +8 -0
- package/dist/shared/install-c8il9DQv.cjs +1 -0
- package/dist/shared/utils-D2KAQCCB.cjs +1 -0
- package/dist/shared/utils-DUntDntI.mjs +112 -0
- package/index.d.ts +45 -41
- package/package.json +41 -26
- package/qy-button/index.d.ts +34 -0
- package/qy-dropdown/index.d.ts +40 -0
- package/dist/shared/index-B7ZgDgHR.cjs +0 -1
- package/dist/shared/index-COjhEDRy.cjs +0 -1
- package/dist/shared/index-CQPIT5by.cjs +0 -1
- package/dist/shared/index-D6KfrXN6.mjs +0 -4429
- package/dist/shared/install-DMq9RQ-h.mjs +0 -15
- package/dist/shared/install-DNgKRKb2.cjs +0 -1
- package/qy-action-bar/index.js +0 -1
- package/qy-autocomplete/index.js +0 -1
- package/qy-checkbox/index.js +0 -1
- package/qy-date-picker/index.js +0 -1
- package/qy-dialog/index.js +0 -1
- package/qy-form-section/index.js +0 -1
- package/qy-image/index.js +0 -1
- package/qy-image-preview/index.js +0 -1
- package/qy-image-upload/index.js +0 -1
- package/qy-input/index.js +0 -1
- package/qy-input-number/index.js +0 -1
- package/qy-legacy-selection-dialog/index.js +0 -1
- package/qy-menu-actions/index.js +0 -7
- package/qy-money-input/index.js +0 -1
- package/qy-radio-group/index.js +0 -1
- package/qy-record-quote-search/index.js +0 -1
- package/qy-remark-image/index.js +0 -1
- package/qy-remote-select/index.js +0 -1
- package/qy-search-input/index.js +0 -1
- package/qy-select/index.js +0 -1
- package/qy-selection-dialog/index.js +0 -1
- package/qy-table-column-settings/index.js +0 -10
- package/qy-tree-select/index.js +0 -1
- package/qy-upload/index.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),c=require("element-plus"),s=require("./utils-D2KAQCCB.cjs"),m=e.defineComponent({name:"QyImagePreview",__name:"index",props:{open:{type:Boolean,default:!1},urlList:{default:()=>[]},initialIndex:{default:0},hideOnClickModal:{type:Boolean,default:!0}},emits:["update:open","close"],setup(n,{emit:a}){const l=n,i=a;let r="";const u=e.computed(()=>l.urlList.map(o=>s.normalizeImageSrc(o)).filter(Boolean));e.watch(()=>l.open,o=>{if(o){r=document.body.style.overflow,document.body.style.overflow="hidden";return}t()}),e.onBeforeUnmount(t);function d(){t(),i("update:open",!1),i("close")}function t(){typeof document>"u"||(document.body.style.overflow=r)}return(o,f)=>n.open&&u.value.length?(e.openBlock(),e.createBlock(e.unref(c.ElImageViewer),{key:0,"url-list":u.value,"initial-index":n.initialIndex,"hide-on-click-modal":n.hideOnClickModal,teleport:"body",onClose:d},null,8,["url-list","initial-index","hide-on-click-modal"])):e.createCommentVNode("",!0)}});exports._sfc_main=m;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as h, useAttrs as b, ref as v, openBlock as y, createBlock as x, unref as a, mergeProps as B } from "vue";
|
|
2
|
+
import { ElInputNumber as V } from "element-plus";
|
|
3
|
+
const N = /* @__PURE__ */ h({
|
|
4
|
+
name: "QyInputNumber",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { default: void 0 },
|
|
9
|
+
min: { default: void 0 },
|
|
10
|
+
max: { default: void 0 },
|
|
11
|
+
step: { default: 1 },
|
|
12
|
+
stepStrictly: { type: Boolean, default: !1 },
|
|
13
|
+
precision: { default: void 0 },
|
|
14
|
+
controls: { type: Boolean, default: !0 },
|
|
15
|
+
controlsPosition: { default: "" },
|
|
16
|
+
placeholder: { default: "请输入数字" },
|
|
17
|
+
disabled: { type: Boolean, default: !1 },
|
|
18
|
+
size: { default: void 0 }
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
21
|
+
setup(t, { expose: u, emit: i }) {
|
|
22
|
+
const o = i, s = b(), n = v(null);
|
|
23
|
+
function d(e) {
|
|
24
|
+
o("update:modelValue", e);
|
|
25
|
+
}
|
|
26
|
+
function c(e, l) {
|
|
27
|
+
o("change", e, l);
|
|
28
|
+
}
|
|
29
|
+
function r(e) {
|
|
30
|
+
o("focus", e);
|
|
31
|
+
}
|
|
32
|
+
function f(e) {
|
|
33
|
+
o("blur", e);
|
|
34
|
+
}
|
|
35
|
+
function m() {
|
|
36
|
+
var e, l;
|
|
37
|
+
(l = (e = n.value) == null ? void 0 : e.focus) == null || l.call(e);
|
|
38
|
+
}
|
|
39
|
+
function p() {
|
|
40
|
+
var e, l;
|
|
41
|
+
(l = (e = n.value) == null ? void 0 : e.blur) == null || l.call(e);
|
|
42
|
+
}
|
|
43
|
+
return u({
|
|
44
|
+
focus: m,
|
|
45
|
+
blur: p
|
|
46
|
+
}), (e, l) => (y(), x(a(V), B({
|
|
47
|
+
ref_key: "inputNumberRef",
|
|
48
|
+
ref: n
|
|
49
|
+
}, a(s), {
|
|
50
|
+
"model-value": t.modelValue,
|
|
51
|
+
min: t.min,
|
|
52
|
+
max: t.max,
|
|
53
|
+
step: t.step,
|
|
54
|
+
"step-strictly": t.stepStrictly,
|
|
55
|
+
precision: t.precision,
|
|
56
|
+
controls: t.controls,
|
|
57
|
+
"controls-position": t.controlsPosition,
|
|
58
|
+
placeholder: t.placeholder,
|
|
59
|
+
disabled: t.disabled,
|
|
60
|
+
size: t.size,
|
|
61
|
+
"onUpdate:modelValue": d,
|
|
62
|
+
onChange: c,
|
|
63
|
+
onFocus: r,
|
|
64
|
+
onBlur: f
|
|
65
|
+
}), null, 16, ["model-value", "min", "max", "step", "step-strictly", "precision", "controls", "controls-position", "placeholder", "disabled", "size"]));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
N as _
|
|
70
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { defineComponent as V, useAttrs as $, ref as z, computed as f, openBlock as P, createBlock as E, unref as o, mergeProps as w, createSlots as R, withCtx as s, renderSlot as u, normalizeProps as i, guardReactiveProps as p } from "vue";
|
|
2
|
+
import { ElTreeSelect as F } from "element-plus";
|
|
3
|
+
const O = /* @__PURE__ */ V({
|
|
4
|
+
name: "QyTreeSelect",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { type: [String, Number, Boolean, Array, null], default: void 0 },
|
|
9
|
+
options: { default: () => [] },
|
|
10
|
+
data: { default: void 0 },
|
|
11
|
+
labelKey: { default: "label" },
|
|
12
|
+
valueKey: { default: "value" },
|
|
13
|
+
childrenKey: { default: "children" },
|
|
14
|
+
disabledKey: { default: "disabled" },
|
|
15
|
+
props: { default: () => ({}) },
|
|
16
|
+
placeholder: { default: "请选择" },
|
|
17
|
+
disabled: { type: Boolean, default: !1 },
|
|
18
|
+
clearable: { type: Boolean, default: !1 },
|
|
19
|
+
filterable: { type: Boolean, default: !1 },
|
|
20
|
+
multiple: { type: Boolean, default: !1 },
|
|
21
|
+
collapseTags: { type: Boolean, default: !1 },
|
|
22
|
+
collapseTagsTooltip: { type: Boolean, default: !1 },
|
|
23
|
+
checkStrictly: { type: Boolean, default: !1 },
|
|
24
|
+
defaultExpandAll: { type: Boolean, default: !1 },
|
|
25
|
+
renderAfterExpand: { type: Boolean, default: !0 },
|
|
26
|
+
size: { default: void 0 },
|
|
27
|
+
teleported: { type: Boolean, default: !0 },
|
|
28
|
+
appendTo: { default: void 0 },
|
|
29
|
+
fitInputWidth: { type: Boolean, default: !1 },
|
|
30
|
+
popperClass: { default: "" }
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur"],
|
|
33
|
+
setup(a, { expose: m, emit: h }) {
|
|
34
|
+
const t = a, r = h, y = $(), n = z(null), b = f(
|
|
35
|
+
() => ["qy-tree-select__popper", t.popperClass].filter(Boolean).join(" ")
|
|
36
|
+
), v = f(() => ({
|
|
37
|
+
label: "label",
|
|
38
|
+
value: "value",
|
|
39
|
+
children: "children",
|
|
40
|
+
disabled: "disabled",
|
|
41
|
+
...t.props
|
|
42
|
+
})), g = f(
|
|
43
|
+
() => {
|
|
44
|
+
var e;
|
|
45
|
+
return c((e = t.options) != null && e.length ? t.options : t.data || []);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
function c(e) {
|
|
49
|
+
return e.map((l) => {
|
|
50
|
+
const d = l == null ? void 0 : l[t.childrenKey];
|
|
51
|
+
return {
|
|
52
|
+
...l,
|
|
53
|
+
label: (l == null ? void 0 : l[t.labelKey]) ?? (l == null ? void 0 : l.label) ?? (l == null ? void 0 : l.value) ?? "",
|
|
54
|
+
value: (l == null ? void 0 : l[t.valueKey]) ?? (l == null ? void 0 : l.value) ?? (l == null ? void 0 : l.label),
|
|
55
|
+
disabled: !!(l != null && l[t.disabledKey]),
|
|
56
|
+
children: Array.isArray(d) ? c(d) : d
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function B(e) {
|
|
61
|
+
r("update:modelValue", e);
|
|
62
|
+
}
|
|
63
|
+
function k(e) {
|
|
64
|
+
r("change", e);
|
|
65
|
+
}
|
|
66
|
+
function C() {
|
|
67
|
+
r("clear");
|
|
68
|
+
}
|
|
69
|
+
function T(e) {
|
|
70
|
+
r("visible-change", e);
|
|
71
|
+
}
|
|
72
|
+
function A(e) {
|
|
73
|
+
r("focus", e);
|
|
74
|
+
}
|
|
75
|
+
function S(e) {
|
|
76
|
+
r("blur", e);
|
|
77
|
+
}
|
|
78
|
+
function x() {
|
|
79
|
+
var e, l;
|
|
80
|
+
(l = (e = n.value) == null ? void 0 : e.focus) == null || l.call(e);
|
|
81
|
+
}
|
|
82
|
+
function K() {
|
|
83
|
+
var e, l;
|
|
84
|
+
(l = (e = n.value) == null ? void 0 : e.blur) == null || l.call(e);
|
|
85
|
+
}
|
|
86
|
+
return m({
|
|
87
|
+
// 暴露最常用的焦点控制;复杂树选择能力仍通过 attrs 透传给 Element Plus。
|
|
88
|
+
focus: x,
|
|
89
|
+
blur: K
|
|
90
|
+
}), (e, l) => (P(), E(o(F), w({
|
|
91
|
+
ref_key: "treeSelectRef",
|
|
92
|
+
ref: n
|
|
93
|
+
}, o(y), {
|
|
94
|
+
"model-value": a.modelValue,
|
|
95
|
+
data: g.value,
|
|
96
|
+
props: v.value,
|
|
97
|
+
placeholder: a.placeholder,
|
|
98
|
+
disabled: a.disabled,
|
|
99
|
+
clearable: a.clearable,
|
|
100
|
+
filterable: a.filterable,
|
|
101
|
+
multiple: a.multiple,
|
|
102
|
+
"collapse-tags": a.collapseTags,
|
|
103
|
+
"collapse-tags-tooltip": a.collapseTagsTooltip,
|
|
104
|
+
"check-strictly": a.checkStrictly,
|
|
105
|
+
"default-expand-all": a.defaultExpandAll,
|
|
106
|
+
"render-after-expand": a.renderAfterExpand,
|
|
107
|
+
size: a.size,
|
|
108
|
+
teleported: a.teleported,
|
|
109
|
+
"append-to": a.appendTo,
|
|
110
|
+
"fit-input-width": a.fitInputWidth,
|
|
111
|
+
"popper-class": b.value,
|
|
112
|
+
"onUpdate:modelValue": B,
|
|
113
|
+
onChange: k,
|
|
114
|
+
onClear: C,
|
|
115
|
+
onVisibleChange: T,
|
|
116
|
+
onFocus: A,
|
|
117
|
+
onBlur: S
|
|
118
|
+
}), R({ _: 2 }, [
|
|
119
|
+
e.$slots.prefix ? {
|
|
120
|
+
name: "prefix",
|
|
121
|
+
fn: s(() => [
|
|
122
|
+
u(e.$slots, "prefix")
|
|
123
|
+
]),
|
|
124
|
+
key: "0"
|
|
125
|
+
} : void 0,
|
|
126
|
+
e.$slots.empty ? {
|
|
127
|
+
name: "empty",
|
|
128
|
+
fn: s(() => [
|
|
129
|
+
u(e.$slots, "empty")
|
|
130
|
+
]),
|
|
131
|
+
key: "1"
|
|
132
|
+
} : void 0,
|
|
133
|
+
e.$slots.tag ? {
|
|
134
|
+
name: "tag",
|
|
135
|
+
fn: s((d) => [
|
|
136
|
+
u(e.$slots, "tag", i(p(d)))
|
|
137
|
+
]),
|
|
138
|
+
key: "2"
|
|
139
|
+
} : void 0,
|
|
140
|
+
e.$slots.default ? {
|
|
141
|
+
name: "default",
|
|
142
|
+
fn: s((d) => [
|
|
143
|
+
u(e.$slots, "default", i(p(d)))
|
|
144
|
+
]),
|
|
145
|
+
key: "3"
|
|
146
|
+
} : void 0
|
|
147
|
+
]), 1040, ["model-value", "data", "props", "placeholder", "disabled", "clearable", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "check-strictly", "default-expand-all", "render-after-expand", "size", "teleported", "append-to", "fit-input-width", "popper-class"]));
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
export {
|
|
151
|
+
O as _
|
|
152
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),z=require("element-plus"),S=a.defineComponent({name:"QyAutocomplete",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},options:{default:()=>[]},valueKey:{default:"value"},labelKey:{default:"label"},placeholder:{default:"请输入"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},popperClass:{default:""},filterMethod:{type:Function,default:void 0}},emits:["update:modelValue","input","change","select","focus","blur","clear"],setup(u,{expose:s,emit:f}){const r=u,n=f,i=a.useAttrs(),c=a.ref(null),p=a.computed(()=>["qy-autocomplete__popper",r.popperClass].filter(Boolean).join(" ")),m=a.computed(()=>{const e=a.unref(r.options);return(Array.isArray(e)?e:a.unref(e==null?void 0:e.value)||[]).map(l=>({...l,value:(l==null?void 0:l[r.valueKey])??(l==null?void 0:l.value)??(l==null?void 0:l[r.labelKey])??(l==null?void 0:l.label)??""}))});function d(e,t){const l=String(e??""),q=m.value.filter(o=>r.filterMethod?r.filterMethod(l,o):l?String(o.value??"").includes(l):!0);t(q)}function h(e){n("update:modelValue",e)}function b(e){n("input",e)}function v(e){n("change",e)}function y(e){n("select",e)}function g(e){n("focus",e)}function B(e){n("blur",e)}function C(){n("clear")}function A(){var e,t;(t=(e=c.value)==null?void 0:e.focus)==null||t.call(e)}function V(){var e,t;(t=(e=c.value)==null?void 0:e.blur)==null||t.call(e)}return s({querySearch:d,focus:A,blur:V}),(e,t)=>(a.openBlock(),a.createBlock(a.unref(z.ElAutocomplete),a.mergeProps({ref_key:"autocompleteRef",ref:c},a.unref(i),{"model-value":u.modelValue,"fetch-suggestions":d,placeholder:u.placeholder,disabled:u.disabled,clearable:u.clearable,size:u.size,teleported:u.teleported,"append-to":u.appendTo,"popper-class":p.value,"onUpdate:modelValue":h,onInput:b,onChange:v,onSelect:y,onFocus:g,onBlur:B,onClear:C}),null,16,["model-value","placeholder","disabled","clearable","size","teleported","append-to","popper-class"]))}});exports._sfc_main=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("vue"),h=require("element-plus"),b=n.defineComponent({name:"QyInputNumber",inheritAttrs:!1,__name:"index",props:{modelValue:{default:void 0},min:{default:void 0},max:{default:void 0},step:{default:1},stepStrictly:{type:Boolean,default:!1},precision:{default:void 0},controls:{type:Boolean,default:!0},controlsPosition:{default:""},placeholder:{default:"请输入数字"},disabled:{type:Boolean,default:!1},size:{default:void 0}},emits:["update:modelValue","change","focus","blur"],setup(t,{expose:a,emit:i}){const o=i,s=n.useAttrs(),u=n.ref(null);function c(e){o("update:modelValue",e)}function d(e,l){o("change",e,l)}function r(e){o("focus",e)}function f(e){o("blur",e)}function m(){var e,l;(l=(e=u.value)==null?void 0:e.focus)==null||l.call(e)}function p(){var e,l;(l=(e=u.value)==null?void 0:e.blur)==null||l.call(e)}return a({focus:m,blur:p}),(e,l)=>(n.openBlock(),n.createBlock(n.unref(h.ElInputNumber),n.mergeProps({ref_key:"inputNumberRef",ref:u},n.unref(s),{"model-value":t.modelValue,min:t.min,max:t.max,step:t.step,"step-strictly":t.stepStrictly,precision:t.precision,controls:t.controls,"controls-position":t.controlsPosition,placeholder:t.placeholder,disabled:t.disabled,size:t.size,"onUpdate:modelValue":c,onChange:d,onFocus:r,onBlur:f}),null,16,["model-value","min","max","step","step-strictly","precision","controls","controls-position","placeholder","disabled","size"]))}});exports._sfc_main=b;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { defineComponent as x, useAttrs as R, ref as $, computed as E, openBlock as F, createBlock as A, unref as u, mergeProps as S } from "vue";
|
|
2
|
+
import { ElDatePicker as H } from "element-plus";
|
|
3
|
+
const U = /* @__PURE__ */ x({
|
|
4
|
+
name: "QyDatePicker",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { default: void 0 },
|
|
9
|
+
type: { default: "date" },
|
|
10
|
+
placeholder: { default: "请选择日期" },
|
|
11
|
+
startPlaceholder: { default: "开始时间" },
|
|
12
|
+
endPlaceholder: { default: "结束时间" },
|
|
13
|
+
rangeSeparator: { default: "-" },
|
|
14
|
+
format: { default: void 0 },
|
|
15
|
+
valueFormat: { default: void 0 },
|
|
16
|
+
defaultTime: { default: void 0 },
|
|
17
|
+
disabledDate: { type: Function, default: void 0 },
|
|
18
|
+
shortcuts: { default: void 0 },
|
|
19
|
+
clearable: { type: Boolean, default: !0 },
|
|
20
|
+
disabled: { type: Boolean, default: !1 },
|
|
21
|
+
size: { default: void 0 },
|
|
22
|
+
teleported: { type: Boolean, default: !0 },
|
|
23
|
+
appendTo: { default: "body" },
|
|
24
|
+
popperClass: { default: "" },
|
|
25
|
+
normalizeRangeEndTime: { type: Boolean, default: !1 }
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:modelValue", "change", "clear", "calendar-change", "panel-change", "visible-change", "focus", "blur"],
|
|
28
|
+
setup(t, { expose: i, emit: c }) {
|
|
29
|
+
const d = t, l = c, f = R(), o = $(null), s = E(
|
|
30
|
+
() => ["qy-date-picker__popper", d.popperClass].filter(Boolean).join(" ")
|
|
31
|
+
);
|
|
32
|
+
function h(e) {
|
|
33
|
+
return Array.isArray(e);
|
|
34
|
+
}
|
|
35
|
+
function p(e) {
|
|
36
|
+
const a = new Date(e);
|
|
37
|
+
return a.getHours() === 0 && a.getMinutes() === 0 && a.getSeconds() === 0 && a.setHours(23, 59, 59, 0), a;
|
|
38
|
+
}
|
|
39
|
+
function m(e) {
|
|
40
|
+
return /\s00:00:00$/.test(e) ? e.replace(/\s00:00:00$/, " 23:59:59") : /T00:00:00(?:\.000)?(?:Z|[+-]\d{2}:?\d{2})?$/.test(e) ? e.replace(
|
|
41
|
+
/T00:00:00(\.000)?(Z|[+-]\d{2}:?\d{2})?$/,
|
|
42
|
+
"T23:59:59$1$2"
|
|
43
|
+
) : e;
|
|
44
|
+
}
|
|
45
|
+
function r(e) {
|
|
46
|
+
if (!d.normalizeRangeEndTime || !h(e) || e.length < 2)
|
|
47
|
+
return e;
|
|
48
|
+
const a = [...e], n = a[1];
|
|
49
|
+
return n instanceof Date ? a[1] = p(n) : typeof n == "string" && (a[1] = m(n)), a;
|
|
50
|
+
}
|
|
51
|
+
function g(e) {
|
|
52
|
+
l("update:modelValue", r(e));
|
|
53
|
+
}
|
|
54
|
+
function b(e) {
|
|
55
|
+
l("change", r(e));
|
|
56
|
+
}
|
|
57
|
+
function C() {
|
|
58
|
+
l("clear");
|
|
59
|
+
}
|
|
60
|
+
function y(e) {
|
|
61
|
+
l("calendar-change", e);
|
|
62
|
+
}
|
|
63
|
+
function v(e, a, n) {
|
|
64
|
+
l("panel-change", e, a, n);
|
|
65
|
+
}
|
|
66
|
+
function V(e) {
|
|
67
|
+
l("visible-change", e);
|
|
68
|
+
}
|
|
69
|
+
function P(e) {
|
|
70
|
+
l("focus", e);
|
|
71
|
+
}
|
|
72
|
+
function z(e) {
|
|
73
|
+
l("blur", e);
|
|
74
|
+
}
|
|
75
|
+
function B() {
|
|
76
|
+
var e, a;
|
|
77
|
+
(a = (e = o.value) == null ? void 0 : e.focus) == null || a.call(e);
|
|
78
|
+
}
|
|
79
|
+
function T() {
|
|
80
|
+
var e, a;
|
|
81
|
+
(a = (e = o.value) == null ? void 0 : e.blur) == null || a.call(e);
|
|
82
|
+
}
|
|
83
|
+
function k() {
|
|
84
|
+
var e, a;
|
|
85
|
+
(a = (e = o.value) == null ? void 0 : e.handleOpen) == null || a.call(e);
|
|
86
|
+
}
|
|
87
|
+
function D() {
|
|
88
|
+
var e, a;
|
|
89
|
+
(a = (e = o.value) == null ? void 0 : e.handleClose) == null || a.call(e);
|
|
90
|
+
}
|
|
91
|
+
return i({
|
|
92
|
+
focus: B,
|
|
93
|
+
blur: T,
|
|
94
|
+
handleOpen: k,
|
|
95
|
+
handleClose: D
|
|
96
|
+
}), (e, a) => (F(), A(u(H), S({
|
|
97
|
+
ref_key: "datePickerRef",
|
|
98
|
+
ref: o
|
|
99
|
+
}, u(f), {
|
|
100
|
+
"model-value": t.modelValue,
|
|
101
|
+
type: t.type,
|
|
102
|
+
placeholder: t.placeholder,
|
|
103
|
+
"start-placeholder": t.startPlaceholder,
|
|
104
|
+
"end-placeholder": t.endPlaceholder,
|
|
105
|
+
"range-separator": t.rangeSeparator,
|
|
106
|
+
format: t.format,
|
|
107
|
+
"value-format": t.valueFormat,
|
|
108
|
+
"default-time": t.defaultTime,
|
|
109
|
+
"disabled-date": t.disabledDate,
|
|
110
|
+
shortcuts: t.shortcuts,
|
|
111
|
+
clearable: t.clearable,
|
|
112
|
+
disabled: t.disabled,
|
|
113
|
+
size: t.size,
|
|
114
|
+
teleported: t.teleported,
|
|
115
|
+
"append-to": t.appendTo,
|
|
116
|
+
"popper-class": s.value,
|
|
117
|
+
"onUpdate:modelValue": g,
|
|
118
|
+
onChange: b,
|
|
119
|
+
onClear: C,
|
|
120
|
+
onCalendarChange: y,
|
|
121
|
+
onPanelChange: v,
|
|
122
|
+
onVisibleChange: V,
|
|
123
|
+
onFocus: P,
|
|
124
|
+
onBlur: z
|
|
125
|
+
}), null, 16, ["model-value", "type", "placeholder", "start-placeholder", "end-placeholder", "range-separator", "format", "value-format", "default-time", "disabled-date", "shortcuts", "clearable", "disabled", "size", "teleported", "append-to", "popper-class"]));
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
export {
|
|
129
|
+
U as _
|
|
130
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineComponent as E, useAttrs as P, useSlots as F, ref as O, computed as f, Comment as R, watch as I, openBlock as o, createBlock as m, unref as i, mergeProps as U, createSlots as W, withCtx as s, renderSlot as n, createElementBlock as j, Fragment as q, renderList as D, normalizeProps as L, guardReactiveProps as M } from "vue";
|
|
2
|
+
import { ElSelect as N, ElOption as Q } from "element-plus";
|
|
3
|
+
const H = /* @__PURE__ */ E({
|
|
4
|
+
name: "QySelect",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { type: [String, Number, Boolean, Array, null], default: void 0 },
|
|
9
|
+
options: { default: () => [] },
|
|
10
|
+
labelKey: { default: "label" },
|
|
11
|
+
valueKey: { default: "value" },
|
|
12
|
+
disabledKey: { default: "disabled" },
|
|
13
|
+
placeholder: { default: "请选择" },
|
|
14
|
+
disabled: { type: Boolean, default: !1 },
|
|
15
|
+
clearable: { type: Boolean, default: !0 },
|
|
16
|
+
filterable: { type: Boolean, default: !1 },
|
|
17
|
+
multiple: { type: Boolean, default: !1 },
|
|
18
|
+
collapseTags: { type: Boolean, default: !1 },
|
|
19
|
+
collapseTagsTooltip: { type: Boolean, default: !1 },
|
|
20
|
+
autoSelectSingle: { type: Boolean, default: !1 },
|
|
21
|
+
size: { default: void 0 },
|
|
22
|
+
teleported: { type: Boolean, default: !0 },
|
|
23
|
+
appendTo: { default: "body" },
|
|
24
|
+
fitInputWidth: { type: Boolean, default: !0 },
|
|
25
|
+
popperClass: { default: "" }
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur"],
|
|
28
|
+
setup(a, { expose: b, emit: p }) {
|
|
29
|
+
const t = a, d = p, g = P(), y = F(), r = O(null), h = f(
|
|
30
|
+
() => ["qy-select__popper", t.popperClass].filter(Boolean).join(" ")
|
|
31
|
+
), c = f(
|
|
32
|
+
() => (t.options || []).map((e) => ({
|
|
33
|
+
raw: e,
|
|
34
|
+
label: (e == null ? void 0 : e[t.labelKey]) ?? (e == null ? void 0 : e.label) ?? (e == null ? void 0 : e.value) ?? "",
|
|
35
|
+
value: (e == null ? void 0 : e[t.valueKey]) ?? (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.label),
|
|
36
|
+
disabled: !!(e != null && e[t.disabledKey])
|
|
37
|
+
}))
|
|
38
|
+
), v = f(() => {
|
|
39
|
+
const e = y.default;
|
|
40
|
+
return e ? e().some((l) => l.type !== R) : !1;
|
|
41
|
+
});
|
|
42
|
+
function B(e) {
|
|
43
|
+
return Array.isArray(e) ? e.length === 0 : e === "" || e === null || e === void 0;
|
|
44
|
+
}
|
|
45
|
+
I(
|
|
46
|
+
[
|
|
47
|
+
c,
|
|
48
|
+
() => t.modelValue,
|
|
49
|
+
() => t.autoSelectSingle,
|
|
50
|
+
() => t.disabled,
|
|
51
|
+
() => t.multiple
|
|
52
|
+
],
|
|
53
|
+
([e]) => {
|
|
54
|
+
if (!t.autoSelectSingle || t.disabled || !B(t.modelValue) || e.length !== 1) return;
|
|
55
|
+
const [l] = e;
|
|
56
|
+
if (l.disabled) return;
|
|
57
|
+
const u = t.multiple ? [l.value] : l.value;
|
|
58
|
+
d("update:modelValue", u), d("change", u);
|
|
59
|
+
},
|
|
60
|
+
{ immediate: !0 }
|
|
61
|
+
);
|
|
62
|
+
function S(e, l) {
|
|
63
|
+
return `${String(e.value ?? e.label ?? "")}-${l}`;
|
|
64
|
+
}
|
|
65
|
+
function C(e) {
|
|
66
|
+
d("update:modelValue", e);
|
|
67
|
+
}
|
|
68
|
+
function V(e) {
|
|
69
|
+
d("change", e);
|
|
70
|
+
}
|
|
71
|
+
function $() {
|
|
72
|
+
d("clear");
|
|
73
|
+
}
|
|
74
|
+
function k(e) {
|
|
75
|
+
d("visible-change", e);
|
|
76
|
+
}
|
|
77
|
+
function T(e) {
|
|
78
|
+
d("focus", e);
|
|
79
|
+
}
|
|
80
|
+
function K(e) {
|
|
81
|
+
d("blur", e);
|
|
82
|
+
}
|
|
83
|
+
function z() {
|
|
84
|
+
var e, l;
|
|
85
|
+
(l = (e = r.value) == null ? void 0 : e.focus) == null || l.call(e);
|
|
86
|
+
}
|
|
87
|
+
function w() {
|
|
88
|
+
var e, l;
|
|
89
|
+
(l = (e = r.value) == null ? void 0 : e.blur) == null || l.call(e);
|
|
90
|
+
}
|
|
91
|
+
return b({
|
|
92
|
+
// 仅暴露业务常用焦点方法,复杂下拉行为仍交给 Element Plus 自身处理。
|
|
93
|
+
focus: z,
|
|
94
|
+
blur: w
|
|
95
|
+
}), (e, l) => (o(), m(i(N), U({
|
|
96
|
+
ref_key: "selectRef",
|
|
97
|
+
ref: r
|
|
98
|
+
}, i(g), {
|
|
99
|
+
"model-value": a.modelValue,
|
|
100
|
+
placeholder: a.placeholder,
|
|
101
|
+
disabled: a.disabled,
|
|
102
|
+
clearable: a.clearable,
|
|
103
|
+
filterable: a.filterable,
|
|
104
|
+
multiple: a.multiple,
|
|
105
|
+
"collapse-tags": a.collapseTags,
|
|
106
|
+
"collapse-tags-tooltip": a.collapseTagsTooltip,
|
|
107
|
+
size: a.size,
|
|
108
|
+
teleported: a.teleported,
|
|
109
|
+
"fit-input-width": a.fitInputWidth,
|
|
110
|
+
"popper-class": h.value,
|
|
111
|
+
"append-to": a.appendTo,
|
|
112
|
+
"onUpdate:modelValue": C,
|
|
113
|
+
onChange: V,
|
|
114
|
+
onClear: $,
|
|
115
|
+
onVisibleChange: k,
|
|
116
|
+
onFocus: T,
|
|
117
|
+
onBlur: K
|
|
118
|
+
}), W({
|
|
119
|
+
default: s(() => [
|
|
120
|
+
v.value ? n(e.$slots, "default", {}, void 0, void 0, 0) : (o(!0), j(q, { key: 1 }, D(c.value, (u, A) => (o(), m(i(Q), {
|
|
121
|
+
key: S(u, A),
|
|
122
|
+
label: u.label,
|
|
123
|
+
value: u.value,
|
|
124
|
+
disabled: u.disabled
|
|
125
|
+
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
126
|
+
]),
|
|
127
|
+
_: 2
|
|
128
|
+
}, [
|
|
129
|
+
e.$slots.prefix ? {
|
|
130
|
+
name: "prefix",
|
|
131
|
+
fn: s(() => [
|
|
132
|
+
n(e.$slots, "prefix")
|
|
133
|
+
]),
|
|
134
|
+
key: "0"
|
|
135
|
+
} : void 0,
|
|
136
|
+
e.$slots.empty ? {
|
|
137
|
+
name: "empty",
|
|
138
|
+
fn: s(() => [
|
|
139
|
+
n(e.$slots, "empty")
|
|
140
|
+
]),
|
|
141
|
+
key: "1"
|
|
142
|
+
} : void 0,
|
|
143
|
+
e.$slots.loading ? {
|
|
144
|
+
name: "loading",
|
|
145
|
+
fn: s(() => [
|
|
146
|
+
n(e.$slots, "loading")
|
|
147
|
+
]),
|
|
148
|
+
key: "2"
|
|
149
|
+
} : void 0,
|
|
150
|
+
e.$slots.tag ? {
|
|
151
|
+
name: "tag",
|
|
152
|
+
fn: s((u) => [
|
|
153
|
+
n(e.$slots, "tag", L(M(u)))
|
|
154
|
+
]),
|
|
155
|
+
key: "3"
|
|
156
|
+
} : void 0
|
|
157
|
+
]), 1040, ["model-value", "placeholder", "disabled", "clearable", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "size", "teleported", "fit-input-width", "popper-class", "append-to"]));
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export {
|
|
161
|
+
H as _
|
|
162
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("vue"),o=require("element-plus"),T=l.defineComponent({name:"QySelect",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,Array,null],default:void 0},options:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},placeholder:{default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},filterable:{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(t,{expose:i,emit:f}){const u=t,s=f,c=l.useAttrs(),m=l.useSlots(),n=l.ref(null),b=l.computed(()=>["qy-select__popper",u.popperClass].filter(Boolean).join(" ")),r=l.computed(()=>(u.options||[]).map(e=>({raw:e,label:(e==null?void 0:e[u.labelKey])??(e==null?void 0:e.label)??(e==null?void 0:e.value)??"",value:(e==null?void 0:e[u.valueKey])??(e==null?void 0:e.value)??(e==null?void 0:e.label),disabled:!!(e!=null&&e[u.disabledKey])}))),p=l.computed(()=>{const e=m.default;return e?e().some(a=>a.type!==l.Comment):!1});function g(e){return Array.isArray(e)?e.length===0:e===""||e===null||e===void 0}l.watch([r,()=>u.modelValue,()=>u.autoSelectSingle,()=>u.disabled,()=>u.multiple],([e])=>{if(!u.autoSelectSingle||u.disabled||!g(u.modelValue)||e.length!==1)return;const[a]=e;if(a.disabled)return;const d=u.multiple?[a.value]:a.value;s("update:modelValue",d),s("change",d)},{immediate:!0});function y(e,a){return`${String(e.value??e.label??"")}-${a}`}function h(e){s("update:modelValue",e)}function v(e){s("change",e)}function B(){s("clear")}function S(e){s("visible-change",e)}function C(e){s("focus",e)}function k(e){s("blur",e)}function V(){var e,a;(a=(e=n.value)==null?void 0:e.focus)==null||a.call(e)}function $(){var e,a;(a=(e=n.value)==null?void 0:e.blur)==null||a.call(e)}return i({focus:V,blur:$}),(e,a)=>(l.openBlock(),l.createBlock(l.unref(o.ElSelect),l.mergeProps({ref_key:"selectRef",ref:n},l.unref(c),{"model-value":t.modelValue,placeholder:t.placeholder,disabled:t.disabled,clearable:t.clearable,filterable:t.filterable,multiple:t.multiple,"collapse-tags":t.collapseTags,"collapse-tags-tooltip":t.collapseTagsTooltip,size:t.size,teleported:t.teleported,"fit-input-width":t.fitInputWidth,"popper-class":b.value,"append-to":t.appendTo,"onUpdate:modelValue":h,onChange:v,onClear:B,onVisibleChange:S,onFocus:C,onBlur:k}),l.createSlots({default:l.withCtx(()=>[p.value?l.renderSlot(e.$slots,"default",{},void 0,void 0,0):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(r.value,(d,w)=>(l.openBlock(),l.createBlock(l.unref(o.ElOption),{key:y(d,w),label:d.label,value:d.value,disabled:d.disabled},null,8,["label","value","disabled"]))),128))]),_:2},[e.$slots.prefix?{name:"prefix",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.empty?{name:"empty",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"empty")]),key:"1"}:void 0,e.$slots.loading?{name:"loading",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"loading")]),key:"2"}:void 0,e.$slots.tag?{name:"tag",fn:l.withCtx(d=>[l.renderSlot(e.$slots,"tag",l.normalizeProps(l.guardReactiveProps(d)))]),key:"3"}:void 0]),1040,["model-value","placeholder","disabled","clearable","filterable","multiple","collapse-tags","collapse-tags-tooltip","size","teleported","fit-input-width","popper-class","append-to"]))}});exports._sfc_main=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),k=require("element-plus"),T=a.defineComponent({name:"QyTreeSelect",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,Array,null],default:void 0},options:{default:()=>[]},data:{default:void 0},labelKey:{default:"label"},valueKey:{default:"value"},childrenKey:{default:"children"},disabledKey:{default:"disabled"},props:{default:()=>({})},placeholder:{default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},collapseTags:{type:Boolean,default:!1},collapseTagsTooltip:{type:Boolean,default:!1},checkStrictly:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!1},renderAfterExpand:{type:Boolean,default:!0},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:void 0},fitInputWidth:{type:Boolean,default:!1},popperClass:{default:""}},emits:["update:modelValue","change","clear","visible-change","focus","blur"],setup(t,{expose:f,emit:c}){const d=t,s=c,i=a.useAttrs(),u=a.ref(null),o=a.computed(()=>["qy-tree-select__popper",d.popperClass].filter(Boolean).join(" ")),p=a.computed(()=>({label:"label",value:"value",children:"children",disabled:"disabled",...d.props})),h=a.computed(()=>{var e;return n((e=d.options)!=null&&e.length?d.options:d.data||[])});function n(e){return e.map(l=>{const r=l==null?void 0:l[d.childrenKey];return{...l,label:(l==null?void 0:l[d.labelKey])??(l==null?void 0:l.label)??(l==null?void 0:l.value)??"",value:(l==null?void 0:l[d.valueKey])??(l==null?void 0:l.value)??(l==null?void 0:l.label),disabled:!!(l!=null&&l[d.disabledKey]),children:Array.isArray(r)?n(r):r}})}function m(e){s("update:modelValue",e)}function y(e){s("change",e)}function b(){s("clear")}function v(e){s("visible-change",e)}function g(e){s("focus",e)}function B(e){s("blur",e)}function C(){var e,l;(l=(e=u.value)==null?void 0:e.focus)==null||l.call(e)}function S(){var e,l;(l=(e=u.value)==null?void 0:e.blur)==null||l.call(e)}return f({focus:C,blur:S}),(e,l)=>(a.openBlock(),a.createBlock(a.unref(k.ElTreeSelect),a.mergeProps({ref_key:"treeSelectRef",ref:u},a.unref(i),{"model-value":t.modelValue,data:h.value,props:p.value,placeholder:t.placeholder,disabled:t.disabled,clearable:t.clearable,filterable:t.filterable,multiple:t.multiple,"collapse-tags":t.collapseTags,"collapse-tags-tooltip":t.collapseTagsTooltip,"check-strictly":t.checkStrictly,"default-expand-all":t.defaultExpandAll,"render-after-expand":t.renderAfterExpand,size:t.size,teleported:t.teleported,"append-to":t.appendTo,"fit-input-width":t.fitInputWidth,"popper-class":o.value,"onUpdate:modelValue":m,onChange:y,onClear:b,onVisibleChange:v,onFocus:g,onBlur:B}),a.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.empty?{name:"empty",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"empty")]),key:"1"}:void 0,e.$slots.tag?{name:"tag",fn:a.withCtx(r=>[a.renderSlot(e.$slots,"tag",a.normalizeProps(a.guardReactiveProps(r)))]),key:"2"}:void 0,e.$slots.default?{name:"default",fn:a.withCtx(r=>[a.renderSlot(e.$slots,"default",a.normalizeProps(a.guardReactiveProps(r)))]),key:"3"}:void 0]),1040,["model-value","data","props","placeholder","disabled","clearable","filterable","multiple","collapse-tags","collapse-tags-tooltip","check-strictly","default-expand-all","render-after-expand","size","teleported","append-to","fit-input-width","popper-class"]))}});exports._sfc_main=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("element-plus"),V=e.defineComponent({name:"QyCheckbox",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:!1},size:{default:void 0},trueValue:{type:[String,Number,Boolean],default:!0},falseValue:{type:[String,Number,Boolean],default:!1}},emits:["update:modelValue","change","focus","blur"],setup(t,{expose:o,emit:s}){const u=t,a=s,r=e.useAttrs(),n=e.ref(null),c=e.computed(()=>typeof u.trueValue=="boolean"&&typeof u.falseValue=="boolean"?{}:{trueValue:u.trueValue,falseValue:u.falseValue}),d=e.computed(()=>({...r,...c.value}));function f(l){a("update:modelValue",l)}function i(l){a("change",l)}function m(l){a("focus",l)}function b(l){a("blur",l)}function h(){return n.value}return o({getCheckboxInstance:h}),(l,g)=>(e.openBlock(),e.createBlock(e.unref(p.ElCheckbox),e.mergeProps({ref_key:"checkboxRef",ref:n},d.value,{"model-value":t.modelValue,disabled:t.disabled,size:t.size,"onUpdate:modelValue":f,onChange:i,onFocus:m,onBlur:b}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16,["model-value","disabled","size"]))}});exports._sfc_main=V;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as u, computed as c, watch as m, onBeforeUnmount as f, openBlock as s, createBlock as p, unref as y, createCommentVNode as h } from "vue";
|
|
2
|
+
import { ElImageViewer as v } from "element-plus";
|
|
3
|
+
import { n as w } from "./utils-DUntDntI.mjs";
|
|
4
|
+
const I = /* @__PURE__ */ u({
|
|
5
|
+
name: "QyImagePreview",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
open: { type: Boolean, default: !1 },
|
|
9
|
+
urlList: { default: () => [] },
|
|
10
|
+
initialIndex: { default: 0 },
|
|
11
|
+
hideOnClickModal: { type: Boolean, default: !0 }
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:open", "close"],
|
|
14
|
+
setup(e, { emit: a }) {
|
|
15
|
+
const t = e, l = a;
|
|
16
|
+
let i = "";
|
|
17
|
+
const r = c(
|
|
18
|
+
() => t.urlList.map((o) => w(o)).filter(Boolean)
|
|
19
|
+
);
|
|
20
|
+
m(
|
|
21
|
+
() => t.open,
|
|
22
|
+
(o) => {
|
|
23
|
+
if (o) {
|
|
24
|
+
i = document.body.style.overflow, document.body.style.overflow = "hidden";
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
n();
|
|
28
|
+
}
|
|
29
|
+
), f(n);
|
|
30
|
+
function d() {
|
|
31
|
+
n(), l("update:open", !1), l("close");
|
|
32
|
+
}
|
|
33
|
+
function n() {
|
|
34
|
+
typeof document > "u" || (document.body.style.overflow = i);
|
|
35
|
+
}
|
|
36
|
+
return (o, k) => e.open && r.value.length ? (s(), p(y(v), {
|
|
37
|
+
key: 0,
|
|
38
|
+
"url-list": r.value,
|
|
39
|
+
"initial-index": e.initialIndex,
|
|
40
|
+
"hide-on-click-modal": e.hideOnClickModal,
|
|
41
|
+
teleport: "body",
|
|
42
|
+
onClose: d
|
|
43
|
+
}, null, 8, ["url-list", "initial-index", "hide-on-click-modal"])) : h("", !0);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
I as _
|
|
48
|
+
};
|