@qynpm/ui 1.0.23 → 1.0.24
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 +222 -48
- package/dist/index.cjs +15 -5
- package/dist/index.mjs +50 -33
- 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 +4 -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-8u4DJZwd.mjs +90 -0
- package/dist/shared/index-9WJeVamR.cjs +1 -0
- package/dist/shared/index-BDFscU3G.mjs +72 -0
- package/dist/shared/index-BYme5QGm.cjs +1 -0
- package/dist/shared/index-B_mI-37S.cjs +1 -0
- package/dist/shared/index-BrV6CR4H.mjs +54 -0
- package/dist/shared/index-C8CA7nkO.cjs +1 -0
- package/dist/shared/index-CTtAQ1LD.cjs +1 -0
- package/dist/shared/index-CczrP1H7.mjs +149 -0
- package/dist/shared/index-ClmefDi6.cjs +1 -0
- package/dist/shared/{index-D7lMppIb.mjs → index-DJnmpqCc.mjs} +63 -63
- package/dist/shared/index-DYohs_aV.mjs +225 -0
- package/dist/shared/index-DixSXWJj.mjs +68 -0
- package/dist/shared/index-aiJ7R6G-.cjs +1 -0
- package/dist/shared/{index-ZLoAI88M.mjs → index-c7lnX4vT.mjs} +1327 -1389
- package/dist/shared/index-dEWJKTS-.cjs +1 -0
- package/dist/shared/index-fBuu4V3A.mjs +129 -0
- package/dist/shared/index-wIXCDvwC.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BF82tses.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BNjoxcAR.mjs +61 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DmmW8UUK.mjs +106 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-tyM4_aoa.cjs +1 -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 +155 -17
- package/package.json +43 -1
- package/qy-checkbox/index.d.ts +42 -2
- package/qy-checkbox-group/index.d.ts +48 -0
- package/qy-date-picker/index.d.ts +140 -5
- package/qy-file-picker/index.d.ts +49 -0
- package/qy-input/index.d.ts +50 -5
- package/qy-input-number/index.d.ts +45 -5
- package/qy-popover/index.d.ts +63 -0
- package/qy-radio/index.d.ts +44 -0
- package/qy-radio-group/index.d.ts +60 -12
- package/qy-select/index.d.ts +67 -5
- package/qy-switch/index.d.ts +46 -0
- package/qy-tag/index.d.ts +44 -0
- package/qy-tooltip/index.d.ts +54 -0
- 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
- /package/dist/shared/{index-BXlQSIWX.mjs → index-DMGXEAyl.mjs} +0 -0
- /package/dist/shared/{index-DyK6vf5h.cjs → index-M4vEHYZ_.cjs} +0 -0
|
@@ -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-1886b81c"]]);exports.Checkbox=v;
|
|
@@ -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-bedd0c11"]]);
|
|
127
|
+
export {
|
|
128
|
+
A as F
|
|
129
|
+
};
|
|
@@ -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-5ec5d1c7"]]);exports.Switch=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),u=require("element-plus"),R=require("./index-9WJeVamR.cjs"),_=a.defineComponent({name:"QyRadioGroup",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[Boolean,String,Number,null],default:void 0},options:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},disabled:{type:Boolean,default:!1},size:{default:void 0},name:{default:void 0},type:{default:"radio"},border:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{expose:i,emit:c}){const l=s,d=c,f=a.useAttrs(),m=a.computed(()=>Object.fromEntries(Object.entries(f).filter(([e])=>e==="class"||e==="style"||e==="role"||e==="title"||e==="id"||e.startsWith("data-")||e.startsWith("aria-")))),n=a.ref(null),b=a.computed(()=>l.type==="button"?u.ElRadioButton:R.Radio),p=a.computed(()=>l.options.map(e=>{const r=e[l.labelKey],t=e[l.valueKey],o=v(t)?t:e.value??e.label??"";return{raw:e,label:String(r??e.label??e.value??""),value:o,disabled:!!e[l.disabledKey]}}));function v(e){return typeof e=="boolean"||typeof e=="string"||typeof e=="number"}function y(e){const r={modelValue:l.modelValue??void 0,value:e.value,label:e.label,disabled:e.disabled,size:l.size,name:l.name};return l.type==="button"?r:{...r,border:l.border}}function g(e,r){return`${String(e.value??e.label)}-${r}`}function h(e){d("update:modelValue",e)}function V(e){d("change",e)}function B(){return n.value}return i({getRadioGroupInstance:B}),(e,r)=>(a.openBlock(),a.createBlock(a.unref(u.ElRadioGroup),a.mergeProps({ref_key:"radioGroupRef",ref:n},m.value,{"model-value":l.modelValue,disabled:l.disabled,size:l.size,name:l.name,"onUpdate:modelValue":h,onChange:V}),{default:a.withCtx(()=>[e.$slots.default?a.renderSlot(e.$slots,"default",{},void 0,void 0,0):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(p.value,(t,o)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(b.value),a.mergeProps({key:g(t,o)},{ref_for:!0},y(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"option",{option:t.raw,label:t.label,value:t.value,disabled:t.disabled},()=>[a.createTextVNode(a.toDisplayString(t.label),1)])]),_:2},1040))),128))]),_:3},16,["model-value","disabled","size","name"]))}});exports._sfc_main=_;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent as p, useAttrs as b, computed as h, openBlock as t, createBlock as s, unref as v, mergeProps as x, withCtx as i, renderSlot as g, createElementBlock as C, Fragment as V, renderList as _, createTextVNode as z, toDisplayString as B } from "vue";
|
|
2
|
+
import { ElCheckboxGroup as $ } from "element-plus";
|
|
3
|
+
import { C as A } from "./index-BDFscU3G.mjs";
|
|
4
|
+
const k = /* @__PURE__ */ p({
|
|
5
|
+
name: "QyCheckboxGroup",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: () => [] },
|
|
10
|
+
options: { default: () => [] },
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
min: {},
|
|
13
|
+
max: {},
|
|
14
|
+
size: { default: void 0 },
|
|
15
|
+
ariaLabel: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:modelValue", "change"],
|
|
18
|
+
setup(o, { emit: r }) {
|
|
19
|
+
const a = o, d = r, n = b(), u = h(
|
|
20
|
+
() => Object.fromEntries(
|
|
21
|
+
Object.entries(n).filter(
|
|
22
|
+
([e]) => e === "class" || e === "style" || e === "role" || e === "title" || e === "id" || e.startsWith("data-") || e.startsWith("aria-")
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
function m(e) {
|
|
27
|
+
d("update:modelValue", e.slice());
|
|
28
|
+
}
|
|
29
|
+
function c(e) {
|
|
30
|
+
d("change", e.slice());
|
|
31
|
+
}
|
|
32
|
+
return (e, E) => (t(), s(v($), x(u.value, {
|
|
33
|
+
"model-value": a.modelValue,
|
|
34
|
+
disabled: a.disabled,
|
|
35
|
+
min: a.min,
|
|
36
|
+
max: a.max,
|
|
37
|
+
size: a.size,
|
|
38
|
+
"aria-label": a.ariaLabel,
|
|
39
|
+
"onUpdate:modelValue": m,
|
|
40
|
+
onChange: c
|
|
41
|
+
}), {
|
|
42
|
+
default: i(() => [
|
|
43
|
+
e.$slots.default ? g(e.$slots, "default", {}, void 0, void 0, 0) : (t(!0), C(V, { key: 1 }, _(a.options, (l, f) => (t(), s(A, {
|
|
44
|
+
key: `${String(l.value)}-${f}`,
|
|
45
|
+
"model-value": a.modelValue.includes(l.value),
|
|
46
|
+
value: l.value,
|
|
47
|
+
disabled: a.disabled || l.disabled
|
|
48
|
+
}, {
|
|
49
|
+
default: i(() => [
|
|
50
|
+
z(B(l.label), 1)
|
|
51
|
+
]),
|
|
52
|
+
_: 2
|
|
53
|
+
}, 1032, ["model-value", "value", "disabled"]))), 128))
|
|
54
|
+
]),
|
|
55
|
+
_: 3
|
|
56
|
+
}, 16, ["model-value", "disabled", "min", "max", "size", "aria-label"]));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
k as _
|
|
61
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { defineComponent as C, useAttrs as G, computed as d, ref as S, openBlock as o, createBlock as u, unref as $, mergeProps as i, withCtx as f, renderSlot as m, createElementBlock as E, Fragment as O, renderList as w, resolveDynamicComponent as x, createTextVNode as A, toDisplayString as P } from "vue";
|
|
2
|
+
import { ElRadioButton as j, ElRadioGroup as D } from "element-plus";
|
|
3
|
+
import { R as N } from "./index-8u4DJZwd.mjs";
|
|
4
|
+
const I = /* @__PURE__ */ C({
|
|
5
|
+
name: "QyRadioGroup",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { type: [Boolean, String, Number, null], default: void 0 },
|
|
10
|
+
options: { default: () => [] },
|
|
11
|
+
labelKey: { default: "label" },
|
|
12
|
+
valueKey: { default: "value" },
|
|
13
|
+
disabledKey: { default: "disabled" },
|
|
14
|
+
disabled: { type: Boolean, default: !1 },
|
|
15
|
+
size: { default: void 0 },
|
|
16
|
+
name: { default: void 0 },
|
|
17
|
+
type: { default: "radio" },
|
|
18
|
+
border: { type: Boolean, default: !1 }
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:modelValue", "change"],
|
|
21
|
+
setup(b, { expose: c, emit: p }) {
|
|
22
|
+
const a = b, n = p, v = G(), y = d(
|
|
23
|
+
() => Object.fromEntries(
|
|
24
|
+
Object.entries(v).filter(
|
|
25
|
+
([e]) => e === "class" || e === "style" || e === "role" || e === "title" || e === "id" || e.startsWith("data-") || e.startsWith("aria-")
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
), s = S(null), g = d(
|
|
29
|
+
() => a.type === "button" ? j : N
|
|
30
|
+
), V = d(
|
|
31
|
+
() => a.options.map((e) => {
|
|
32
|
+
const t = e[a.labelKey], l = e[a.valueKey], r = h(l) ? l : e.value ?? e.label ?? "";
|
|
33
|
+
return {
|
|
34
|
+
raw: e,
|
|
35
|
+
label: String(t ?? e.label ?? e.value ?? ""),
|
|
36
|
+
value: r,
|
|
37
|
+
disabled: !!e[a.disabledKey]
|
|
38
|
+
};
|
|
39
|
+
})
|
|
40
|
+
);
|
|
41
|
+
function h(e) {
|
|
42
|
+
return typeof e == "boolean" || typeof e == "string" || typeof e == "number";
|
|
43
|
+
}
|
|
44
|
+
function R(e) {
|
|
45
|
+
const t = {
|
|
46
|
+
modelValue: a.modelValue ?? void 0,
|
|
47
|
+
value: e.value,
|
|
48
|
+
label: e.label,
|
|
49
|
+
disabled: e.disabled,
|
|
50
|
+
size: a.size,
|
|
51
|
+
name: a.name
|
|
52
|
+
};
|
|
53
|
+
return a.type === "button" ? t : {
|
|
54
|
+
...t,
|
|
55
|
+
border: a.border
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function B(e, t) {
|
|
59
|
+
return `${String(e.value ?? e.label)}-${t}`;
|
|
60
|
+
}
|
|
61
|
+
function _(e) {
|
|
62
|
+
n("update:modelValue", e);
|
|
63
|
+
}
|
|
64
|
+
function z(e) {
|
|
65
|
+
n("change", e);
|
|
66
|
+
}
|
|
67
|
+
function K() {
|
|
68
|
+
return s.value;
|
|
69
|
+
}
|
|
70
|
+
return c({
|
|
71
|
+
getRadioGroupInstance: K
|
|
72
|
+
}), (e, t) => (o(), u($(D), i({
|
|
73
|
+
ref_key: "radioGroupRef",
|
|
74
|
+
ref: s
|
|
75
|
+
}, y.value, {
|
|
76
|
+
"model-value": a.modelValue,
|
|
77
|
+
disabled: a.disabled,
|
|
78
|
+
size: a.size,
|
|
79
|
+
name: a.name,
|
|
80
|
+
"onUpdate:modelValue": _,
|
|
81
|
+
onChange: z
|
|
82
|
+
}), {
|
|
83
|
+
default: f(() => [
|
|
84
|
+
e.$slots.default ? m(e.$slots, "default", {}, void 0, void 0, 0) : (o(!0), E(O, { key: 1 }, w(V.value, (l, r) => (o(), u(x(g.value), i({
|
|
85
|
+
key: B(l, r)
|
|
86
|
+
}, { ref_for: !0 }, R(l)), {
|
|
87
|
+
default: f(() => [
|
|
88
|
+
m(e.$slots, "option", {
|
|
89
|
+
option: l.raw,
|
|
90
|
+
label: l.label,
|
|
91
|
+
value: l.value,
|
|
92
|
+
disabled: l.disabled
|
|
93
|
+
}, () => [
|
|
94
|
+
A(P(l.label), 1)
|
|
95
|
+
])
|
|
96
|
+
]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, 1040))), 128))
|
|
99
|
+
]),
|
|
100
|
+
_: 3
|
|
101
|
+
}, 16, ["model-value", "disabled", "size", "name"]));
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
export {
|
|
105
|
+
I as _
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),m=require("element-plus"),f=require("./index-dEWJKTS-.cjs"),b=e.defineComponent({name:"QyCheckboxGroup",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},options:{default:()=>[]},disabled:{type:Boolean,default:!1},min:{},max:{},size:{default:void 0},ariaLabel:{}},emits:["update:modelValue","change"],setup(d,{emit:i}){const l=d,s=i,o=e.useAttrs(),n=e.computed(()=>Object.fromEntries(Object.entries(o).filter(([a])=>a==="class"||a==="style"||a==="role"||a==="title"||a==="id"||a.startsWith("data-")||a.startsWith("aria-"))));function r(a){s("update:modelValue",a.slice())}function u(a){s("change",a.slice())}return(a,p)=>(e.openBlock(),e.createBlock(e.unref(m.ElCheckboxGroup),e.mergeProps(n.value,{"model-value":l.modelValue,disabled:l.disabled,min:l.min,max:l.max,size:l.size,"aria-label":l.ariaLabel,"onUpdate:modelValue":r,onChange:u}),{default:e.withCtx(()=>[a.$slots.default?e.renderSlot(a.$slots,"default",{},void 0,void 0,0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.options,(t,c)=>(e.openBlock(),e.createBlock(f.Checkbox,{key:`${String(t.value)}-${c}`,"model-value":l.modelValue.includes(t.value),value:t.value,disabled:l.disabled||t.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1032,["model-value","value","disabled"]))),128))]),_:3},16,["model-value","disabled","min","max","size","aria-label"]))}});exports._sfc_main=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),u=require("element-plus"),r=e.defineComponent({name:"QyTooltip",inheritAttrs:!1,__name:"index",props:{content:{default:""},placement:{default:"top"},effect:{default:"dark"},disabled:{type:Boolean,default:!1},showDelay:{default:0},hideDelay:{default:200},offset:{default:12},maxWidth:{default:320}},emits:["open","close"],setup(t,{emit:f}){const i=f,d=e.computed(()=>typeof t.maxWidth=="number"?`${t.maxWidth}px`:t.maxWidth),s=e.computed(()=>({"--qy-tooltip-max-width":d.value})),l=e.ref(!1);let n=!1;e.onBeforeUnmount(()=>{n=!0});function o(a){n||a===l.value||(l.value=a,i(a?"open":"close"))}function c(a){o(a)}return e.watch(()=>t.disabled,a=>{a&&o(!1)}),(a,m)=>(e.openBlock(),e.createBlock(e.unref(u.ElTooltip),{content:t.content,placement:t.placement,effect:t.effect,disabled:t.disabled,"show-after":t.showDelay,"hide-after":t.hideDelay,offset:t.offset,trigger:["hover","focus"],enterable:!1,"raw-content":!1,"popper-class":"qy-tooltip-popper","popper-style":s.value,"onUpdate:visible":c},{content:e.withCtx(()=>[e.renderSlot(a.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)])]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["content","placement","effect","disabled","show-after","hide-after","offset","popper-style"]))}});exports._sfc_main=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),I=require("element-plus"),P=1e3,O=t.defineComponent({name:"QyPopover",inheritAttrs:!1,__name:"index",props:{trigger:{type:String,default:"click"},placement:{type:String,default:"bottom"},effect:{type:String,default:"light"},width:{type:[Number,String],default:240},offset:{type:Number,default:12},showDelay:{type:Number,default:0},hideDelay:{type:Number,default:200},showArrow:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},open:{type:Boolean,default:void 0}},emits:["update:open","open-change","open","close"],setup(r,{expose:D,emit:B}){const n=r,d=B,u=t.computed(()=>n.open!==void 0),p=u.value&&n.open===!0&&!n.disabled,i=t.ref(p),f=t.ref(p),w=t.ref(p),o=t.ref(null),y=t.computed(()=>n.disabled?!1:u.value?n.open===!0:i.value);let l,c=!1,s;const b=t.computed(()=>typeof n.width=="number"?`${n.width}px`:n.width),q=t.computed(()=>({"--qy-popover-width":b.value,"--qy-popover-mobile-gutter":"24px"})),v=t.useSlots(),C=t.computed(()=>{var e;return((e=v.reference)==null?void 0:e.call(v))??[]});function m(){l&&(clearTimeout(l),l=void 0),o.value=null}function N(e){l&&clearTimeout(l),l=setTimeout(()=>{l=void 0,o.value===e&&(o.value=null)},P)}function a(){if(c)return;const e=y.value;f.value!==e&&(c=!0,s=e,f.value=e)}function h(e){if(!(e&&n.disabled)){if(!u.value){if(i.value===e)return;i.value=e,d("update:open",e),a();return}o.value!==e&&(o.value===null&&n.open===e||(o.value=e,N(e),d("update:open",e),a()))}}function g(e){e===f.value&&(!c||s!==e||(c=!1,s=void 0,e!==w.value&&(w.value=e,o.value===e&&m(),d("open-change",e),d(e?"open":"close"),a())))}function S(e){h(e),a()}function T(){g(!0)}function E(){g(!1)}function L(){h(!1)}return t.watch(y,()=>a()),t.watch(u,e=>{m(),e?i.value=n.open===!0:i.value=f.value,a()}),t.watch(()=>n.open,(e,k)=>{!u.value||o.value===null||(e===o.value||e!==k)&&m()}),t.watch(()=>n.disabled,e=>{e?h(!1):a()}),t.onBeforeUnmount(()=>{c=!1,s=void 0,l&&clearTimeout(l)}),D({close:L}),(e,k)=>(t.openBlock(),t.createBlock(t.unref(I.ElPopover),{visible:f.value,trigger:r.trigger,placement:r.placement,effect:r.effect,width:r.width,offset:r.offset,"show-after":r.showDelay,"hide-after":r.hideDelay,"show-arrow":r.showArrow,disabled:r.disabled,enterable:!0,"popper-style":q.value,"popper-class":"qy-popover-popper","onUpdate:visible":S,onAfterEnter:T,onAfterLeave:E},{reference:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,(A,W)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(A),{key:A.key??W}))),128))]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","trigger","placement","effect","width","offset","show-after","hide-after","show-arrow","disabled","popper-style"]))}});exports._sfc_main=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("vue"),h=require("element-plus"),p=n.defineComponent({name:"QyInputNumber",inheritAttrs:!1,__name:"index",props:{id:{},step:{default:1},stepStrictly:{type:Boolean,default:!1},max:{default:void 0},min:{default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},controls:{type:Boolean,default:!0},name:{},placeholder:{default:"请输入数字"},precision:{default:void 0},validateEvent:{type:Boolean},ariaLabel:{},inputmode:{},align:{},disabledScientific:{type:Boolean},formatter:{},parser:{},tabindex:{},modelValue:{default:void 0},valueOnClear:{default:null},controlsPosition:{default:""},size:{default:void 0}},emits:["update:modelValue","input","change","focus","blur"],setup(t,{expose:o,emit:d}){const l=d,s=n.useAttrs(),r=n.computed(()=>Object.fromEntries(Object.entries(s).filter(([e])=>!e.startsWith("on")))),i=n.ref(null);function u(e){l("update:modelValue",e)}function c(e){l("input",e)}function f(e,a){l("change",e,a)}function m(e){l("focus",e)}function b(e){l("blur",e)}function v(){var e,a;(a=(e=i.value)==null?void 0:e.focus)==null||a.call(e)}function y(){var e,a;(a=(e=i.value)==null?void 0:e.blur)==null||a.call(e)}return o({focus:v,blur:y}),(e,a)=>(n.openBlock(),n.createBlock(n.unref(h.ElInputNumber),n.mergeProps({ref_key:"inputNumberRef",ref:i},r.value,{class:"qy-input-number","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,readonly:t.readonly,size:t.size,"value-on-clear":t.valueOnClear,formatter:t.formatter,parser:t.parser,inputmode:t.inputmode,align:t.align,"disabled-scientific":t.disabledScientific,"validate-event":t.validateEvent,id:t.id,name:t.name,"aria-label":t.ariaLabel,tabindex:t.tabindex,"onUpdate:modelValue":u,onInput:c,onChange:f,onFocus:m,onBlur:b}),n.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"suffix")]),key:"1"}:void 0,e.$slots["increase-icon"]?{name:"increase-icon",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"increase-icon")]),key:"2"}:void 0,e.$slots["decrease-icon"]?{name:"decrease-icon",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"decrease-icon")]),key:"3"}:void 0]),1040,["model-value","min","max","step","step-strictly","precision","controls","controls-position","placeholder","disabled","readonly","size","value-on-clear","formatter","parser","inputmode","align","disabled-scientific","validate-event","id","name","aria-label","tabindex"]))}});exports._sfc_main=p;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { defineComponent as S, useAttrs as A, ref as M, computed as q, openBlock as H, createBlock as U, unref as h, mergeProps as j, withCtx as o, renderSlot as r, normalizeProps as d, guardReactiveProps as i } from "vue";
|
|
2
|
+
import { ElDatePicker as w } from "element-plus";
|
|
3
|
+
const Z = /* @__PURE__ */ S({
|
|
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
|
+
readonly: { type: Boolean },
|
|
22
|
+
size: { default: void 0 },
|
|
23
|
+
teleported: { type: Boolean, default: !0 },
|
|
24
|
+
appendTo: { default: "body" },
|
|
25
|
+
popperClass: { default: "" },
|
|
26
|
+
normalizeRangeEndTime: { type: Boolean, default: !1 }
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:modelValue", "change", "clear", "calendar-change", "panel-change", "visible-change", "focus", "blur"],
|
|
29
|
+
setup(n, { expose: p, emit: m }) {
|
|
30
|
+
const s = n, l = m, g = A(), u = M(null), y = q(
|
|
31
|
+
() => ["qy-date-picker__popper", s.popperClass].filter(Boolean).join(" ")
|
|
32
|
+
);
|
|
33
|
+
function b(e) {
|
|
34
|
+
return Array.isArray(e);
|
|
35
|
+
}
|
|
36
|
+
function C(e) {
|
|
37
|
+
if (e.getHours() !== 0 || e.getMinutes() !== 0 || e.getSeconds() !== 0 || e.getMilliseconds() !== 0)
|
|
38
|
+
return e;
|
|
39
|
+
const a = new Date(e);
|
|
40
|
+
return a.setHours(23, 59, 59, 0), a;
|
|
41
|
+
}
|
|
42
|
+
function P(e) {
|
|
43
|
+
const a = e.match(
|
|
44
|
+
/(T| )00:00:00(\.000)?(Z|[+-]\d{2}:?\d{2})?$/
|
|
45
|
+
);
|
|
46
|
+
return a ? e.replace(
|
|
47
|
+
a[0],
|
|
48
|
+
`${a[1]}23:59:59${a[2] ?? ""}${a[3] ?? ""}`
|
|
49
|
+
) : e;
|
|
50
|
+
}
|
|
51
|
+
function c(e) {
|
|
52
|
+
if (!s.normalizeRangeEndTime || !b(e) || e.length < 2)
|
|
53
|
+
return e;
|
|
54
|
+
const a = e[1];
|
|
55
|
+
let t = a;
|
|
56
|
+
if (a instanceof Date ? t = C(a) : typeof a == "string" && (t = P(a)), t === a)
|
|
57
|
+
return e;
|
|
58
|
+
const f = [...e];
|
|
59
|
+
return f[1] = t, f;
|
|
60
|
+
}
|
|
61
|
+
function v(e) {
|
|
62
|
+
l("update:modelValue", c(e));
|
|
63
|
+
}
|
|
64
|
+
function V(e) {
|
|
65
|
+
l("change", c(e));
|
|
66
|
+
}
|
|
67
|
+
function z() {
|
|
68
|
+
l("clear");
|
|
69
|
+
}
|
|
70
|
+
function B(e) {
|
|
71
|
+
l("calendar-change", e);
|
|
72
|
+
}
|
|
73
|
+
function $(e, a, t) {
|
|
74
|
+
if (t === void 0) {
|
|
75
|
+
l("panel-change", e, a);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
l("panel-change", e, a, t);
|
|
79
|
+
}
|
|
80
|
+
function k(e) {
|
|
81
|
+
l("visible-change", e);
|
|
82
|
+
}
|
|
83
|
+
function D(e) {
|
|
84
|
+
l("focus", e);
|
|
85
|
+
}
|
|
86
|
+
function R(e) {
|
|
87
|
+
l("blur", e);
|
|
88
|
+
}
|
|
89
|
+
function T() {
|
|
90
|
+
var e, a;
|
|
91
|
+
(a = (e = u.value) == null ? void 0 : e.focus) == null || a.call(e);
|
|
92
|
+
}
|
|
93
|
+
function E() {
|
|
94
|
+
var e, a;
|
|
95
|
+
(a = (e = u.value) == null ? void 0 : e.blur) == null || a.call(e);
|
|
96
|
+
}
|
|
97
|
+
function x() {
|
|
98
|
+
var e, a;
|
|
99
|
+
(a = (e = u.value) == null ? void 0 : e.handleOpen) == null || a.call(e);
|
|
100
|
+
}
|
|
101
|
+
function F() {
|
|
102
|
+
var e, a;
|
|
103
|
+
(a = (e = u.value) == null ? void 0 : e.handleClose) == null || a.call(e);
|
|
104
|
+
}
|
|
105
|
+
return p({
|
|
106
|
+
focus: T,
|
|
107
|
+
blur: E,
|
|
108
|
+
open: x,
|
|
109
|
+
close: F
|
|
110
|
+
}), (e, a) => (H(), U(h(w), j({
|
|
111
|
+
ref_key: "datePickerRef",
|
|
112
|
+
ref: u,
|
|
113
|
+
class: "qy-date-picker"
|
|
114
|
+
}, h(g), {
|
|
115
|
+
"model-value": n.modelValue,
|
|
116
|
+
type: n.type,
|
|
117
|
+
placeholder: n.placeholder,
|
|
118
|
+
"start-placeholder": n.startPlaceholder,
|
|
119
|
+
"end-placeholder": n.endPlaceholder,
|
|
120
|
+
"range-separator": n.rangeSeparator,
|
|
121
|
+
format: n.format,
|
|
122
|
+
"value-format": n.valueFormat,
|
|
123
|
+
"default-time": n.defaultTime,
|
|
124
|
+
"disabled-date": n.disabledDate,
|
|
125
|
+
shortcuts: n.shortcuts,
|
|
126
|
+
clearable: n.clearable,
|
|
127
|
+
disabled: n.disabled,
|
|
128
|
+
readonly: n.readonly,
|
|
129
|
+
size: n.size,
|
|
130
|
+
teleported: n.teleported,
|
|
131
|
+
"append-to": n.appendTo,
|
|
132
|
+
"popper-class": y.value,
|
|
133
|
+
"onUpdate:modelValue": v,
|
|
134
|
+
onChange: V,
|
|
135
|
+
onClear: z,
|
|
136
|
+
onCalendarChange: B,
|
|
137
|
+
onPanelChange: $,
|
|
138
|
+
onVisibleChange: k,
|
|
139
|
+
onFocus: D,
|
|
140
|
+
onBlur: R
|
|
141
|
+
}), {
|
|
142
|
+
default: o((t) => [
|
|
143
|
+
r(e.$slots, "default", d(i(t)))
|
|
144
|
+
]),
|
|
145
|
+
"range-separator": o((t) => [
|
|
146
|
+
r(e.$slots, "range-separator", d(i(t)))
|
|
147
|
+
]),
|
|
148
|
+
"prev-month": o((t) => [
|
|
149
|
+
r(e.$slots, "prev-month", d(i(t)))
|
|
150
|
+
]),
|
|
151
|
+
"next-month": o((t) => [
|
|
152
|
+
r(e.$slots, "next-month", d(i(t)))
|
|
153
|
+
]),
|
|
154
|
+
"prev-year": o((t) => [
|
|
155
|
+
r(e.$slots, "prev-year", d(i(t)))
|
|
156
|
+
]),
|
|
157
|
+
"next-year": o((t) => [
|
|
158
|
+
r(e.$slots, "next-year", d(i(t)))
|
|
159
|
+
]),
|
|
160
|
+
_: 3
|
|
161
|
+
}, 16, ["model-value", "type", "placeholder", "start-placeholder", "end-placeholder", "range-separator", "format", "value-format", "default-time", "disabled-date", "shortcuts", "clearable", "disabled", "readonly", "size", "teleported", "append-to", "popper-class"]));
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
export {
|
|
165
|
+
Z as _
|
|
166
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as m, computed as n, ref as h, onBeforeUnmount as p, watch as y, openBlock as b, createBlock as w, unref as x, withCtx as f, renderSlot as i, createTextVNode as v, toDisplayString as D } from "vue";
|
|
2
|
+
import { ElTooltip as W } from "element-plus";
|
|
3
|
+
const C = /* @__PURE__ */ m({
|
|
4
|
+
name: "QyTooltip",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
content: { default: "" },
|
|
9
|
+
placement: { default: "top" },
|
|
10
|
+
effect: { default: "dark" },
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
showDelay: { default: 0 },
|
|
13
|
+
hideDelay: { default: 200 },
|
|
14
|
+
offset: { default: 12 },
|
|
15
|
+
maxWidth: { default: 320 }
|
|
16
|
+
},
|
|
17
|
+
emits: ["open", "close"],
|
|
18
|
+
setup(e, { emit: d }) {
|
|
19
|
+
const s = d, c = n(
|
|
20
|
+
() => typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth
|
|
21
|
+
), r = n(() => ({
|
|
22
|
+
"--qy-tooltip-max-width": c.value
|
|
23
|
+
})), a = h(!1);
|
|
24
|
+
let l = !1;
|
|
25
|
+
p(() => {
|
|
26
|
+
l = !0;
|
|
27
|
+
});
|
|
28
|
+
function o(t) {
|
|
29
|
+
l || t === a.value || (a.value = t, s(t ? "open" : "close"));
|
|
30
|
+
}
|
|
31
|
+
function u(t) {
|
|
32
|
+
o(t);
|
|
33
|
+
}
|
|
34
|
+
return y(
|
|
35
|
+
() => e.disabled,
|
|
36
|
+
(t) => {
|
|
37
|
+
t && o(!1);
|
|
38
|
+
}
|
|
39
|
+
), (t, g) => (b(), w(x(W), {
|
|
40
|
+
content: e.content,
|
|
41
|
+
placement: e.placement,
|
|
42
|
+
effect: e.effect,
|
|
43
|
+
disabled: e.disabled,
|
|
44
|
+
"show-after": e.showDelay,
|
|
45
|
+
"hide-after": e.hideDelay,
|
|
46
|
+
offset: e.offset,
|
|
47
|
+
trigger: ["hover", "focus"],
|
|
48
|
+
enterable: !1,
|
|
49
|
+
"raw-content": !1,
|
|
50
|
+
"popper-class": "qy-tooltip-popper",
|
|
51
|
+
"popper-style": r.value,
|
|
52
|
+
"onUpdate:visible": u
|
|
53
|
+
}, {
|
|
54
|
+
content: f(() => [
|
|
55
|
+
i(t.$slots, "content", {}, () => [
|
|
56
|
+
v(D(e.content), 1)
|
|
57
|
+
])
|
|
58
|
+
]),
|
|
59
|
+
default: f(() => [
|
|
60
|
+
i(t.$slots, "default")
|
|
61
|
+
]),
|
|
62
|
+
_: 3
|
|
63
|
+
}, 8, ["content", "placement", "effect", "disabled", "show-after", "hide-after", "offset", "popper-style"]));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
C as _
|
|
68
|
+
};
|