@qynpm/ui 1.0.28 → 1.0.32
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 +167 -8
- package/dist/index.cjs +9 -4
- package/dist/index.mjs +90 -62
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-aside/index.cjs +1 -0
- package/dist/qy-aside/index.mjs +7 -0
- package/dist/qy-cascader/index.cjs +1 -1
- package/dist/qy-cascader/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +1 -1
- package/dist/qy-checkbox-group/index.cjs +1 -1
- package/dist/qy-checkbox-group/index.mjs +1 -1
- package/dist/qy-col/index.cjs +1 -0
- package/dist/qy-col/index.mjs +7 -0
- package/dist/qy-collapse/index.cjs +1 -1
- package/dist/qy-collapse/index.mjs +1 -1
- package/dist/qy-container/index.cjs +1 -0
- package/dist/qy-container/index.mjs +7 -0
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +1 -1
- package/dist/qy-drawer/index.cjs +1 -0
- package/dist/qy-drawer/index.mjs +5 -0
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +2 -2
- package/dist/qy-fullscreen/index.cjs +1 -0
- package/dist/qy-fullscreen/index.mjs +7 -0
- package/dist/qy-icon/index.cjs +1 -0
- package/dist/qy-icon/index.mjs +11 -0
- package/dist/qy-icon-picker/index.cjs +5 -0
- package/dist/qy-icon-picker/index.mjs +11 -0
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input/index.cjs +1 -1
- package/dist/qy-input/index.mjs +4 -5
- package/dist/qy-input-number/index.cjs +2 -2
- package/dist/qy-input-number/index.mjs +2 -2
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-link/index.cjs +1 -1
- package/dist/qy-link/index.mjs +1 -1
- package/dist/qy-loading/index.cjs +1 -0
- package/dist/qy-loading/index.mjs +9 -0
- package/dist/qy-main/index.cjs +1 -0
- package/dist/qy-main/index.mjs +7 -0
- 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 +1 -1
- package/dist/qy-popover/index.cjs +1 -1
- package/dist/qy-popover/index.mjs +1 -1
- package/dist/qy-radio/index.cjs +1 -1
- package/dist/qy-radio/index.mjs +1 -1
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-result/index.cjs +1 -0
- package/dist/qy-result/index.mjs +7 -0
- package/dist/qy-row/index.cjs +1 -0
- package/dist/qy-row/index.mjs +7 -0
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-statistic/index.cjs +1 -0
- package/dist/qy-statistic/index.mjs +7 -0
- package/dist/qy-switch/index.cjs +1 -1
- package/dist/qy-switch/index.mjs +1 -1
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +1 -1
- package/dist/qy-tabs/index.cjs +1 -1
- package/dist/qy-tabs/index.mjs +1 -1
- package/dist/qy-tag/index.cjs +1 -1
- package/dist/qy-tag/index.mjs +1 -1
- package/dist/qy-tooltip/index.cjs +1 -1
- package/dist/qy-tooltip/index.mjs +1 -1
- package/dist/qy-tree-select/index.cjs +1 -1
- package/dist/qy-tree-select/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/{index-C7V-LeFg.mjs → index-1LT6Q6XJ.mjs} +1 -1
- package/dist/shared/{index-DleLvEzf.mjs → index-4wZQbpy3.mjs} +1039 -1002
- package/dist/shared/index-AirHUQwm.cjs +1 -0
- package/dist/shared/index-B1zDCCqy.mjs +78 -0
- package/dist/shared/index-B6xIO6kg.cjs +1 -0
- package/dist/shared/{index-B9RYNZUh.cjs → index-BWDaV6FO.cjs} +1 -1
- package/dist/shared/index-BmJPEXUM.mjs +222 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs → index-Bs2OQHXk.mjs} +33 -31
- package/dist/shared/index-BvKFjDgX.cjs +1 -0
- package/dist/shared/index-CaNxcPSD.mjs +254 -0
- package/dist/shared/{index-DEkng5wh.cjs → index-CwzztWPU.cjs} +1 -1
- package/dist/shared/index-D-YyFaZ6.cjs +1 -0
- package/dist/shared/{index-BTL45WYB.cjs → index-DLLDXfic.cjs} +1 -1
- package/dist/shared/{index-CVoiIRas.mjs → index-D_rRdrge.mjs} +1 -1
- package/dist/shared/{index-CYn7TvRx.mjs → index-DfR8Z9MN.mjs} +1 -1
- package/dist/shared/index-Dvf1zJ7h.cjs +1 -0
- package/dist/shared/index-rcu9CzSn.cjs +1 -0
- package/dist/shared/index-xuTVtF4x.mjs +6 -0
- package/dist/shared/index.vue_vue_type_script_lang-8AT3-xU-.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-BaIOvoQn.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_lang-BgapsQjI.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-Bk0kLg5l.mjs +34 -0
- package/dist/shared/index.vue_vue_type_script_lang-BnmY1ndj.mjs +77 -0
- package/dist/shared/index.vue_vue_type_script_lang-By3jd4gw.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CCL57H5c.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CKZUcaZ5.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CWnNQBPN.mjs +31 -0
- package/dist/shared/index.vue_vue_type_script_lang-CfjfZCT3.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-ChS-3_vl.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_lang-DRvk4-_O.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BLF3RNlY.mjs +331 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BXnZt9UT.mjs +63 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DXtovY1E.mjs → index.vue_vue_type_script_setup_true_lang-C91DUwOD.mjs} +1 -1
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DXGjuA2f.cjs → index.vue_vue_type_script_setup_true_lang-CuXBYNXZ.cjs} +1 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-D7BlbHN5.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-CUox3Lm-.mjs → index.vue_vue_type_script_setup_true_lang-DP-jqqo2.mjs} +1 -1
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-kje3Rtlw.cjs → index.vue_vue_type_script_setup_true_lang-DkDEcB4G.cjs} +1 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-S6QPMZay.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BJXS2dVf.mjs +126 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CL_IFx-Z.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CUqnwExG.mjs +80 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DXQ9l1XF.mjs +286 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-M0qKRXd2.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-lmRmXLwB.cjs +1 -0
- package/index.d.ts +156 -23
- package/package.json +74 -1
- package/qy-aside/index.d.ts +47 -0
- package/qy-col/index.d.ts +65 -0
- package/qy-container/index.d.ts +49 -0
- package/qy-drawer/index.d.ts +55 -0
- package/qy-fullscreen/index.d.ts +72 -0
- package/qy-icon/index.d.ts +105 -0
- package/qy-icon-picker/index.d.ts +56 -0
- package/qy-loading/index.d.ts +25 -0
- package/qy-main/index.d.ts +45 -0
- package/qy-result/index.d.ts +64 -0
- package/qy-row/index.d.ts +59 -0
- package/qy-statistic/index.d.ts +61 -0
- package/dist/shared/index-B8phg478.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CmQLfhRo.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DobP199g.mjs +0 -63
- package/dist/shared/index.vue_vue_type_style_index_0_lang-C6urLjSf.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CVxWn-Vs.mjs +0 -121
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +0 -1
- /package/dist/shared/{index-PlyLRNmb.cjs → index-Bmw9BNXm.cjs} +0 -0
- /package/dist/shared/{index-UGOgNLvm.cjs → index-BpI0jwYK.cjs} +0 -0
- /package/dist/shared/{index-DA3GVIZY.cjs → index-BxvS3vlc.cjs} +0 -0
- /package/dist/shared/{index-DMiZy6gD.cjs → index-Bxz4crCd.cjs} +0 -0
- /package/dist/shared/{index-YsBzyp9n.mjs → index-C-ZAw_DP.mjs} +0 -0
- /package/dist/shared/{index-CUITnlPr.mjs → index-C31wpivi.mjs} +0 -0
- /package/dist/shared/{index-BqV6vW9P.cjs → index-CCZttbsg.cjs} +0 -0
- /package/dist/shared/{index-DjyaOKUS.cjs → index-CltDZpF9.cjs} +0 -0
- /package/dist/shared/{index-mTWXYnLm.mjs → index-CmRclPWX.mjs} +0 -0
- /package/dist/shared/{index-DvA3Wy_F.mjs → index-Co0_4YEV.mjs} +0 -0
- /package/dist/shared/{index-WP9Dbscv.mjs → index-D6ybNdgn.mjs} +0 -0
- /package/dist/shared/{index-DHJf8Zto.mjs → index-kiAR2M_e.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CWz689KH.cjs → index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs → index.vue_vue_type_style_index_0_lang-B0CXLnL1.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DIMCVnQm.mjs → index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs → index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CnL4aeg1.cjs → index.vue_vue_type_style_index_0_lang-D9DraThL.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Cb4yMk-r.cjs → index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-D1kpIund.mjs → index.vue_vue_type_style_index_0_lang-DSur831A.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs → index.vue_vue_type_style_index_0_lang-DUgOOzEZ.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs → index.vue_vue_type_style_index_0_lang-DWiolYb3.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs → index.vue_vue_type_style_index_0_lang-DccRGtZE.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs → index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-dLpQXf6x.mjs → index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("vue"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),I=Symbol("QyIconRegistry"),E=new WeakMap;function z(e){const t=[],n=new Map;for(const a of(e==null?void 0:e.icons)??[]){const s=d(a==null?void 0:a.name);if(!s)throw new Error("QyIcon definition name must not be empty.");const u=p(s);if(n.has(u))throw new Error(`Duplicate icon name "${s}".`);const l=K(a,s);t.push(l),n.set(u,l)}const c=[],i=new Map;for(const a of C(e==null?void 0:e.aliases)){const s=d(a.name),u=d(a.target),l=p(s),w=p(u);if(!s)throw new Error("QyIcon alias name must not be empty.");if(!u)throw new Error(`QyIcon alias "${s}" target must not be empty.`);if(n.has(l))throw new Error(`Icon alias "${s}" conflicts with a canonical icon name.`);if(i.has(l))throw new Error(`Duplicate icon alias "${s}".`);const m=n.get(w);if(!m)throw new Error(`Icon alias "${s}" target "${u}" not found.`);i.set(l,p(m.name)),c.push(Object.freeze({name:s,target:m.name}))}const g=Object.freeze({definitions:Object.freeze(t),aliases:Object.freeze(c),byName:n,aliasTargets:i}),f=Object.freeze({resolve(a){const s=p(d(a)),u=i.get(s)??s,l=n.get(u);return l?Q(l):void 0},has(a){const s=p(d(a));return n.has(i.get(s)??s)},list(){return Object.freeze(t.map(Q))}});return E.set(f,g),f}function x(...e){const t=[],n=[];for(const c of e){const i=E.get(c);if(!i)throw new TypeError("mergeQyIconRegistries accepts only QyIcon registries created by this package.");t.push(...i.definitions),n.push(...i.aliases)}try{return z({icons:t,aliases:n})}catch(c){const i=c instanceof Error?c.message:String(c);throw new Error(`Icon registry merge conflict: ${i}`)}}function B(e){if(!E.has(e))throw new TypeError("createQyIconPlugin accepts only a QyIcon registry created by this package.");return Object.freeze({install(t){t.provide(I,e)}})}function d(e){const t=typeof e=="string"||typeof e=="number"?String(e).trim():"";if(!t)return"";const n=/^#icon-(.+)$/i.exec(t);if(n)return n[1].trim();const c=/^icon-\[([^\[\]]+?)--([^\[\]]+?)\]$/i.exec(t);return c?`iconify:${c[1]}:${c[2]}`:t}function p(e){return e.toLocaleLowerCase()}function C(e){return e?Array.isArray(e)?[...e]:Object.entries(e).map(([t,n])=>({name:t,target:n})):[]}function K(e,t){const n={...e.label===void 0?{}:{label:q(e.label,t)},...e.keywords===void 0?{}:{keywords:D(e.keywords,t)}};switch(e.source){case"symbol":return b({name:t,source:"symbol",value:v("symbol",e.value,t),...n});case"component":return b({name:t,source:"component",value:v("component",e.value,t),...n});case"class":return b({name:t,source:"class",value:v("class",e.value,t),...n});default:throw new Error(`QyIcon definition "${t}" has unsupported source "${String(e.source)}".`)}}function v(e,t,n){if(e==="symbol"){if(typeof t!="string"||!/^#[^\s#]+$/.test(t))throw new Error(`QyIcon symbol "${n}" must be a same-document #fragment.`);return t}if(e==="component"){if(typeof t!="object"&&typeof t!="function"||t===null)throw new Error(`QyIcon component "${n}" must be a Vue component.`);return t}if(e!=="class")throw new Error(`QyIcon definition "${n}" has unsupported source "${String(e)}".`);if(typeof t!="string"||!t.trim()||!/^[A-Za-z0-9_:.\/\[\]%-]+(?:\s+[A-Za-z0-9_:.\/\[\]%-]+)*$/.test(t.trim()))throw new Error(`QyIcon class "${n}" must be a trusted static class string.`);return t.trim()}function q(e,t){if(typeof e!="string")throw new Error(`QyIcon label "${t}" must be a string.`);return e}function D(e,t){if(!Array.isArray(e)||e.some(n=>typeof n!="string"))throw new Error(`QyIcon keywords "${t}" must be strings.`);return Object.freeze([...e])}function b(e){return e.keywords&&!Object.isFrozen(e.keywords)&&(e={...e,keywords:Object.freeze([...e.keywords])}),Object.freeze(e)}function Q(e){return b({...e,...e.keywords?{keywords:[...e.keywords]}:{}})}const P=["role","aria-label","aria-hidden","data-qy-icon-missing"],L={key:1,"aria-hidden":"true",focusable:"false"},T=["href","xlink:href"],V=r.defineComponent({name:"QyIcon",inheritAttrs:!1,__name:"index",props:{name:{},icon:{},size:{default:"1em"},color:{default:"currentColor"},spin:{type:Boolean,default:!1},label:{}},setup(e){const t=e,n=r.useAttrs(),c=r.useSlots(),i=r.inject(I,null),g=r.computed(()=>t.icon?r.markRaw(r.toRaw(t.icon)):void 0),f=r.computed(()=>t.name===void 0||t.name===null?"":d(t.name)),a=r.computed(()=>{if(!(t.icon||!i||!f.value))return i.resolve(f.value)}),s=r.ref(null),u=r.computed(()=>!!(!t.icon&&f.value&&!a.value)),l=r.computed(()=>{const o=typeof t.label=="string"?t.label.trim():"";if(o)return o;const y=n["aria-label"];return R(y)?String(y):""}),w=r.computed(()=>l.value?"img":n.role),m=r.computed(()=>O(t.size)),$=r.computed(()=>({width:m.value,height:m.value,fontSize:m.value,color:t.color||"currentColor"})),S=r.computed(()=>{const o={};for(const[y,h]of Object.entries(n))A(y)&&(o[y]=h);return o}),j=r.computed(()=>Object.freeze({name:f.value}));r.watchEffect(()=>{const o=a.value;s.value&&(o==null?void 0:o.source)==="symbol"&&(s.value.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o.value),s.value.setAttribute("xlink:href",o.value))}),r.watchEffect(()=>{});function O(o){return typeof o=="number"?Number.isFinite(o)&&o>0?`${o}px`:"1em":o.trim()||"1em"}function R(o){return typeof o=="string"?o.trim().length>0:o!=null&&o!==!1}function A(o){return o!=="class"&&o!=="style"&&o!=="role"&&o!=="aria-label"&&o!=="aria-hidden"&&o!=="data-qy-icon-missing"&&(o==="id"||o==="title"||o.startsWith("data-")||o.startsWith("aria-"))}return(o,y)=>{var h,k,_;return r.openBlock(),r.createElementBlock("span",r.mergeProps(S.value,{class:["qy-icon",[r.unref(n).class,{"is-spin":t.spin}]],style:[r.unref(n).style,$.value],role:w.value,"aria-label":l.value||void 0,"aria-hidden":l.value?void 0:"true","data-qy-icon-missing":u.value?f.value:void 0}),[g.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(g.value),{key:0,"aria-hidden":"true"})):((h=a.value)==null?void 0:h.source)==="symbol"?(r.openBlock(),r.createElementBlock("svg",L,[r.createElementVNode("use",{ref_key:"symbolElement",ref:s,href:a.value.value,"xlink:href":a.value.value},null,8,T)])):((k=a.value)==null?void 0:k.source)==="component"?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.value.value),{key:2,"aria-hidden":"true"})):((_=a.value)==null?void 0:_.source)==="class"?(r.openBlock(),r.createElementBlock("span",{key:3,class:r.normalizeClass(["qy-icon__class",a.value.value]),"aria-hidden":"true"},null,2)):u.value&&r.unref(c).fallback?r.renderSlot(o.$slots,"fallback",r.normalizeProps(r.guardReactiveProps(j.value)),void 0,!0,4):r.createCommentVNode("",!0)],16,P)}}}),Y=N._export_sfc(V,[["__scopeId","data-v-e4e9c6ae"]]);exports.Icon=Y;exports.QY_ICON_REGISTRY_KEY=I;exports.createQyIconPlugin=B;exports.createQyIconRegistry=z;exports.mergeQyIconRegistries=x;exports.normalizeQyIconName=d;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { configureLoadingRuntime as s, openQyLoading as u } from "@qynpm/hooks";
|
|
2
|
+
import { ElLoading as l } from "element-plus";
|
|
3
|
+
function d(t) {
|
|
4
|
+
const e = l.service({
|
|
5
|
+
target: t.target,
|
|
6
|
+
fullscreen: !t.target,
|
|
7
|
+
text: t.text,
|
|
8
|
+
background: t.maskColor,
|
|
9
|
+
lock: t.lockScroll ?? !1
|
|
10
|
+
});
|
|
11
|
+
return {
|
|
12
|
+
close() {
|
|
13
|
+
e.close();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function c(t) {
|
|
18
|
+
if (t === !0)
|
|
19
|
+
return {
|
|
20
|
+
active: !0,
|
|
21
|
+
options: {}
|
|
22
|
+
};
|
|
23
|
+
if (!t || typeof t != "object" || t.active !== !0)
|
|
24
|
+
return {
|
|
25
|
+
active: !1,
|
|
26
|
+
options: {}
|
|
27
|
+
};
|
|
28
|
+
const { active: e, ...n } = t;
|
|
29
|
+
return {
|
|
30
|
+
active: !0,
|
|
31
|
+
options: n
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function f(t, e) {
|
|
35
|
+
return ["text", "maskColor", "lockScroll"].every((o) => t[o] === e[o]);
|
|
36
|
+
}
|
|
37
|
+
const r = /* @__PURE__ */ new WeakMap();
|
|
38
|
+
function i(t) {
|
|
39
|
+
const e = r.get(t);
|
|
40
|
+
e && (e.handle.close(), r.delete(t));
|
|
41
|
+
}
|
|
42
|
+
function a(t, e) {
|
|
43
|
+
const n = u({
|
|
44
|
+
target: t,
|
|
45
|
+
...e
|
|
46
|
+
});
|
|
47
|
+
r.set(t, {
|
|
48
|
+
handle: n,
|
|
49
|
+
options: e
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const g = {
|
|
53
|
+
mounted(t, e) {
|
|
54
|
+
const n = c(e.value);
|
|
55
|
+
n.active && a(t, n.options);
|
|
56
|
+
},
|
|
57
|
+
updated(t, e) {
|
|
58
|
+
const n = c(e.value), o = r.get(t);
|
|
59
|
+
if (!n.active) {
|
|
60
|
+
i(t);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
o && f(o.options, n.options) || (i(t), a(t, n.options));
|
|
64
|
+
},
|
|
65
|
+
unmounted(t) {
|
|
66
|
+
i(t);
|
|
67
|
+
}
|
|
68
|
+
}, p = {
|
|
69
|
+
install(t) {
|
|
70
|
+
s({
|
|
71
|
+
open: d
|
|
72
|
+
}), t.directive("qy-loading", g);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
p as Q,
|
|
77
|
+
g as v
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./index-AirHUQwm.cjs"),c=require("./install-c8il9DQv.cjs"),t=c.withInstall(n.Icon,"QyIcon");exports.QyIcon=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const v=require("element-plus"),e=require("vue"),z=require("./index-
|
|
1
|
+
"use strict";const v=require("element-plus"),e=require("vue"),z=require("./index-BxvS3vlc.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={class:"qy-table-column-settings"},K={class:"qy-table-column-settings__table-wrap"},L=["data-testid","onClick"],Q={class:"qy-table-column-settings__side","data-testid":"settings-side-actions"},R={class:"qy-table-column-settings__side-main"},W={key:0,class:"qy-table-column-settings__selected is-empty"},j={key:1,class:"qy-table-column-settings__selected"},A={class:"qy-table-column-settings__side-footer"},G=e.defineComponent({name:"QyTableColumnSettings",__name:"index",props:{modelValue:{type:Boolean},settings:{default:()=>[]},defaultSettings:{default:void 0},title:{default:"列设置"},width:{default:"700px"},showDeleteCache:{type:Boolean,default:!0},unconfigurableTypes:{default:()=>["index","selection","expand","setup"]}},emits:["update:modelValue","confirm","reset","cancel","delete-cache","change"],setup(m,{emit:w}){const c=m,u=w,s=e.ref([]),r=e.ref(""),p=l=>l.map(t=>({...t})),h=()=>{var l;s.value=p(c.settings),r.value=((l=s.value[0])==null?void 0:l.key)||""};e.watch(()=>c.modelValue,l=>{l&&h()},{immediate:!0});const b=()=>{u("change",p(s.value))},f=l=>s.value.find(t=>t.key===l),o=e.computed(()=>f(r.value)),d=e.computed(()=>s.value.findIndex(l=>l.key===r.value)),N=l=>!!(l.type&&c.unconfigurableTypes.includes(l.type)),E=l=>l==="left"?"left":l==="right"?"right":"none",x=l=>l.type==="index"?"序号":l.type==="selection"?"多选":l.type==="expand"?"展开":l.type==="setup"?"设置":l.label||l.prop||l.key,V=l=>{l&&(r.value=l.key)},C=l=>{o.value&&q(o.value.key,l)},q=(l,t)=>{const n=f(l);n&&(n.fixed=t,b())},S=(l,t)=>{const n=f(l);!n||N(n)||(n.visible=t,b())},B=(l,t)=>{const n=f(l);n&&(n.width=t,b())},g=(l,t)=>{if(l===t||l<0||l>=s.value.length||t<0||t>=s.value.length)return;const n=[...s.value],[y]=n.splice(l,1);n.splice(t,0,y),s.value=n,r.value=y.key,b()},$=()=>{var t,n;const l=(t=c.defaultSettings)!=null&&t.length?c.defaultSettings:c.settings;s.value=p(l),r.value=((n=s.value[0])==null?void 0:n.key)||"",u("reset",p(s.value)),b()},k=()=>{u("cancel"),u("update:modelValue",!1)},T=()=>{u("confirm",p(s.value)),u("update:modelValue",!1)};return(l,t)=>{const n=v.ElTableColumn,y=v.ElInput,D=v.ElTable,i=v.ElButton,U=v.ElDialog;return e.openBlock(),e.createBlock(U,{"model-value":m.modelValue,title:m.title,width:m.width,"append-to-body":"",onClose:k},{footer:e.withCtx(()=>[e.createVNode(i,{"data-action":"cancel",onClick:k},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode(" 取消 ",-1)])]),_:1}),e.createVNode(i,{type:"primary","data-action":"confirm",onClick:T},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" 确定 ",-1)])]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createElementVNode("div",K,[e.createVNode(D,{data:s.value,"row-key":"key",height:"400px",border:"","highlight-current-row":"","data-testid":"settings-table",onCurrentChange:V,onRowClick:V},{default:e.withCtx(()=>[e.createVNode(n,{label:"列名",prop:"label","show-overflow-tooltip":""},{default:e.withCtx(({row:a})=>[e.createElementVNode("div",{class:"qy-table-column-settings__name","data-testid":`table-row-${a.key}`,onClick:_=>V(a)},[e.createElementVNode("span",{class:e.normalizeClass(["qy-table-column-settings__fixed-mark",`is-${E(a.fixed)}`]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(x(a)),1)],8,L)]),_:1}),e.createVNode(n,{label:"列宽(px)",prop:"width",width:"150"},{default:e.withCtx(({row:a})=>[e.createVNode(y,{"model-value":a.width,size:"small",placeholder:"留空自动设置宽度","data-testid":"width","onUpdate:modelValue":_=>B(a.key,_)},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(n,{label:"列显示",prop:"visible",width:"100"},{default:e.withCtx(({row:a})=>[e.createVNode(z.Switch,{"model-value":a.visible,disabled:N(a),"data-testid":"visible-switch","onUpdate:modelValue":_=>S(a.key,!!_)},null,8,["model-value","disabled","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Q,[e.createElementVNode("div",R,[o.value?(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(x(o.value)),1)):(e.openBlock(),e.createElementBlock("div",W," 请选择列 ")),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===0,"data-action":"top",onClick:t[0]||(t[0]=a=>g(d.value,0))},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-top"},null,-1),e.createElementVNode("span",null,"置顶",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===0,"data-action":"up",onClick:t[1]||(t[1]=a=>g(d.value,d.value-1))},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-up"},null,-1),e.createElementVNode("span",null,"上移",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===s.value.length-1,"data-action":"down",onClick:t[2]||(t[2]=a=>g(d.value,d.value+1))},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-down"},null,-1),e.createElementVNode("span",null,"下移",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===s.value.length-1,"data-action":"bottom",onClick:t[3]||(t[3]=a=>g(d.value,s.value.length-1))},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-bottom"},null,-1),e.createElementVNode("span",null,"置底",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value,"data-action":"fixed-left",onClick:t[4]||(t[4]=a=>C("left"))},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-fixed-left"},null,-1),e.createElementVNode("span",null,"固定左边",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value,"data-action":"fixed-right",onClick:t[5]||(t[5]=a=>C("right"))},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-fixed-right"},null,-1),e.createElementVNode("span",null,"固定右边",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value,"data-action":"clear-fixed",onClick:t[6]||(t[6]=a=>C(!1))},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-clear-fixed"},null,-1),e.createElementVNode("span",null,"取消固定",-1)])]),_:1},8,["disabled"])]),e.createElementVNode("div",A,[e.createVNode(i,{"data-action":"reset",onClick:$},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-reset"},null,-1),e.createElementVNode("span",null,"恢复默认",-1)])]),_:1}),m.showDeleteCache?(e.openBlock(),e.createBlock(i,{key:0,type:"danger",plain:"","data-action":"delete-cache",onClick:t[7]||(t[7]=a=>u("delete-cache"))},{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-reset"},null,-1),e.createElementVNode("span",null,"删除缓存",-1)])]),_:1})):e.createCommentVNode("",!0)])])])]),_:1},8,["model-value","title","width"])}}}),J=F._export_sfc(G,[["__scopeId","data-v-9a39a343"]]);exports.TableColumnSettings=J;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { ref as S, computed as d, watch as Y, onBeforeUnmount as V, defineComponent as A, useSlots as G, inject as K, toRef as P, openBlock as _, createBlock as I, unref as F, withCtx as M, renderSlot as $, createTextVNode as H, toDisplayString as J } from "vue";
|
|
2
|
+
import { B as O } from "./index-seQHtqdh.mjs";
|
|
3
|
+
import { Q as X, I as Z } from "./index-CaNxcPSD.mjs";
|
|
4
|
+
import { useFullscreen as W, useEventListener as D } from "@vueuse/core";
|
|
5
|
+
import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const te = ["fullscreenchange", "webkitfullscreenchange"], le = [
|
|
7
|
+
"requestFullscreen",
|
|
8
|
+
"webkitRequestFullscreen",
|
|
9
|
+
"webkitEnterFullscreen",
|
|
10
|
+
"webkitEnterFullScreen",
|
|
11
|
+
"webkitRequestFullScreen",
|
|
12
|
+
"mozRequestFullScreen",
|
|
13
|
+
"msRequestFullscreen"
|
|
14
|
+
], ne = [
|
|
15
|
+
"exitFullscreen",
|
|
16
|
+
"webkitExitFullscreen",
|
|
17
|
+
"webkitExitFullScreen",
|
|
18
|
+
"webkitCancelFullScreen",
|
|
19
|
+
"mozCancelFullScreen",
|
|
20
|
+
"msExitFullscreen"
|
|
21
|
+
];
|
|
22
|
+
function re(e, l, o) {
|
|
23
|
+
const s = j(), a = S(null), i = S(!1), p = S(!1);
|
|
24
|
+
let r = null, c = !1;
|
|
25
|
+
const b = d(() => C(e.value)), g = d(
|
|
26
|
+
() => (a.value || b.value) ?? void 0
|
|
27
|
+
), x = W(g), w = S(!1);
|
|
28
|
+
function h() {
|
|
29
|
+
w.value = B(a.value || b.value);
|
|
30
|
+
}
|
|
31
|
+
function v() {
|
|
32
|
+
if (c) return;
|
|
33
|
+
const t = z(s), n = a.value || b.value, f = !!(t && t === n);
|
|
34
|
+
f ? a.value = t : (!t || t !== a.value) && (a.value = null), h(), f !== i.value && (i.value = f, o.onChange(f));
|
|
35
|
+
}
|
|
36
|
+
D(s, te, v), Y(e, v, { flush: "post" }), v();
|
|
37
|
+
function E() {
|
|
38
|
+
if (l.value || i.value) return Promise.resolve(!1);
|
|
39
|
+
if (r) return r;
|
|
40
|
+
const t = C(e.value);
|
|
41
|
+
return t ? B(t) ? (a.value = t, h(), y(async () => {
|
|
42
|
+
try {
|
|
43
|
+
return await L(t), v(), i.value && z(s) === t;
|
|
44
|
+
} catch {
|
|
45
|
+
return a.value = null, v(), u("enter", "request-rejected", "The browser rejected the fullscreen request.");
|
|
46
|
+
}
|
|
47
|
+
})) : Promise.resolve(u("enter", "unsupported", "Fullscreen is not supported by this browser.")) : Promise.resolve(u("enter", "target-unavailable", "Fullscreen target is unavailable."));
|
|
48
|
+
}
|
|
49
|
+
function m() {
|
|
50
|
+
if (l.value || !i.value) return Promise.resolve(!1);
|
|
51
|
+
if (r) return r;
|
|
52
|
+
const t = a.value || C(e.value);
|
|
53
|
+
return t ? B(t) ? y(async () => {
|
|
54
|
+
try {
|
|
55
|
+
return await U(t), v(), !i.value && z(s) !== t;
|
|
56
|
+
} catch {
|
|
57
|
+
return u("exit", "request-rejected", "The browser rejected the fullscreen request.");
|
|
58
|
+
}
|
|
59
|
+
}) : Promise.resolve(u("exit", "unsupported", "Fullscreen is not supported by this browser.")) : Promise.resolve(u("exit", "target-unavailable", "Fullscreen target is unavailable."));
|
|
60
|
+
}
|
|
61
|
+
function k() {
|
|
62
|
+
return r || (i.value ? m() : E());
|
|
63
|
+
}
|
|
64
|
+
function y(t) {
|
|
65
|
+
p.value = !0;
|
|
66
|
+
const n = t().finally(() => {
|
|
67
|
+
p.value = !1, r = null;
|
|
68
|
+
});
|
|
69
|
+
return r = n, n;
|
|
70
|
+
}
|
|
71
|
+
function u(t, n, f) {
|
|
72
|
+
const q = Object.freeze({ action: t, code: n, message: f });
|
|
73
|
+
return o.onError(q), !1;
|
|
74
|
+
}
|
|
75
|
+
async function L(t) {
|
|
76
|
+
const n = R(t);
|
|
77
|
+
if (n === "requestFullscreen") {
|
|
78
|
+
await t.requestFullscreen();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (x.isSupported.value) {
|
|
82
|
+
await x.enter();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (n) {
|
|
86
|
+
await Q(t, n);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
throw new Error("Fullscreen request is unavailable.");
|
|
90
|
+
}
|
|
91
|
+
async function U(t) {
|
|
92
|
+
var q;
|
|
93
|
+
const n = s, f = N(n, t);
|
|
94
|
+
if (f === "exitFullscreen") {
|
|
95
|
+
await ((q = n == null ? void 0 : n.exitFullscreen) == null ? void 0 : q.call(n));
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (f) {
|
|
99
|
+
await Q(n, f);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
await x.exit();
|
|
103
|
+
}
|
|
104
|
+
return V(() => {
|
|
105
|
+
c = !0;
|
|
106
|
+
}), {
|
|
107
|
+
isFullscreen: i,
|
|
108
|
+
isSupported: w,
|
|
109
|
+
pending: p,
|
|
110
|
+
enter: E,
|
|
111
|
+
exit: m,
|
|
112
|
+
toggle: k
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function j() {
|
|
116
|
+
return typeof document > "u" ? void 0 : document;
|
|
117
|
+
}
|
|
118
|
+
function C(e) {
|
|
119
|
+
var l;
|
|
120
|
+
return e === null ? null : e !== void 0 ? e : ((l = j()) == null ? void 0 : l.documentElement) || null;
|
|
121
|
+
}
|
|
122
|
+
function z(e) {
|
|
123
|
+
return (e == null ? void 0 : e.fullscreenElement) || (e == null ? void 0 : e.webkitFullscreenElement) || null;
|
|
124
|
+
}
|
|
125
|
+
function B(e) {
|
|
126
|
+
if (!e || e === null) return !1;
|
|
127
|
+
const l = j();
|
|
128
|
+
return (l == null ? void 0 : l.fullscreenEnabled) !== !0 ? !1 : !!(R(e) && N(l, e));
|
|
129
|
+
}
|
|
130
|
+
function R(e) {
|
|
131
|
+
return le.find((l) => T(e, l));
|
|
132
|
+
}
|
|
133
|
+
function N(e, l) {
|
|
134
|
+
return ne.find(
|
|
135
|
+
(o) => T(e, o) || T(l, o)
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
async function Q(e, l) {
|
|
139
|
+
const o = e && e[l];
|
|
140
|
+
if (typeof o != "function") throw new Error("Fullscreen method is unavailable.");
|
|
141
|
+
await o.call(e);
|
|
142
|
+
}
|
|
143
|
+
function T(e, l) {
|
|
144
|
+
return typeof (e == null ? void 0 : e[l]) == "function";
|
|
145
|
+
}
|
|
146
|
+
const se = /* @__PURE__ */ A({
|
|
147
|
+
name: "QyFullscreen",
|
|
148
|
+
inheritAttrs: !1,
|
|
149
|
+
__name: "index",
|
|
150
|
+
props: {
|
|
151
|
+
target: {},
|
|
152
|
+
disabled: { type: Boolean, default: !1 },
|
|
153
|
+
size: { default: "default" },
|
|
154
|
+
enterLabel: { default: "进入全屏" },
|
|
155
|
+
exitLabel: { default: "退出全屏" },
|
|
156
|
+
enterIcon: { default: "fullscreen" },
|
|
157
|
+
exitIcon: { default: "exit-fullscreen" }
|
|
158
|
+
},
|
|
159
|
+
emits: ["change", "error"],
|
|
160
|
+
setup(e, { expose: l, emit: o }) {
|
|
161
|
+
const s = e, a = o, i = G(), p = K(X, null), r = re(P(s, "target"), P(s, "disabled"), {
|
|
162
|
+
onChange: (u) => a("change", u),
|
|
163
|
+
onError: (u) => a("error", u)
|
|
164
|
+
}), c = r.isFullscreen, b = r.pending, g = d(
|
|
165
|
+
() => c.value ? s.exitLabel : s.enterLabel
|
|
166
|
+
), x = d(
|
|
167
|
+
() => c.value ? s.exitIcon : s.enterIcon
|
|
168
|
+
), w = d(
|
|
169
|
+
() => c.value ? "exit-icon" : "enter-icon"
|
|
170
|
+
), h = d(() => !!i[w.value]), v = d(() => p == null ? void 0 : p.resolve(x.value)), E = d(() => h.value || !!v.value), m = d(() => ({ small: "sm", default: "md", large: "lg" })[s.size]), k = d(
|
|
171
|
+
() => s.disabled || !r.isSupported.value || b.value
|
|
172
|
+
);
|
|
173
|
+
function y() {
|
|
174
|
+
r.toggle();
|
|
175
|
+
}
|
|
176
|
+
return l({
|
|
177
|
+
enter: r.enter,
|
|
178
|
+
exit: r.exit,
|
|
179
|
+
toggle: r.toggle
|
|
180
|
+
}), (u, L) => E.value ? (_(), I(O, {
|
|
181
|
+
key: 0,
|
|
182
|
+
class: "qy-fullscreen",
|
|
183
|
+
size: m.value,
|
|
184
|
+
disabled: k.value,
|
|
185
|
+
loading: F(b),
|
|
186
|
+
active: F(c),
|
|
187
|
+
"icon-only": !0,
|
|
188
|
+
"aria-label": g.value,
|
|
189
|
+
"aria-pressed": F(c) ? "true" : "false",
|
|
190
|
+
title: g.value,
|
|
191
|
+
onClick: y
|
|
192
|
+
}, {
|
|
193
|
+
prefix: M(() => [
|
|
194
|
+
h.value ? $(u.$slots, w.value, {}, void 0, !0, 0) : (_(), I(Z, {
|
|
195
|
+
key: 1,
|
|
196
|
+
name: x.value
|
|
197
|
+
}, null, 8, ["name"]))
|
|
198
|
+
]),
|
|
199
|
+
_: 3
|
|
200
|
+
}, 8, ["size", "disabled", "loading", "active", "aria-label", "aria-pressed", "title"])) : (_(), I(O, {
|
|
201
|
+
key: 1,
|
|
202
|
+
class: "qy-fullscreen",
|
|
203
|
+
size: m.value,
|
|
204
|
+
disabled: k.value,
|
|
205
|
+
loading: F(b),
|
|
206
|
+
active: F(c),
|
|
207
|
+
"icon-only": !1,
|
|
208
|
+
"aria-label": g.value,
|
|
209
|
+
"aria-pressed": F(c) ? "true" : "false",
|
|
210
|
+
title: g.value,
|
|
211
|
+
onClick: y
|
|
212
|
+
}, {
|
|
213
|
+
default: M(() => [
|
|
214
|
+
H(J(g.value), 1)
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}, 8, ["size", "disabled", "loading", "active", "aria-label", "aria-pressed", "title"]));
|
|
218
|
+
}
|
|
219
|
+
}), fe = /* @__PURE__ */ ee(se, [["__scopeId", "data-v-4491aa7c"]]);
|
|
220
|
+
export {
|
|
221
|
+
fe as F
|
|
222
|
+
};
|
package/dist/shared/{index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs → index-Bs2OQHXk.mjs}
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { w as A } from "./install-CxBnxbuN.mjs";
|
|
2
|
+
import { defineComponent as E, useAttrs as F, ref as c, computed as K, watch as R, openBlock as U, createBlock as P, unref as v, mergeProps as _, withKeys as j, createSlots as D, withCtx as f, renderSlot as d } from "vue";
|
|
3
|
+
import { ElInput as G } from "element-plus";
|
|
4
|
+
const H = /* @__PURE__ */ E({
|
|
4
5
|
name: "QyInput",
|
|
5
6
|
inheritAttrs: !1,
|
|
6
7
|
__name: "index",
|
|
@@ -22,27 +23,27 @@ const J = /* @__PURE__ */ E({
|
|
|
22
23
|
function r(e) {
|
|
23
24
|
return e == null ? "" : String(e);
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function I(e) {
|
|
26
27
|
return u.removeSpace ? e.replace(/\s+/g, "") : e;
|
|
27
28
|
}
|
|
28
29
|
function m(e, n) {
|
|
29
30
|
return u.trimMode !== n ? e : e.trim();
|
|
30
31
|
}
|
|
31
32
|
function p(e) {
|
|
32
|
-
return
|
|
33
|
+
return I(r(e));
|
|
33
34
|
}
|
|
34
35
|
function s(e) {
|
|
35
36
|
o.value = e, i.value = e, t("update:modelValue", e);
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function $(e) {
|
|
38
39
|
const n = p(e);
|
|
39
40
|
s(n), a.value = n === "" ? "updated" : "none";
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
+
function k(e) {
|
|
42
43
|
const n = p(e);
|
|
43
44
|
o.value = n, t("input", n);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function S(e) {
|
|
46
47
|
const n = m(p(e), "change");
|
|
47
48
|
if (o.value = n, n === "" && a.value === "updated") {
|
|
48
49
|
a.value = "changed", t("change", n);
|
|
@@ -50,20 +51,20 @@ const J = /* @__PURE__ */ E({
|
|
|
50
51
|
}
|
|
51
52
|
n !== i.value && s(n), a.value = n === "" ? "changed" : "none", t("change", n);
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function w(e) {
|
|
54
55
|
t("focus", e);
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function C(e) {
|
|
57
58
|
const n = m(o.value, "blur");
|
|
58
59
|
o.value = n, n !== i.value && s(n), t("blur", e);
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function b() {
|
|
61
62
|
a.value === "none" ? (s(""), t("change", "")) : a.value === "updated" && (a.value = "changed", t("change", "")), a.value = "cleared", t("clear");
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function z(e) {
|
|
64
65
|
t("enter", e);
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
+
function B() {
|
|
67
68
|
var e, n;
|
|
68
69
|
(n = (e = l.value) == null ? void 0 : e.focus) == null || n.call(e);
|
|
69
70
|
}
|
|
@@ -71,39 +72,39 @@ const J = /* @__PURE__ */ E({
|
|
|
71
72
|
var e, n;
|
|
72
73
|
(n = (e = l.value) == null ? void 0 : e.blur) == null || n.call(e);
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function Q() {
|
|
75
76
|
var e, n;
|
|
76
77
|
(n = (e = l.value) == null ? void 0 : e.select) == null || n.call(e);
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
+
function T() {
|
|
79
80
|
var e, n;
|
|
80
81
|
(n = (e = l.value) == null ? void 0 : e.clear) == null || n.call(e);
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function q() {
|
|
83
84
|
var e, n;
|
|
84
85
|
(n = (e = l.value) == null ? void 0 : e.resizeTextarea) == null || n.call(e);
|
|
85
86
|
}
|
|
86
87
|
return V({
|
|
87
88
|
// 暴露 Element Plus 常用输入框方法,方便业务弹窗做聚焦、选中和 textarea 重算高度。
|
|
88
|
-
focus:
|
|
89
|
+
focus: B,
|
|
89
90
|
blur: M,
|
|
90
|
-
select:
|
|
91
|
-
clear:
|
|
92
|
-
resizeTextarea:
|
|
93
|
-
}), (e, n) => (U(), P(v(
|
|
91
|
+
select: Q,
|
|
92
|
+
clear: T,
|
|
93
|
+
resizeTextarea: q
|
|
94
|
+
}), (e, n) => (U(), P(v(G), _({
|
|
94
95
|
ref_key: "inputRef",
|
|
95
96
|
ref: l,
|
|
96
97
|
class: "qy-input"
|
|
97
98
|
}, v(y), {
|
|
98
99
|
"model-value": x.value,
|
|
99
|
-
"onUpdate:modelValue":
|
|
100
|
-
onInput:
|
|
101
|
-
onChange:
|
|
102
|
-
onFocus:
|
|
103
|
-
onBlur:
|
|
104
|
-
onClear:
|
|
105
|
-
onKeydown:
|
|
106
|
-
}),
|
|
100
|
+
"onUpdate:modelValue": $,
|
|
101
|
+
onInput: k,
|
|
102
|
+
onChange: S,
|
|
103
|
+
onFocus: w,
|
|
104
|
+
onBlur: C,
|
|
105
|
+
onClear: b,
|
|
106
|
+
onKeydown: j(z, ["enter"])
|
|
107
|
+
}), D({ _: 2 }, [
|
|
107
108
|
e.$slots.prefix ? {
|
|
108
109
|
name: "prefix",
|
|
109
110
|
fn: f(() => [
|
|
@@ -134,7 +135,8 @@ const J = /* @__PURE__ */ E({
|
|
|
134
135
|
} : void 0
|
|
135
136
|
]), 1040, ["model-value"]));
|
|
136
137
|
}
|
|
137
|
-
});
|
|
138
|
+
}), O = A(H, "QyInput");
|
|
138
139
|
export {
|
|
139
|
-
|
|
140
|
+
O as Q,
|
|
141
|
+
H as _
|
|
140
142
|
};
|