sunyard-szyy-ui 0.7.6 → 0.7.7
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/dist/index.full.js +4 -4
- package/dist/index.full.mjs +1531 -1488
- package/dist/utils/index.cjs +55 -0
- package/dist/utils/index.d.cts +156 -1
- package/dist/utils/index.d.ts +156 -1
- package/dist/utils/index.js +50 -0
- package/es/components/pro-table/index.mjs +1 -1
- package/es/hooks/dist/index.mjs +1 -1
- package/es/index.mjs +3 -3
- package/es/make-installer.mjs +1 -1
- package/es/pro-form/src/ProForm.vue.mjs +1 -1
- package/es/pro-table/src/ProTable.vue.mjs +1 -1
- package/es/pro-table/src/context.d.ts +1 -0
- package/es/pro-table/src/context.d.ts.map +1 -1
- package/es/pro-table/src/hooks/use-pro-table.d.ts.map +1 -1
- package/es/pro-table/src/hooks/use-pro-table.mjs +1 -1
- package/es/pro-table/src/pro-table.d.ts +2 -0
- package/es/pro-table/src/pro-table.d.ts.map +1 -1
- package/es/pro-table/src/pro-table.mjs +1 -1
- package/es/pro-table/src/variants/classic/ClassicLayout.vue.mjs +1 -1
- package/es/pro-table/src/variants/unify/UnifyLayout.vue.mjs +1 -1
- package/es/utils/dist/index.mjs +4 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +2 -2
- package/lib/components/pro-table/index.js +1 -1
- package/lib/hooks/dist/index.js +1 -1
- package/lib/index.js +2 -2
- package/lib/make-installer.js +1 -1
- package/lib/pro-form/src/ProForm.vue.js +1 -1
- package/lib/pro-table/src/ProTable.vue.js +1 -1
- package/lib/pro-table/src/context.d.ts +1 -0
- package/lib/pro-table/src/hooks/use-pro-table.js +1 -1
- package/lib/pro-table/src/pro-table.d.ts +2 -0
- package/lib/pro-table/src/pro-table.js +1 -1
- package/lib/pro-table/src/variants/classic/ClassicLayout.vue.js +1 -1
- package/lib/pro-table/src/variants/unify/UnifyLayout.vue.js +1 -1
- package/lib/utils/dist/index.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +2 -2
- package/package.json +4 -4
package/dist/index.full.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(p,
|
|
2
|
-
* sunyard-szyy-ui v0.7.
|
|
1
|
+
(function(p,m){typeof exports=="object"&&typeof module!="undefined"?m(exports,require("@sunyard-szyy-ui/utils"),require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/adapter"),require("@element-plus/icons-vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","@sunyard-szyy-ui/utils","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/adapter","@element-plus/icons-vue","sortablejs"],m):(p=typeof globalThis!="undefined"?globalThis:p||self,m(p.SunyardSzyyUI={},p.utils,p.Vue,p.hooks,p.adapter,p.iconsVue,p.Sortable))})(this,function(p,m,e,y,d,J,Ve){"use strict";var Ns=Object.defineProperty,Ps=Object.defineProperties;var Bs=Object.getOwnPropertyDescriptors;var xt=Object.getOwnPropertySymbols;var xs=Object.prototype.hasOwnProperty,Ts=Object.prototype.propertyIsEnumerable;var Tt=(p,m,e)=>m in p?Ns(p,m,{enumerable:!0,configurable:!0,writable:!0,value:e}):p[m]=e,x=(p,m)=>{for(var e in m||(m={}))xs.call(m,e)&&Tt(p,e,m[e]);if(xt)for(var e of xt(m))Ts.call(m,e)&&Tt(p,e,m[e]);return p},q=(p,m)=>Ps(p,Bs(m));var Ie=(p,m,e)=>new Promise((y,d)=>{var J=ee=>{try{me(e.next(ee))}catch(fe){d(fe)}},Ve=ee=>{try{me(e.throw(ee))}catch(fe){d(fe)}},me=ee=>ee.done?y(ee.value):Promise.resolve(ee.value).then(J,Ve);me((e=e.apply(p,m)).next())});/*!
|
|
2
|
+
* sunyard-szyy-ui v0.7.7
|
|
3
3
|
* (c) 2026 Sunyard SZYY Base Team
|
|
4
|
-
*/const re=e.defineComponent({name:"SyAutocomplete",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("autocomplete"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},close:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.close)==null?void 0:t.call(n)},highlight:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.highlight)==null?void 0:a.call(t,n)},handleKeyEnter:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleKeyEnter)==null?void 0:t.call(n)},handleSelect:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleSelect)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterAutocomplete,e.mergeProps({ref:l,class:r.b()},c),i)}}),J=S.withInstall(re),ae=e.defineComponent({name:"SyAlert",inheritAttrs:!1,setup(){const o=h.useNamespace("alert"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAlert,e.mergeProps({class:o.b()},s),r)}}),bt=S.withInstall(ae),wt=e.defineComponent({name:"SyBacktop",inheritAttrs:!1,setup(){const o=h.useNamespace("backtop"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterBacktop,e.mergeProps({class:o.b()},s),r)}}),At=S.withInstall(wt),kt=e.defineComponent({name:"SyButton",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("button"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterButton,e.mergeProps({ref:l,class:r.b()},c),i)}}),U=S.withInstall(kt),Nt=e.defineComponent({name:"SyCard",inheritAttrs:!1,setup(){const o=h.useNamespace("card"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCard,e.mergeProps({class:o.b()},s),r)}}),Pt=S.withInstall(Nt),Bt=e.defineComponent({name:"SyCascader",inheritAttrs:!1,setup(){const o=h.useNamespace("cascader"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCascader,e.mergeProps({class:o.b()},s),r)}}),Re=S.withInstall(Bt),xt=e.defineComponent({name:"SyCheckbox",inheritAttrs:!1,setup(){const o=h.useNamespace("checkbox"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckbox,e.mergeProps({class:o.b()},s),r)}}),Vt=e.defineComponent({name:"SyCheckboxGroup",inheritAttrs:!1,setup(){const o=h.useNamespace("checkbox-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxGroup,e.mergeProps({class:o.b()},s),r)}}),_e=S.withInstall(xt),$e=S.withInstall(Vt),Tt=e.defineComponent({name:"SyCheckboxButton",inheritAttrs:!1,setup(){const o=h.useNamespace("checkbox-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxButton,e.mergeProps({class:o.b()},s),r)}}),It=S.withInstall(Tt),Rt=e.defineComponent({name:"SyColorPicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("color-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({show:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.show)==null?void 0:t.call(n)},hide:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.hide)==null?void 0:t.call(n)},focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterColorPicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),_t=S.withInstall(Rt),$t=e.defineComponent({name:"SyCollapse",inheritAttrs:!1,setup(){const o=h.useNamespace("collapse"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapse,e.mergeProps({class:o.b()},s),r)}}),Dt=e.defineComponent({name:"SyCollapseItem",inheritAttrs:!1,setup(){const o=h.useNamespace("collapse-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapseItem,e.mergeProps({class:o.b()},s),r)}}),Mt=S.withInstall($t),Et=S.withInstall(Dt),Lt=new Set(["SyHeader","SyFooter","ElHeader","ElFooter"]);function Ft(o){return o.some(s=>{var c;const r=(c=s.type)==null?void 0:c.name;return!!r&&Lt.has(r)})}const zt=e.defineComponent({name:"SyContainer",inheritAttrs:!1,setup(){const o=h.useNamespace("container"),s=e.useAttrs(),r=e.useSlots();return()=>{const c={class:o.b()};if(!("direction"in s)&&r.default){const i=r.default();Ft(i)&&(c.direction="vertical")}return e.h(d.AdapterContainer,e.mergeProps(c,s),r)}}}),Ot=e.defineComponent({name:"SyHeader",inheritAttrs:!1,setup(){const o=h.useNamespace("header"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterHeader,e.mergeProps({class:o.b()},s),r)}}),qt=e.defineComponent({name:"SyAside",inheritAttrs:!1,setup(){const o=h.useNamespace("aside"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAside,e.mergeProps({class:o.b()},s),r)}}),Ht=e.defineComponent({name:"SyMain",inheritAttrs:!1,setup(){const o=h.useNamespace("main"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMain,e.mergeProps({class:o.b()},s),r)}}),jt=e.defineComponent({name:"SyFooter",inheritAttrs:!1,setup(){const o=h.useNamespace("footer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterFooter,e.mergeProps({class:o.b()},s),r)}}),Ut=S.withInstall(zt),Kt=S.withInstall(Ot),Gt=S.withInstall(qt),Wt=S.withInstall(Ht),Qt=S.withInstall(jt),Yt=e.defineComponent({name:"SyConfigProvider",inheritAttrs:!1,setup(o,{expose:s}){const r=e.useAttrs(),c=e.useSlots(),i=e.ref();return s({}),()=>e.h(d.AdapterConfigProvider,e.mergeProps({ref:i},r),c)}}),Jt=S.withInstall(Yt),Zt=e.defineComponent({name:"SyDatePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("date-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),De=S.withInstall(Zt),Xt=e.defineComponent({name:"SyDateTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("date-time-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b(),type:"datetime"},c),i)}}),vt=S.withInstall(Xt),en=e.defineComponent({name:"SyDescriptions",inheritAttrs:!1,setup(){const o=h.useNamespace("descriptions"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptions,e.mergeProps({class:o.b()},s),r)}}),tn=e.defineComponent({name:"ElDescriptionsItem",inheritAttrs:!1,setup(){const o=h.useNamespace("descriptions-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptionsItem,e.mergeProps({class:o.b()},s),r)}}),nn=S.withInstall(en),on=S.withInstall(tn,"SyDescriptionsItem"),sn=e.defineComponent({name:"SyDialog",inheritAttrs:!1,setup(){const o=h.useNamespace("dialog"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDialog,e.mergeProps({class:o.b()},s),r)}}),rn=S.withInstall(sn),an=e.defineComponent({name:"SyDivider",inheritAttrs:!1,setup(){const o=h.useNamespace("divider"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDivider,e.mergeProps({class:o.b()},s),r)}}),ln=S.withInstall(an),cn=e.defineComponent({name:"SyDrawer",inheritAttrs:!1,setup(){const o=h.useNamespace("drawer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDrawer,e.mergeProps({class:o.b()},s),r)}}),Me=S.withInstall(cn),dn=e.defineComponent({name:"SyDropdown",inheritAttrs:!1,setup(){const o=h.useNamespace("dropdown"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdown,e.mergeProps({class:o.b()},s),r)}}),pn=e.defineComponent({name:"SyDropdownMenu",inheritAttrs:!1,setup(){const o=h.useNamespace("dropdown-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownMenu,e.mergeProps({class:o.b()},s),r)}}),mn=e.defineComponent({name:"SyDropdownItem",inheritAttrs:!1,setup(){const o=h.useNamespace("dropdown-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownItem,e.mergeProps({class:o.b()},s),r)}}),fn=S.withInstall(dn),un=S.withInstall(pn),hn=S.withInstall(mn),yn=e.defineComponent({name:"SyEmpty",inheritAttrs:!1,setup(){const o=h.useNamespace("empty"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterEmpty,e.mergeProps({class:o.b()},s),r)}}),Ee=S.withInstall(yn),Sn=e.defineComponent({name:"SyForm",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("form"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({validate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validate)==null?void 0:a.call(t,...n)},validateField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validateField)==null?void 0:a.call(t,...n)},resetFields:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.resetFields)==null?void 0:a.call(t,...n)},scrollToField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollToField)==null?void 0:a.call(t,...n)},clearValidate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearValidate)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterForm,e.mergeProps({ref:l,class:r.b()},c),i)}}),gn=e.defineComponent({name:"SyFormItem",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("form-item"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({resetField:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resetField)==null?void 0:t.call(n)},clearValidate:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearValidate)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterFormItem,e.mergeProps({ref:l,class:r.b()},c),i)}}),Le=S.withInstall(Sn),Fe=S.withInstall(gn),Cn=e.defineComponent({name:"SyIcon",inheritAttrs:!1,setup(){const o=e.useAttrs(),s=e.useSlots();return()=>e.h(d.AdapterIcon,e.mergeProps(o),s)}}),le=S.withInstall(Cn),bn=e.defineComponent({name:"SyImage",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("image"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({showPreview:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.showPreview)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterImage,e.mergeProps({ref:l,class:r.b()},c),i)}}),wn=S.withInstall(bn),An=e.defineComponent({name:"SyInput",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("input"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},clear:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clear)==null?void 0:t.call(n)},select:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.select)==null?void 0:t.call(n)},resizeTextarea:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resizeTextarea)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInput,e.mergeProps({ref:l,class:r.b()},c),i)}}),ke=S.withInstall(An),kn=e.defineComponent({name:"SyInputNumber",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("input-number"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInputNumber,e.mergeProps({ref:l,class:r.b()},c),i)}}),ze=S.withInstall(kn),Nn=e.defineComponent({name:"SyRow",inheritAttrs:!1,setup(){const o=h.useNamespace("row"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRow,e.mergeProps({class:o.b()},s),r)}}),Pn=e.defineComponent({name:"SyCol",inheritAttrs:!1,setup(){const o=h.useNamespace("col"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCol,e.mergeProps({class:o.b()},s),r)}}),Bn=S.withInstall(Nn),xn=S.withInstall(Pn),Vn=e.defineComponent({name:"SyLink",inheritAttrs:!1,setup(){const o=h.useNamespace("link"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterLink,e.mergeProps({class:o.b()},s),r)}}),Tn=S.withInstall(Vn),Z="sy-loading",Ne="element-loading-custom-class";function In(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function Rn(o){if(o==null||o==="")return Z;const s=String(e.unref(o));return s.includes(Z)?s:`${Z} ${s}`}function _n(o){if(o===void 0)return{customClass:Z};const s=B({},o),r=s.customClass;return r===void 0?s.customClass=Z:typeof r=="string"&&(s.customClass=`${Z} ${r}`),s}function Oe(o,s){if(!s.value)return s;if(In(s.value))return O(B({},s),{value:O(B({},s.value),{customClass:Rn(s.value.customClass)})});const r=o.getAttribute(Ne);return r?r.includes(Z)||o.setAttribute(Ne,`${Z} ${r}`):o.setAttribute(Ne,Z),s}const W=d.AdapterLoadingDirective,ue=(o,s)=>d.AdapterLoading.service(_n(o),s);Object.defineProperty(ue,"_context",{get(){return d.AdapterLoading.service._context},set(o){d.AdapterLoading.service._context=o}});const he={mounted(o,s,r,c){var i;(i=W.mounted)==null||i.call(W,o,Oe(o,s),r,c)},updated(o,s,r,c){var i;(i=W.updated)==null||i.call(W,o,Oe(o,s),r,c)},unmounted(o,s,r,c){var i;(i=W.unmounted)==null||i.call(W,o,s,r,c)},get _context(){return W._context},set _context(o){W._context=o}},$n={install(o){ue._context=o._context,he._context=o._context,o.directive("loading",he),o.config.globalProperties.$loading=ue},directive:he,service:ue},Dn=e.defineComponent({name:"SyMenu",inheritAttrs:!1,setup(){const o=h.useNamespace("menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenu,e.mergeProps({class:o.b()},s),r)}}),Mn=e.defineComponent({name:"SySubMenu",inheritAttrs:!1,setup(){const o=h.useNamespace("sub-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSubMenu,e.mergeProps({class:o.b()},s),r)}}),En=e.defineComponent({name:"SyMenuItem",inheritAttrs:!1,setup(){const o=h.useNamespace("menu-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItem,e.mergeProps({class:o.b()},s),r)}}),Ln=e.defineComponent({name:"SyMenuItemGroup",inheritAttrs:!1,setup(){const o=h.useNamespace("menu-item-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItemGroup,e.mergeProps({class:o.b()},s),r)}}),Fn=S.withInstall(Dn),zn=S.withInstall(Mn),On=S.withInstall(En),qn=S.withInstall(Ln),ye="sy-message";function ce(o){if(o===void 0)return{customClass:ye};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:ye};const s=o;return O(B({},s),{customClass:s.customClass?`${ye} ${s.customClass}`:ye})}const Pe=(o,s)=>d.AdapterMessage(ce(o),s);Pe.closeAll=o=>d.AdapterMessage.closeAll(o),Pe.closeAllByPlacement=o=>d.AdapterMessage.closeAllByPlacement(o);const ne=Pe;ne.success=(o,s)=>d.AdapterMessage.success(ce(o),s),ne.warning=(o,s)=>d.AdapterMessage.warning(ce(o),s),ne.info=(o,s)=>d.AdapterMessage.info(ce(o),s),ne.error=(o,s)=>d.AdapterMessage.error(ce(o),s),Object.defineProperty(ne,"_context",{get(){return d.AdapterMessage._context},set(o){d.AdapterMessage._context=o}});const Be="sy-message-box";function Se(o){return o?O(B({},o),{customClass:o.customClass?`${Be} ${o.customClass}`:Be}):{customClass:Be}}const ie=(o,s)=>d.AdapterMessageBox(Se(o),s);ie.alert=(...o)=>{const[s,r,c,i]=o;return d.AdapterMessageBox.alert(s,r,Se(c),i)},ie.confirm=(...o)=>{const[s,r,c,i]=o;return d.AdapterMessageBox.confirm(s,r,Se(c),i)},ie.prompt=(...o)=>{const[s,r,c,i]=o;return d.AdapterMessageBox.prompt(s,r,Se(c),i)},ie.close=()=>d.AdapterMessageBox.close();const qe=ie;Object.defineProperty(qe,"_context",{get(){return d.AdapterMessageBox._context},set(o){d.AdapterMessageBox._context=o}});const ge="sy-notification";function de(o){if(o===void 0)return{customClass:ge};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:ge};const s=o;return O(B({},s),{customClass:s.customClass?`${ge} ${s.customClass}`:ge})}const oe=(o,s)=>d.AdapterNotification(de(o),s);oe.success=(o,s)=>d.AdapterNotification.success(de(o),s),oe.warning=(o,s)=>d.AdapterNotification.warning(de(o),s),oe.info=(o,s)=>d.AdapterNotification.info(de(o),s),oe.error=(o,s)=>d.AdapterNotification.error(de(o),s),oe.closeAll=()=>d.AdapterNotification.closeAll();const He=oe;Object.defineProperty(He,"_context",{get(){return d.AdapterNotification._context},set(o){d.AdapterNotification._context=o}});const Hn=e.defineComponent({name:"SyPagination",inheritAttrs:!1,setup(){const o=h.useNamespace("pagination"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPagination,e.mergeProps({class:o.b()},s),r)}}),je=S.withInstall(Hn),jn=e.defineComponent({name:"SyPopconfirm",inheritAttrs:!1,setup(){const o=h.useNamespace("popconfirm"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPopconfirm,e.mergeProps({class:o.b()},s),r)}}),Un=S.withInstall(jn);function Kn(o,s){var n;const r=B({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const Gn=e.defineComponent({name:"SyPopover",inheritAttrs:!1,setup(){const o=h.useNamespace("popover"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=Kn(s,o.b());return e.h(d.AdapterPopover,e.mergeProps(c,{popperClass:i}),r)}}}),Wn=S.withInstall(Gn),Qn=e.defineComponent({name:"SyProgress",inheritAttrs:!1,setup(){const o=h.useNamespace("progress"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterProgress,e.mergeProps({class:o.b()},s),r)}}),Yn=S.withInstall(Qn),Jn=e.defineComponent({name:"SyRadio",inheritAttrs:!1,setup(){const o=h.useNamespace("radio"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadio,e.mergeProps({class:o.b()},s),r)}}),Zn=e.defineComponent({name:"SyRadioGroup",inheritAttrs:!1,setup(){const o=h.useNamespace("radio-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioGroup,e.mergeProps({class:o.b()},s),r)}}),xe=S.withInstall(Jn),Ue=S.withInstall(Zn),Xn=e.defineComponent({name:"SyRadioButton",inheritAttrs:!1,setup(){const o=h.useNamespace("radio-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioButton,e.mergeProps({class:o.b()},s),r)}}),Ke=S.withInstall(Xn),vn=e.defineComponent({name:"SyScrollbar",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("scrollbar"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({handleScroll:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleScroll)==null?void 0:t.call(n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,n)},setScrollLeft:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,n)},update:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.update)==null?void 0:t.call(n)},wrapRef:()=>{var n;return(n=l.value)==null?void 0:n.wrapRef}}),()=>e.h(d.AdapterScrollbar,e.mergeProps({ref:l,class:r.b()},c),i)}}),eo=S.withInstall(vn),to=e.defineComponent({name:"SySelect",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),no=e.defineComponent({name:"SyOption",inheritAttrs:!1,setup(){const o=h.useNamespace("option"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterOption,e.mergeProps({class:o.b()},s),r)}}),Ge=S.withInstall(to),We=S.withInstall(no),oo=d.AdapterSelectV2,so=e.defineComponent({name:"SySelectV2",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("select-v2"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},scrollTo:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,n)},toggleMenu:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleMenu)==null?void 0:t.call(n)}}),()=>e.h(oo,e.mergeProps({ref:l,class:r.b()},c),i)}}),ro=S.withInstall(so),ao=e.defineComponent({name:"SySkeleton",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("skeleton"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({get uiLoading(){var n;return(n=l.value)==null?void 0:n.uiLoading}}),()=>e.h(d.AdapterSkeleton,e.mergeProps({ref:l,class:r.b()},c),i)}}),lo=e.defineComponent({name:"SySkeletonItem",inheritAttrs:!1,setup(){const o=h.useNamespace("skeleton-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSkeletonItem,e.mergeProps({class:o.b()},s),r)}}),co=S.withInstall(ao),io=S.withInstall(lo),po=e.defineComponent({name:"SySlider",inheritAttrs:!1,setup(){const o=h.useNamespace("slider"),s=e.useAttrs(),r=e.useSlots(),c=e.ref();return()=>e.h(d.AdapterSlider,e.mergeProps({ref:c,class:o.b()},s),r)}}),mo=S.withInstall(po),fo=e.defineComponent({name:"SySpace",inheritAttrs:!1,setup(){const o=h.useNamespace("space"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSpace,e.mergeProps({class:o.b()},s),r)}}),uo=S.withInstall(fo),ho=e.defineComponent({name:"SySteps",inheritAttrs:!1,setup(){const o=h.useNamespace("steps"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSteps,e.mergeProps({class:o.b()},s),r)}}),yo=e.defineComponent({name:"SyStep",inheritAttrs:!1,setup(){const o=h.useNamespace("step"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterStep,e.mergeProps({class:o.b()},s),r)}}),So=S.withInstall(ho),go=S.withInstall(yo),Co=e.defineComponent({name:"SySwitch",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("switch"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSwitch,e.mergeProps({ref:l,class:r.b()},c),i)}}),Ce=S.withInstall(Co),bo=e.defineComponent({name:"SyTable",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("table"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({clearSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSelection)==null?void 0:t.call(n)},getSelectionRows:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.getSelectionRows)==null?void 0:t.call(n)},toggleRowSelection:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowSelection)==null?void 0:a.call(t,...n)},toggleAllSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleAllSelection)==null?void 0:t.call(n)},toggleRowExpansion:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowExpansion)==null?void 0:a.call(t,...n)},setCurrentRow:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentRow)==null?void 0:a.call(t,...n)},clearSort:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSort)==null?void 0:t.call(n)},clearFilter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFilter)==null?void 0:a.call(t,...n)},doLayout:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.doLayout)==null?void 0:t.call(n)},sort:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.sort)==null?void 0:a.call(t,...n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,...n)},setScrollLeft:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTable,e.mergeProps({ref:l,class:r.b()},c),i)}}),wo=e.defineComponent({name:"SyTableColumn",inheritAttrs:!1,setup(){const o=h.useNamespace("table-column"),s=e.useAttrs(),r=e.useSlots();return()=>{const c=r.default?O(B({},r),{default:(...i)=>{var l;return((l=r.default(...i))!=null?l:[]).map(n=>{var t;return((t=n==null?void 0:n.type)==null?void 0:t.name)==="SyTableColumn"?e.h(d.AdapterTableColumn,n.props,n.children):n})}}):r;return e.h(d.AdapterTableColumn,e.mergeProps({class:o.b()},s),c)}}}),Ve=S.withInstall(bo),Y=S.withInstall(wo),Ao=e.defineComponent({name:"SyTabs",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tabs"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({get currentName(){var n;return(n=l.value)==null?void 0:n.currentName},get tabNavRef(){var n;return(n=l.value)==null?void 0:n.tabNavRef}}),()=>e.h(d.AdapterTabs,e.mergeProps({ref:l,class:r.b()},c),i)}}),ko=e.defineComponent({name:"SyTabPane",inheritAttrs:!1,setup(){const o=h.useNamespace("tab-pane"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterTabPane,e.mergeProps({class:o.b()},s),r)}}),No=S.withInstall(Ao),Po=S.withInstall(ko),Bo=e.defineComponent({name:"SyTag",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tag"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({ref:()=>l.value}),()=>e.h(d.AdapterTag,e.mergeProps({ref:l,class:r.b()},c),i)}}),be=S.withInstall(Bo),xo=e.defineComponent({name:"SyText",inheritAttrs:!1,setup(){const o=h.useNamespace("text"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterText,e.mergeProps({class:o.b()},s),r)}}),Vo=S.withInstall(xo),To=e.defineComponent({name:"SyTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("time-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimePicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),Qe=S.withInstall(To),Io=e.defineComponent({name:"SyTimeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("time-select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimeSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),Ye=S.withInstall(Io);function Ro(o,s){var n;const r=B({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const _o=e.defineComponent({name:"SyTooltip",inheritAttrs:!1,setup(){const o=h.useNamespace("tooltip"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=Ro(s,o.b());return e.h(d.AdapterTooltip,e.mergeProps(c,{popperClass:i}),r)}}}),pe=S.withInstall(_o),$o=e.defineComponent({name:"SyTree",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tree"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({filter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,...n)},updateKeyChildren:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.updateKeyChildren)==null?void 0:a.call(t,...n)},getCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedNodes)==null?void 0:a.call(t,...n)},getCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedKeys)==null?void 0:a.call(t,...n)},setCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedNodes)==null?void 0:a.call(t,...n)},setCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedKeys)==null?void 0:a.call(t,...n)},setChecked:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setChecked)==null?void 0:a.call(t,...n)},getHalfCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedNodes)==null?void 0:a.call(t,...n)},getHalfCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedKeys)==null?void 0:a.call(t,...n)},getCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentKey)==null?void 0:a.call(t,...n)},getCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentNode)==null?void 0:a.call(t,...n)},setCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentKey)==null?void 0:a.call(t,...n)},setCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentNode)==null?void 0:a.call(t,...n)},getNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getNode)==null?void 0:a.call(t,...n)},remove:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.remove)==null?void 0:a.call(t,...n)},append:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.append)==null?void 0:a.call(t,...n)},insertBefore:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertBefore)==null?void 0:a.call(t,...n)},insertAfter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertAfter)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTree,e.mergeProps({ref:l,class:r.b()},c),i)}}),Do=S.withInstall($o),Mo=e.defineComponent({name:"SyTreeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tree-select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},filter:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,n)},updateKeyChildren:(n,t)=>{var a,g;return(g=(a=l.value)==null?void 0:a.updateKeyChildren)==null?void 0:g.call(a,n,t)}}),()=>e.h(d.AdapterTreeSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),Eo=S.withInstall(Mo),Lo=e.defineComponent({name:"SyUpload",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("upload"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({abort:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.abort)==null?void 0:a.call(t,n)},submit:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.submit)==null?void 0:t.call(n)},clearFiles:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFiles)==null?void 0:a.call(t,n)},handleStart:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleStart)==null?void 0:a.call(t,n)},handleRemove:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleRemove)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterUpload,e.mergeProps({ref:l,class:r.b()},c),i)}}),Fo=S.withInstall(Lo),zo={input:ke,"input-number":ze,"time-picker":Qe,"time-select":Ye,autocomplete:d.AdapterAutocomplete,switch:Ce,slider:d.AdapterSlider,"color-picker":d.AdapterColorPicker},Te={input:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"input-number":o=>({placeholder:o.placeholder,style:"width: 100%"}),"time-picker":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"time-select":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),autocomplete:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),switch:()=>({}),slider:()=>({style:"width: 100%; padding: 0 6px"}),"color-picker":()=>({})};function Oo(o){return o?Object.fromEntries(Object.entries(o).map(([s,r])=>[s.startsWith("on")?s:`on${s[0].toUpperCase()}${s.slice(1)}`,r])):{}}const Je=e.defineComponent({name:"ProFormItem",props:{schema:{type:Object,required:!0},model:{type:Object,required:!0},modelValue:{default:void 0}},emits:["update:modelValue"],setup(o,{emit:s}){const r=e.inject("proTableEnumMap",{value:new Map}),c=e.computed({get:()=>o.modelValue,set:f=>s("update:modelValue",f)}),i=e.computed(()=>{var f,m;return(m=(f=o.schema.fieldNames)==null?void 0:f.label)!=null?m:"label"}),l=e.computed(()=>{var f,m;return(m=(f=o.schema.fieldNames)==null?void 0:f.value)!=null?m:"value"}),n=e.computed(()=>{var f,m;return(m=(f=o.schema.fieldNames)==null?void 0:f.children)!=null?m:"children"}),t=e.computed(()=>{var f;return o.schema.options!=null?o.schema.options:(f=r.value.get(o.schema.field))!=null?f:[]}),a=e.computed(()=>{const{label:f,value:m}={label:i.value,value:l.value};return f==="label"&&m==="value"?t.value:t.value.map(y=>O(B({},y),{label:y[f],value:y[m]}))}),g=e.computed(()=>{const f=B({},o.schema.props),{label:m,value:y,children:x}={label:i.value,value:l.value,children:n.value};return O(B({},f),{props:O(B({},f.props),{label:m,children:x}),nodeKey:y})}),P=e.computed(()=>{const f=B({},o.schema.props),{label:m,value:y,children:x}={label:i.value,value:l.value,children:n.value};return O(B({},f),{props:O(B({},f.props),{label:m,value:y,children:x})})}),N=e.computed(()=>B({},o.schema.props)),R=e.computed(()=>{var m,y,x;const f=(y=(m=o.schema.props)==null?void 0:m.type)!=null?y:"";return["daterange","datetimerange","monthrange","yearrange"].includes(f)||!!((x=o.schema.props)!=null&&x.isRange)}),I=e.computed(()=>{var m,y;if(((m=o.schema.props)==null?void 0:m.placeholder)!=null)return o.schema.props.placeholder;const f=(y=o.schema.component)!=null?y:"input";return["input","input-number","autocomplete"].includes(f)?"请输入":"请选择"}),C=e.computed(()=>{var f;return((f=o.schema.props)==null?void 0:f.clearable)!=null?o.schema.props.clearable:o.schema.defaultValue==null}),A=e.computed(()=>{var m,y,x;const f=B({},o.schema.props);return R.value?O(B({},f),{rangeSeparator:(m=f.rangeSeparator)!=null?m:"至",startPlaceholder:(y=f.startPlaceholder)!=null?y:"开始时间",endPlaceholder:(x=f.endPlaceholder)!=null?x:"结束时间",clearable:C.value}):O(B({},f),{placeholder:I.value,clearable:C.value})});return()=>{var _,T,$,L,E,q,z,u;const{schema:f}=o,m=(_=f.component)!=null?_:"input",y=Oo(f.events),x={modelValue:c.value,"onUpdate:modelValue":b=>c.value=b};if(f.render)return f.render(o.model);if(m==="text")return e.h("span",{class:"sy-pro-form-item__text"},String((T=c.value)!=null?T:""));if(m==="select")return e.h(Ge,O(B(B(B({},x),N.value),y),{placeholder:I.value,clearable:C.value,style:"width: 100%"}),{default:e.withCtx(()=>t.value.map(b=>e.h(We,{key:b[l.value],label:b[i.value],value:b[l.value]})))});if(m==="select-v2")return e.h(d.AdapterSelectV2,O(B(B(B({},x),N.value),y),{placeholder:I.value,clearable:C.value,options:a.value,style:"width: 100%"}));if(m==="tree-select"){const b=(L=($=o.schema.props)==null?void 0:$.data)!=null?L:t.value;return e.h(d.AdapterTreeSelect,O(B(B(B({},x),g.value),y),{placeholder:I.value,clearable:C.value,data:b,style:"width: 100%"}))}if(m==="cascader"){const b=(q=(E=o.schema.props)==null?void 0:E.options)!=null?q:t.value;return e.h(Re,O(B(B(B({},x),P.value),y),{placeholder:I.value,clearable:C.value,options:b,style:"width: 100%"}))}if(m==="radio"||m==="radio-button"){const b=m==="radio"?xe:Ke;return e.h(Ue,B(B(B({},x),N.value),y),{default:()=>t.value.map(k=>e.h(b,{key:k[l.value],value:k[l.value]},{default:()=>String(k[i.value])}))})}if(m==="checkbox")return e.h($e,B(B(B({},x),N.value),y),{default:()=>t.value.map(b=>e.h(_e,{key:b[l.value],value:b[l.value]},{default:()=>String(b[i.value])}))});if(m==="date-picker")return e.h(De,O(B(B(B({},x),A.value),y),{style:"width: 100%"}));const V=zo[m];if(V){const b=(u=(z=Te[m])==null?void 0:z.call(Te,{placeholder:I.value,clearable:C.value}))!=null?u:{};return e.h(V,B(B(B(B({},x),N.value),y),b))}return e.h(ke,O(B(B(B({},x),N.value),y),{placeholder:I.value,clearable:C.value,style:"width: 100%"}))}}}),qo=2,Ho=e.defineComponent({name:"SyProForm",__name:"ProForm",props:{model:{},schema:{},cols:{default:4},labelWidth:{default:"auto"},labelPosition:{default:"right"},disabled:{type:Boolean,default:!1},size:{},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},queryBtnText:{default:"查询"},resetBtnText:{default:"重置"},loading:{type:Boolean,default:!1},collapsible:{type:[Boolean,Number],default:!1},defaultCollapsed:{type:Boolean,default:!0},buttonAlign:{default:"inline"}},emits:["search","reset"],setup(o,{expose:s,emit:r}){const c=e.useSlots(),i=o,l=r;h.useNamespace("pro-form");const n=e.ref(),t=e.ref(i.defaultCollapsed),a=e.ref("xl");function g(){const u=window.innerWidth;return u<768?"xs":u<992?"sm":u<1200?"md":u<1920?"lg":"xl"}function P(){a.value=g()}e.onMounted(()=>{a.value=g(),window.addEventListener("resize",P)}),e.onUnmounted(()=>{window.removeEventListener("resize",P)});const N=e.computed(()=>i.schema.filter(u=>typeof u.hidden=="function"?!u.hidden(i.model):!u.hidden).sort((u,b)=>{var k,M;return((k=u.order)!=null?k:0)-((M=b.order)!=null?M:0)}));function R(u){var k,M,F;const b=a.value;return(F=(M=(k=u[b])==null?void 0:k.span)!=null?M:u.span)!=null?F:1}function I(u){var k,M,F;const b=a.value;return(F=(M=(k=u[b])==null?void 0:k.offset)!=null?M:u.offset)!=null?F:0}const C=e.computed(()=>{var k,M,F,X,se,v;const u=i.cols;if(typeof u=="number")return u;const b=a.value;return(v=(se=(X=(F=(M=(k=u==null?void 0:u[b])!=null?k:u==null?void 0:u.xl)!=null?M:u==null?void 0:u.lg)!=null?F:u==null?void 0:u.md)!=null?X:u==null?void 0:u.sm)!=null?se:u==null?void 0:u.xs)!=null?v:4}),A=e.computed(()=>{const u=i.collapsible;return typeof u=="number"&&u>0?u:1}),f=e.computed(()=>{if(!i.collapsible)return-1;const u=i.buttonAlign==="inline"&&(i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons),b=C.value*A.value-(u?qo:0);if(b<=0)return 0;let k=0;for(let M=0;M<N.value.length;M++){const F=N.value[M];if(k+=R(F)+I(F),k>b)return M}return-1}),m=e.computed(()=>f.value>=0),y=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${C.value}, 1fr)`,gap:"0 16px"}));function x(u){const b=R(u),k=I(u),M={gridColumn:`span ${b}`};return k>0&&(M.marginLeft=`calc(${k/C.value*100}% + ${k*16}px)`),M}const V=e.computed(()=>{const u=C.value,b=N.value,k=i.collapsible&&t.value&&f.value>=0?f.value:b.length;let M=0;for(let F=0;F<k;F++){const X=R(b[F]),se=I(b[F]),v=M+X+se;M=v>=u?v%u:v}return M}),_=e.computed(()=>{const u=V.value;return{gridColumn:`${u===0?1:u+1} / -1`}}),T={left:"flex-start",center:"center",right:"flex-end"},$=e.computed(()=>{var b;const u={display:"flex",alignItems:"center",justifyContent:(b=T[i.buttonAlign])!=null?b:"flex-start",gap:"8px",marginTop:"4px",flexWrap:"wrap"};if(i.buttonAlign==="left"&&i.labelPosition!=="top"){const k=i.labelWidth;k&&k!=="auto"&&(u.paddingLeft=typeof k=="number"?`${k}px`:String(k))}return u}),L=e.computed(()=>i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons);function E(u,b){i.model[u]=b}function q(){var u;(u=n.value)==null||u.validate(b=>{b&&l("search",i.model)})}function z(){var u,b;for(const k of i.schema)E(k.field,(u=k.defaultValue)!=null?u:null);(b=n.value)==null||b.clearValidate(),l("reset",i.model)}return s({formRef:n,validate:u=>{var b;return(b=n.value)==null?void 0:b.validate(u)},validateField:(u,b)=>{var k;return(k=n.value)==null?void 0:k.validateField(u,b)},resetFields:z,clearValidate:u=>{var b;return(b=n.value)==null?void 0:b.clearValidate(u)}}),(u,b)=>(e.openBlock(),e.createBlock(e.unref(Le),{ref_key:"formRef",ref:n,class:"sy-pro-form",model:o.model,"label-width":o.labelWidth,"label-position":o.labelPosition,disabled:o.disabled,size:o.size,onSubmit:b[2]||(b[2]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"sy-pro-form__grid",style:e.normalizeStyle(y.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(k,M)=>{var F;return e.openBlock(),e.createElementBlock(e.Fragment,{key:k.field},[!o.collapsible||!t.value||f.value<0||M<f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item",style:e.normalizeStyle(x(k))},[e.createCommentVNode(" slot 类型:渲染具名插槽,用户自行提供完整的 sy-form-item 内容 "),k.component==="slot"?e.renderSlot(u.$slots,k.field,{key:0,item:k}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 内置组件类型:走原有渲染路径 "),e.createVNode(e.unref(Fe),e.mergeProps({prop:k.field,label:(F=k.label)!=null?F:""},{ref_for:!0},k.labelWidth!=null?{labelWidth:k.labelWidth}:{},{rules:k.rules}),e.createSlots({default:e.withCtx(()=>[e.createVNode(Je,{"model-value":o.model[k.field],schema:k,model:o.model,"onUpdate:modelValue":X=>E(k.field,X)},null,8,["model-value","schema","model","onUpdate:modelValue"])]),_:2},[k.tooltip?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(k.label),1),e.createVNode(e.unref(pe),{content:k.tooltip,placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(le),{class:"sy-pro-form__tip-icon",style:{"margin-left":"4px","vertical-align":"middle",cursor:"pointer"}},{default:e.withCtx(()=>[e.createVNode(e.unref(G.InfoFilled))]),_:1})]),_:1},8,["content"])]),key:"0"}:void 0]),1040,["prop","label","rules"])],2112))],4)):e.createCommentVNode("v-if",!0)],64)}),128)),e.createCommentVNode(" 默认插槽:额外自定义字段 "),e.renderSlot(u.$slots,"default"),e.createCommentVNode(" 按钮区 —— inline 模式:在网格内贴右 "),o.buttonAlign==="inline"&&(L.value||o.collapsible&&m.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item sy-pro-form__buttons",style:e.normalizeStyle(_.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",loading:o.loading,onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:1,onClick:z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&m.value?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",link:"",onClick:b[0]||(b[0]=k=>t.value=!t.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value?"展开":"合并")+" ",1),e.createVNode(e.unref(le),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value?e.unref(G.ArrowDown):e.unref(G.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)],4),e.createCommentVNode(" 按钮区 —— 独立成行模式(left / center / right) "),o.buttonAlign!=="inline"&&(L.value||o.collapsible&&m.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__footer",style:e.normalizeStyle($.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",loading:o.loading,onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:1,onClick:z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&m.value?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",link:"",onClick:b[1]||(b[1]=k=>t.value=!t.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value?"展开":"合并")+" ",1),e.createVNode(e.unref(le),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value?e.unref(G.ArrowDown):e.unref(G.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)]),_:3},8,["model","label-width","label-position","disabled","size"]))}}),Ze=S.withInstall(Ho);function jo(o="id"){const s=e.ref([]),r=e.computed(()=>s.value.length>0),c=e.computed(()=>s.value.map(n=>n[o]));function i(n){s.value=n}function l(){s.value=[]}return{selectedList:s,isSelected:r,selectedListIds:c,selectionChange:i,clearSelection:l}}function Uo(o){const{request:s,params:r,searchParam:c,postData:i,requestError:l,pagination:n=!0,staticData:t,initialPageSize:a}=o,g=e.ref(!1),P=e.ref([]),N=e.reactive({pageNum:1,pageSize:a!=null?a:10,total:0}),R=e.reactive({}),I=e.reactive({}),C=e.computed(()=>{if(!(t!=null&&t.value))return P.value;if(!n)return t.value;const T=(N.pageNum-1)*N.pageSize;return t.value.slice(T,T+N.pageSize)});function A(T,$){for(const[L,E]of Object.entries(T))(E!=null&&E!==""||E===!1||E===0)&&($[L]=E)}function f(){const T={};return A(I,T),c!=null&&c.value&&A(c.value,T),T}function m(){return we(this,null,function*(){var T,$,L;if(t!=null&&t.value){N.total=t.value.length;return}if(s)try{g.value=!0;const E=f(),q=B(B(B({},R),E),(T=r==null?void 0:r.value)!=null?T:{});n&&(q.pageNum=N.pageNum,q.pageSize=N.pageSize);const z=yield s(q);if(!z.success){l==null||l(z);return}let u=($=z.data)!=null?$:[];i&&(u=i(u)),P.value=u,n&&(N.total=(L=z.total)!=null?L:0)}catch(E){l==null||l(E)}finally{g.value=!1}})}function y(){N.pageNum=1,m()}function x(){var T;N.pageNum=1;for(const $ of Object.keys(I))I[$]=(T=R[$])!=null?T:null;m()}function V(T){N.pageSize=T,N.pageNum=1,m()}function _(T){N.pageNum=T,m()}return r&&e.watch(r,()=>m(),{deep:!0}),{loading:g,tableData:P,pageable:N,processTableData:C,searchParam:I,searchInitParam:R,getTableList:m,search:y,reset:x,handleSizeChange:V,handleCurrentChange:_}}function Xe(o){var r;const s=[];for(const c of o)(r=c.children)!=null&&r.length?s.push(c,...Xe(c.children)):s.push(c);return s}function Ko(o,s,r){var st;const c=e.ref(),i=e.ref(),l=e.ref(),n=e.ref(o.type!=="unify"),t=e.ref(null),a=e.computed(()=>e.reactive(Xe(o.columns))),g=e.ref(new Map);function P(w){return we(this,null,function*(){var H;if(!w.enum||!w.prop)return;const D=w.enum;if(typeof D=="function"){g.value.set(w.prop,[]);try{const K=yield D();g.value.set(w.prop,K)}catch(K){}}else g.value.set(w.prop,Array.isArray(D)?D:(H=D.value)!=null?H:[])})}e.provide("proTableEnumMap",g),e.provide("proTableSlots",r);const N=e.computed(()=>a.value.filter(w=>{var D,H;return((D=w.search)==null?void 0:D.component)||((H=w.search)==null?void 0:H.render)}).sort((w,D)=>{var H,K,Q,j;return((K=(H=w.search)==null?void 0:H.order)!=null?K:0)-((j=(Q=D.search)==null?void 0:Q.order)!=null?j:0)})),R=e.computed(()=>N.value.filter(w=>{var D;return!!((D=w.search)!=null&&D.quick)}).sort((w,D)=>{var Q,j,ee,te,me,fe;const H=typeof((Q=w.search)==null?void 0:Q.quick)=="object"&&(ee=(j=w.search)==null?void 0:j.quick.order)!=null?ee:0,K=typeof((te=D.search)==null?void 0:te.quick)=="object"&&(fe=(me=D.search)==null?void 0:me.quick.order)!=null?fe:0;return H-K})),I=e.computed(()=>N.value.map(w=>{var D,H,K,Q,j,ee,te,me,fe,rt,at,lt,ct,it,dt;return{field:(K=(H=(D=w.search)==null?void 0:D.key)!=null?H:w.prop)!=null?K:"",label:w.label,component:(Q=w.search)==null?void 0:Q.component,props:(j=w.search)==null?void 0:j.props,options:(()=>{var pt,mt,ft,ut,ht,yt,St;if(((pt=w.search)==null?void 0:pt.options)!==void 0){const Ie=w.search.options;return Array.isArray(Ie)?Ie:(mt=e.unref(Ie))!=null?mt:void 0}if(!(!w.enum||(ut=(ft=w.search)==null?void 0:ft.component)!=null&&ut.includes("tree")))return typeof w.enum=="function"?(yt=g.value.get((ht=w.prop)!=null?ht:""))!=null?yt:void 0:Array.isArray(w.enum)?w.enum:(St=e.unref(w.enum))!=null?St:void 0})(),fieldNames:w.fieldNames,defaultValue:(ee=w.search)==null?void 0:ee.defaultValue,span:(te=w.search)==null?void 0:te.span,offset:(me=w.search)==null?void 0:me.offset,order:(fe=w.search)==null?void 0:fe.order,render:(rt=w.search)==null?void 0:rt.render,xs:(at=w.search)==null?void 0:at.xs,sm:(lt=w.search)==null?void 0:lt.sm,md:(ct=w.search)==null?void 0:ct.md,lg:(it=w.search)==null?void 0:it.lg,xl:(dt=w.search)==null?void 0:dt.xl}})),C=e.ref({}),A={};function f(){var w,D,H,K,Q;for(const j of Object.keys(C.value))delete C.value[j];for(const j of Object.keys(A))delete A[j];for(const j of N.value){const ee=(H=(D=(w=j.search)==null?void 0:w.key)!=null?D:j.prop)!=null?H:"",te=(Q=(K=j.search)==null?void 0:K.defaultValue)!=null?Q:null;C.value[ee]=te,A[ee]=te}}const{loading:m,processTableData:y,pageable:x,getTableList:V,handleSizeChange:_,handleCurrentChange:T}=Uo({request:o.request,params:e.toRef(o,"params"),searchParam:C,postData:o.postData,requestError:o.requestError,pagination:o.pagination,staticData:e.computed(()=>o.data),initialPageSize:o.pageSize});function $(){Object.assign(x,{pageNum:1}),V(),s("search")}function L(){f(),Object.assign(x,{pageNum:1}),V(),s("reset")}const{selectedList:E,isSelected:q,selectedListIds:z,selectionChange:u,clearSelection:b}=jo(o.rowKey);function k(w){var D;t.value=w[(D=o.rowKey)!=null?D:"id"]}function M(){var w,D;t.value=null,(D=(w=c.value)==null?void 0:w.setCurrentRow)==null||D.call(w,void 0)}function F(w){V()}function X(w){return o.toolButton===!0?!0:o.toolButton===!1?!1:o.toolButton.includes(w)}function se(){n.value=!n.value}function v(){var w,D;(D=(w=l.value)==null?void 0:w.open)==null||D.call(w)}return e.onMounted(()=>we(this,null,function*(){for(const w of a.value)P(w);f(),o.manualRequest||V()})),{props:o,type:(st=o.type)!=null?st:"classic",tableRef:c,formRef:i,colSettingRef:l,flatColumns:a,enumMap:g,searchColumns:N,quickSearchColumns:R,searchSchema:I,searchParam:C,searchInitParam:A,loading:m,tableData:y,pageable:x,selectedList:E,selectedListIds:z,isSelected:q,radio:t,isShowSearch:n,getTableList:V,search:$,reset:L,clearSelection:b,clearRadio:M,handleSizeChange:_,handleCurrentChange:T,onSortChange:F,onRadioChange:k,selectionChange:u,showToolBtn:X,toggleSearch:se,openColSetting:v}}const Go={key:1,style:{color:"var(--el-text-color-placeholder)"}},Wo=e.defineComponent({__name:"ColSetting",props:{columns:{}},setup(o,{expose:s}){const r=o,c=e.ref(!1),i=e.computed(()=>r.columns.filter(a=>{if(a.type&&["selection","index","expand","radio","sort"].includes(a.type))return!1;const g=a.isSetting;return g===void 0||g===!0}));e.computed(()=>i.value.every(a=>a.isShow!==!1)),e.computed(()=>{const a=i.value.length,g=i.value.filter(P=>P.isShow!==!1).length;return g>0&&g<a});const l=new WeakMap;function n(){i.value.forEach(a=>{l.has(a)||l.set(a,{isShow:a.isShow!==!1,sortable:a.sortable})})}function t(){n(),c.value=!0}return s({open:t}),(a,g)=>(e.openBlock(),e.createBlock(e.unref(Me),{modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=P=>c.value=P),title:"列设置",size:"380px","append-to-body":!0,class:"sy-pro-table__col-setting"},{default:e.withCtx(()=>[e.createCommentVNode(" 全选 + 重置 "),e.createCommentVNode(` <div class="sy-pro-table__col-setting-toolbar">
|
|
4
|
+
*/const me=e.defineComponent({name:"SyAutocomplete",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("autocomplete"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},close:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.close)==null?void 0:t.call(n)},highlight:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.highlight)==null?void 0:a.call(t,n)},handleKeyEnter:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleKeyEnter)==null?void 0:t.call(n)},handleSelect:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleSelect)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterAutocomplete,e.mergeProps({ref:l,class:r.b()},i),c)}}),ee=m.withInstall(me),fe=e.defineComponent({name:"SyAlert",inheritAttrs:!1,setup(){const o=y.useNamespace("alert"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAlert,e.mergeProps({class:o.b()},s),r)}}),It=m.withInstall(fe),Vt=e.defineComponent({name:"SyBacktop",inheritAttrs:!1,setup(){const o=y.useNamespace("backtop"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterBacktop,e.mergeProps({class:o.b()},s),r)}}),Rt=m.withInstall(Vt),_t=e.defineComponent({name:"SyButton",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("button"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterButton,e.mergeProps({ref:l,class:r.b()},i),c)}}),W=m.withInstall(_t),$t=e.defineComponent({name:"SyCard",inheritAttrs:!1,setup(){const o=y.useNamespace("card"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCard,e.mergeProps({class:o.b()},s),r)}}),Dt=m.withInstall($t),Mt=e.defineComponent({name:"SyCascader",inheritAttrs:!1,setup(){const o=y.useNamespace("cascader"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCascader,e.mergeProps({class:o.b()},s),r)}}),ze=m.withInstall(Mt),Et=e.defineComponent({name:"SyCheckbox",inheritAttrs:!1,setup(){const o=y.useNamespace("checkbox"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckbox,e.mergeProps({class:o.b()},s),r)}}),Lt=e.defineComponent({name:"SyCheckboxGroup",inheritAttrs:!1,setup(){const o=y.useNamespace("checkbox-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxGroup,e.mergeProps({class:o.b()},s),r)}}),Oe=m.withInstall(Et),qe=m.withInstall(Lt),Ft=e.defineComponent({name:"SyCheckboxButton",inheritAttrs:!1,setup(){const o=y.useNamespace("checkbox-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxButton,e.mergeProps({class:o.b()},s),r)}}),zt=m.withInstall(Ft),Ot=e.defineComponent({name:"SyColorPicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("color-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({show:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.show)==null?void 0:t.call(n)},hide:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.hide)==null?void 0:t.call(n)},focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterColorPicker,e.mergeProps({ref:l,class:r.b()},i),c)}}),qt=m.withInstall(Ot),Ut=e.defineComponent({name:"SyCollapse",inheritAttrs:!1,setup(){const o=y.useNamespace("collapse"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapse,e.mergeProps({class:o.b()},s),r)}}),jt=e.defineComponent({name:"SyCollapseItem",inheritAttrs:!1,setup(){const o=y.useNamespace("collapse-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapseItem,e.mergeProps({class:o.b()},s),r)}}),Ht=m.withInstall(Ut),Kt=m.withInstall(jt),Gt=new Set(["SyHeader","SyFooter","ElHeader","ElFooter"]);function Yt(o){return o.some(s=>{var i;const r=(i=s.type)==null?void 0:i.name;return!!r&&Gt.has(r)})}const Wt=e.defineComponent({name:"SyContainer",inheritAttrs:!1,setup(){const o=y.useNamespace("container"),s=e.useAttrs(),r=e.useSlots();return()=>{const i={class:o.b()};if(!("direction"in s)&&r.default){const c=r.default();Yt(c)&&(i.direction="vertical")}return e.h(d.AdapterContainer,e.mergeProps(i,s),r)}}}),Qt=e.defineComponent({name:"SyHeader",inheritAttrs:!1,setup(){const o=y.useNamespace("header"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterHeader,e.mergeProps({class:o.b()},s),r)}}),Jt=e.defineComponent({name:"SyAside",inheritAttrs:!1,setup(){const o=y.useNamespace("aside"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAside,e.mergeProps({class:o.b()},s),r)}}),Zt=e.defineComponent({name:"SyMain",inheritAttrs:!1,setup(){const o=y.useNamespace("main"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMain,e.mergeProps({class:o.b()},s),r)}}),Xt=e.defineComponent({name:"SyFooter",inheritAttrs:!1,setup(){const o=y.useNamespace("footer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterFooter,e.mergeProps({class:o.b()},s),r)}}),vt=m.withInstall(Wt),en=m.withInstall(Qt),tn=m.withInstall(Jt),nn=m.withInstall(Zt),on=m.withInstall(Xt),sn=e.defineComponent({name:"SyConfigProvider",inheritAttrs:!1,setup(o,{expose:s}){const r=e.useAttrs(),i=e.useSlots(),c=e.ref();return s({}),()=>e.h(d.AdapterConfigProvider,e.mergeProps({ref:c},r),i)}}),rn=m.withInstall(sn),an=e.defineComponent({name:"SyDatePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("date-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ue=m.withInstall(an),ln=e.defineComponent({name:"SyDateTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("date-time-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b(),type:"datetime"},i),c)}}),cn=m.withInstall(ln),dn=e.defineComponent({name:"SyDescriptions",inheritAttrs:!1,setup(){const o=y.useNamespace("descriptions"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptions,e.mergeProps({class:o.b()},s),r)}}),pn=e.defineComponent({name:"ElDescriptionsItem",inheritAttrs:!1,setup(){const o=y.useNamespace("descriptions-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptionsItem,e.mergeProps({class:o.b()},s),r)}}),mn=m.withInstall(dn),fn=m.withInstall(pn,"SyDescriptionsItem"),un=e.defineComponent({name:"SyDialog",inheritAttrs:!1,setup(){const o=y.useNamespace("dialog"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDialog,e.mergeProps({class:o.b()},s),r)}}),hn=m.withInstall(un),Sn=e.defineComponent({name:"SyDivider",inheritAttrs:!1,setup(){const o=y.useNamespace("divider"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDivider,e.mergeProps({class:o.b()},s),r)}}),yn=m.withInstall(Sn),gn=e.defineComponent({name:"SyDrawer",inheritAttrs:!1,setup(){const o=y.useNamespace("drawer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDrawer,e.mergeProps({class:o.b()},s),r)}}),je=m.withInstall(gn),bn=e.defineComponent({name:"SyDropdown",inheritAttrs:!1,setup(){const o=y.useNamespace("dropdown"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdown,e.mergeProps({class:o.b()},s),r)}}),Cn=e.defineComponent({name:"SyDropdownMenu",inheritAttrs:!1,setup(){const o=y.useNamespace("dropdown-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownMenu,e.mergeProps({class:o.b()},s),r)}}),wn=e.defineComponent({name:"SyDropdownItem",inheritAttrs:!1,setup(){const o=y.useNamespace("dropdown-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownItem,e.mergeProps({class:o.b()},s),r)}}),An=m.withInstall(bn),kn=m.withInstall(Cn),Nn=m.withInstall(wn),Pn=e.defineComponent({name:"SyEmpty",inheritAttrs:!1,setup(){const o=y.useNamespace("empty"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterEmpty,e.mergeProps({class:o.b()},s),r)}}),He=m.withInstall(Pn),Bn=e.defineComponent({name:"SyForm",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("form"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({validate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validate)==null?void 0:a.call(t,...n)},validateField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validateField)==null?void 0:a.call(t,...n)},resetFields:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.resetFields)==null?void 0:a.call(t,...n)},scrollToField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollToField)==null?void 0:a.call(t,...n)},clearValidate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearValidate)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterForm,e.mergeProps({ref:l,class:r.b()},i),c)}}),xn=e.defineComponent({name:"SyFormItem",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("form-item"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({resetField:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resetField)==null?void 0:t.call(n)},clearValidate:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearValidate)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterFormItem,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ke=m.withInstall(Bn),Ge=m.withInstall(xn),Tn=e.defineComponent({name:"SyIcon",inheritAttrs:!1,setup(){const o=e.useAttrs(),s=e.useSlots();return()=>e.h(d.AdapterIcon,e.mergeProps(o),s)}}),ue=m.withInstall(Tn),In=e.defineComponent({name:"SyImage",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("image"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({showPreview:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.showPreview)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterImage,e.mergeProps({ref:l,class:r.b()},i),c)}}),Vn=m.withInstall(In),Rn=e.defineComponent({name:"SyInput",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("input"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},clear:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clear)==null?void 0:t.call(n)},select:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.select)==null?void 0:t.call(n)},resizeTextarea:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resizeTextarea)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInput,e.mergeProps({ref:l,class:r.b()},i),c)}}),Re=m.withInstall(Rn),_n=e.defineComponent({name:"SyInputNumber",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("input-number"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInputNumber,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ye=m.withInstall(_n),$n=e.defineComponent({name:"SyRow",inheritAttrs:!1,setup(){const o=y.useNamespace("row"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRow,e.mergeProps({class:o.b()},s),r)}}),Dn=e.defineComponent({name:"SyCol",inheritAttrs:!1,setup(){const o=y.useNamespace("col"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCol,e.mergeProps({class:o.b()},s),r)}}),Mn=m.withInstall($n),En=m.withInstall(Dn),Ln=e.defineComponent({name:"SyLink",inheritAttrs:!1,setup(){const o=y.useNamespace("link"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterLink,e.mergeProps({class:o.b()},s),r)}}),Fn=m.withInstall(Ln),te="sy-loading",_e="element-loading-custom-class";function zn(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function On(o){if(o==null||o==="")return te;const s=String(e.unref(o));return s.includes(te)?s:`${te} ${s}`}function qn(o){if(o===void 0)return{customClass:te};const s=x({},o),r=s.customClass;return r===void 0?s.customClass=te:typeof r=="string"&&(s.customClass=`${te} ${r}`),s}function We(o,s){if(!s.value)return s;if(zn(s.value))return q(x({},s),{value:q(x({},s.value),{customClass:On(s.value.customClass)})});const r=o.getAttribute(_e);return r?r.includes(te)||o.setAttribute(_e,`${te} ${r}`):o.setAttribute(_e,te),s}const Z=d.AdapterLoadingDirective,we=(o,s)=>d.AdapterLoading.service(qn(o),s);Object.defineProperty(we,"_context",{get(){return d.AdapterLoading.service._context},set(o){d.AdapterLoading.service._context=o}});const Ae={mounted(o,s,r,i){var c;(c=Z.mounted)==null||c.call(Z,o,We(o,s),r,i)},updated(o,s,r,i){var c;(c=Z.updated)==null||c.call(Z,o,We(o,s),r,i)},unmounted(o,s,r,i){var c;(c=Z.unmounted)==null||c.call(Z,o,s,r,i)},get _context(){return Z._context},set _context(o){Z._context=o}},Un={install(o){we._context=o._context,Ae._context=o._context,o.directive("loading",Ae),o.config.globalProperties.$loading=we},directive:Ae,service:we},jn=e.defineComponent({name:"SyMenu",inheritAttrs:!1,setup(){const o=y.useNamespace("menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenu,e.mergeProps({class:o.b()},s),r)}}),Hn=e.defineComponent({name:"SySubMenu",inheritAttrs:!1,setup(){const o=y.useNamespace("sub-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSubMenu,e.mergeProps({class:o.b()},s),r)}}),Kn=e.defineComponent({name:"SyMenuItem",inheritAttrs:!1,setup(){const o=y.useNamespace("menu-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItem,e.mergeProps({class:o.b()},s),r)}}),Gn=e.defineComponent({name:"SyMenuItemGroup",inheritAttrs:!1,setup(){const o=y.useNamespace("menu-item-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItemGroup,e.mergeProps({class:o.b()},s),r)}}),Yn=m.withInstall(jn),Wn=m.withInstall(Hn),Qn=m.withInstall(Kn),Jn=m.withInstall(Gn),ke="sy-message";function he(o){if(o===void 0)return{customClass:ke};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:ke};const s=o;return q(x({},s),{customClass:s.customClass?`${ke} ${s.customClass}`:ke})}const $e=(o,s)=>d.AdapterMessage(he(o),s);$e.closeAll=o=>d.AdapterMessage.closeAll(o),$e.closeAllByPlacement=o=>d.AdapterMessage.closeAllByPlacement(o);const de=$e;de.success=(o,s)=>d.AdapterMessage.success(he(o),s),de.warning=(o,s)=>d.AdapterMessage.warning(he(o),s),de.info=(o,s)=>d.AdapterMessage.info(he(o),s),de.error=(o,s)=>d.AdapterMessage.error(he(o),s),Object.defineProperty(de,"_context",{get(){return d.AdapterMessage._context},set(o){d.AdapterMessage._context=o}});const De="sy-message-box";function Ne(o){return o?q(x({},o),{customClass:o.customClass?`${De} ${o.customClass}`:De}):{customClass:De}}const Se=(o,s)=>d.AdapterMessageBox(Ne(o),s);Se.alert=(...o)=>{const[s,r,i,c]=o;return d.AdapterMessageBox.alert(s,r,Ne(i),c)},Se.confirm=(...o)=>{const[s,r,i,c]=o;return d.AdapterMessageBox.confirm(s,r,Ne(i),c)},Se.prompt=(...o)=>{const[s,r,i,c]=o;return d.AdapterMessageBox.prompt(s,r,Ne(i),c)},Se.close=()=>d.AdapterMessageBox.close();const Qe=Se;Object.defineProperty(Qe,"_context",{get(){return d.AdapterMessageBox._context},set(o){d.AdapterMessageBox._context=o}});const Pe="sy-notification";function ye(o){if(o===void 0)return{customClass:Pe};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:Pe};const s=o;return q(x({},s),{customClass:s.customClass?`${Pe} ${s.customClass}`:Pe})}const pe=(o,s)=>d.AdapterNotification(ye(o),s);pe.success=(o,s)=>d.AdapterNotification.success(ye(o),s),pe.warning=(o,s)=>d.AdapterNotification.warning(ye(o),s),pe.info=(o,s)=>d.AdapterNotification.info(ye(o),s),pe.error=(o,s)=>d.AdapterNotification.error(ye(o),s),pe.closeAll=()=>d.AdapterNotification.closeAll();const Je=pe;Object.defineProperty(Je,"_context",{get(){return d.AdapterNotification._context},set(o){d.AdapterNotification._context=o}});const Zn=e.defineComponent({name:"SyPagination",inheritAttrs:!1,setup(){const o=y.useNamespace("pagination"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPagination,e.mergeProps({class:o.b()},s),r)}}),Ze=m.withInstall(Zn),Xn=e.defineComponent({name:"SyPopconfirm",inheritAttrs:!1,setup(){const o=y.useNamespace("popconfirm"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPopconfirm,e.mergeProps({class:o.b()},s),r)}}),vn=m.withInstall(Xn);function eo(o,s){var n;const r=x({},o),i=r.class,c=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,c,i].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const to=e.defineComponent({name:"SyPopover",inheritAttrs:!1,setup(){const o=y.useNamespace("popover"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:i,popperClass:c}=eo(s,o.b());return e.h(d.AdapterPopover,e.mergeProps(i,{popperClass:c}),r)}}}),no=m.withInstall(to),oo=e.defineComponent({name:"SyProgress",inheritAttrs:!1,setup(){const o=y.useNamespace("progress"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterProgress,e.mergeProps({class:o.b()},s),r)}}),so=m.withInstall(oo),ro=e.defineComponent({name:"SyRadio",inheritAttrs:!1,setup(){const o=y.useNamespace("radio"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadio,e.mergeProps({class:o.b()},s),r)}}),ao=e.defineComponent({name:"SyRadioGroup",inheritAttrs:!1,setup(){const o=y.useNamespace("radio-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioGroup,e.mergeProps({class:o.b()},s),r)}}),Me=m.withInstall(ro),Xe=m.withInstall(ao),lo=e.defineComponent({name:"SyRadioButton",inheritAttrs:!1,setup(){const o=y.useNamespace("radio-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioButton,e.mergeProps({class:o.b()},s),r)}}),ve=m.withInstall(lo),co=e.defineComponent({name:"SyScrollbar",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("scrollbar"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({handleScroll:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleScroll)==null?void 0:t.call(n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,n)},setScrollLeft:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,n)},update:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.update)==null?void 0:t.call(n)},wrapRef:()=>{var n;return(n=l.value)==null?void 0:n.wrapRef}}),()=>e.h(d.AdapterScrollbar,e.mergeProps({ref:l,class:r.b()},i),c)}}),io=m.withInstall(co),po=e.defineComponent({name:"SySelect",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("select"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSelect,e.mergeProps({ref:l,class:r.b()},i),c)}}),mo=e.defineComponent({name:"SyOption",inheritAttrs:!1,setup(){const o=y.useNamespace("option"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterOption,e.mergeProps({class:o.b()},s),r)}}),et=m.withInstall(po),tt=m.withInstall(mo),fo=d.AdapterSelectV2,uo=e.defineComponent({name:"SySelectV2",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("select-v2"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},scrollTo:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,n)},toggleMenu:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleMenu)==null?void 0:t.call(n)}}),()=>e.h(fo,e.mergeProps({ref:l,class:r.b()},i),c)}}),ho=m.withInstall(uo),So=e.defineComponent({name:"SySkeleton",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("skeleton"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({get uiLoading(){var n;return(n=l.value)==null?void 0:n.uiLoading}}),()=>e.h(d.AdapterSkeleton,e.mergeProps({ref:l,class:r.b()},i),c)}}),yo=e.defineComponent({name:"SySkeletonItem",inheritAttrs:!1,setup(){const o=y.useNamespace("skeleton-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSkeletonItem,e.mergeProps({class:o.b()},s),r)}}),go=m.withInstall(So),bo=m.withInstall(yo),Co=e.defineComponent({name:"SySlider",inheritAttrs:!1,setup(){const o=y.useNamespace("slider"),s=e.useAttrs(),r=e.useSlots(),i=e.ref();return()=>e.h(d.AdapterSlider,e.mergeProps({ref:i,class:o.b()},s),r)}}),wo=m.withInstall(Co),Ao=e.defineComponent({name:"SySpace",inheritAttrs:!1,setup(){const o=y.useNamespace("space"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSpace,e.mergeProps({class:o.b()},s),r)}}),ko=m.withInstall(Ao),No=e.defineComponent({name:"SySteps",inheritAttrs:!1,setup(){const o=y.useNamespace("steps"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSteps,e.mergeProps({class:o.b()},s),r)}}),Po=e.defineComponent({name:"SyStep",inheritAttrs:!1,setup(){const o=y.useNamespace("step"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterStep,e.mergeProps({class:o.b()},s),r)}}),Bo=m.withInstall(No),xo=m.withInstall(Po),To=e.defineComponent({name:"SySwitch",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("switch"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSwitch,e.mergeProps({ref:l,class:r.b()},i),c)}}),Be=m.withInstall(To),Io=e.defineComponent({name:"SyTable",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("table"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({clearSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSelection)==null?void 0:t.call(n)},getSelectionRows:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.getSelectionRows)==null?void 0:t.call(n)},toggleRowSelection:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowSelection)==null?void 0:a.call(t,...n)},toggleAllSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleAllSelection)==null?void 0:t.call(n)},toggleRowExpansion:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowExpansion)==null?void 0:a.call(t,...n)},setCurrentRow:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentRow)==null?void 0:a.call(t,...n)},clearSort:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSort)==null?void 0:t.call(n)},clearFilter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFilter)==null?void 0:a.call(t,...n)},doLayout:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.doLayout)==null?void 0:t.call(n)},sort:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.sort)==null?void 0:a.call(t,...n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,...n)},setScrollLeft:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTable,e.mergeProps({ref:l,class:r.b()},i),c)}}),Vo=e.defineComponent({name:"SyTableColumn",inheritAttrs:!1,setup(){const o=y.useNamespace("table-column"),s=e.useAttrs(),r=e.useSlots();return()=>{const i=r.default?q(x({},r),{default:(...c)=>{var l;return((l=r.default(...c))!=null?l:[]).map(n=>{var t;return((t=n==null?void 0:n.type)==null?void 0:t.name)==="SyTableColumn"?e.h(d.AdapterTableColumn,n.props,n.children):n})}}):r;return e.h(d.AdapterTableColumn,e.mergeProps({class:o.b()},s),i)}}}),Ee=m.withInstall(Io),v=m.withInstall(Vo),Ro=e.defineComponent({name:"SyTabs",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tabs"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({get currentName(){var n;return(n=l.value)==null?void 0:n.currentName},get tabNavRef(){var n;return(n=l.value)==null?void 0:n.tabNavRef}}),()=>e.h(d.AdapterTabs,e.mergeProps({ref:l,class:r.b()},i),c)}}),_o=e.defineComponent({name:"SyTabPane",inheritAttrs:!1,setup(){const o=y.useNamespace("tab-pane"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterTabPane,e.mergeProps({class:o.b()},s),r)}}),$o=m.withInstall(Ro),Do=m.withInstall(_o),Mo=e.defineComponent({name:"SyTag",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tag"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({ref:()=>l.value}),()=>e.h(d.AdapterTag,e.mergeProps({ref:l,class:r.b()},i),c)}}),xe=m.withInstall(Mo),Eo=e.defineComponent({name:"SyText",inheritAttrs:!1,setup(){const o=y.useNamespace("text"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterText,e.mergeProps({class:o.b()},s),r)}}),Lo=m.withInstall(Eo),Fo=e.defineComponent({name:"SyTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("time-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimePicker,e.mergeProps({ref:l,class:r.b()},i),c)}}),nt=m.withInstall(Fo),zo=e.defineComponent({name:"SyTimeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("time-select"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimeSelect,e.mergeProps({ref:l,class:r.b()},i),c)}}),ot=m.withInstall(zo);function Oo(o,s){var n;const r=x({},o),i=r.class,c=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,c,i].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const qo=e.defineComponent({name:"SyTooltip",inheritAttrs:!1,setup(){const o=y.useNamespace("tooltip"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:i,popperClass:c}=Oo(s,o.b());return e.h(d.AdapterTooltip,e.mergeProps(i,{popperClass:c}),r)}}}),ge=m.withInstall(qo),Uo=e.defineComponent({name:"SyTree",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tree"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({filter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,...n)},updateKeyChildren:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.updateKeyChildren)==null?void 0:a.call(t,...n)},getCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedNodes)==null?void 0:a.call(t,...n)},getCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedKeys)==null?void 0:a.call(t,...n)},setCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedNodes)==null?void 0:a.call(t,...n)},setCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedKeys)==null?void 0:a.call(t,...n)},setChecked:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setChecked)==null?void 0:a.call(t,...n)},getHalfCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedNodes)==null?void 0:a.call(t,...n)},getHalfCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedKeys)==null?void 0:a.call(t,...n)},getCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentKey)==null?void 0:a.call(t,...n)},getCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentNode)==null?void 0:a.call(t,...n)},setCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentKey)==null?void 0:a.call(t,...n)},setCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentNode)==null?void 0:a.call(t,...n)},getNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getNode)==null?void 0:a.call(t,...n)},remove:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.remove)==null?void 0:a.call(t,...n)},append:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.append)==null?void 0:a.call(t,...n)},insertBefore:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertBefore)==null?void 0:a.call(t,...n)},insertAfter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertAfter)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTree,e.mergeProps({ref:l,class:r.b()},i),c)}}),jo=m.withInstall(Uo),Ho=e.defineComponent({name:"SyTreeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tree-select"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},filter:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,n)},updateKeyChildren:(n,t)=>{var a,b;return(b=(a=l.value)==null?void 0:a.updateKeyChildren)==null?void 0:b.call(a,n,t)}}),()=>e.h(d.AdapterTreeSelect,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ko=m.withInstall(Ho),Go=e.defineComponent({name:"SyUpload",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("upload"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({abort:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.abort)==null?void 0:a.call(t,n)},submit:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.submit)==null?void 0:t.call(n)},clearFiles:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFiles)==null?void 0:a.call(t,n)},handleStart:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleStart)==null?void 0:a.call(t,n)},handleRemove:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleRemove)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterUpload,e.mergeProps({ref:l,class:r.b()},i),c)}}),Yo=m.withInstall(Go),Wo={input:Re,"input-number":Ye,"time-picker":nt,"time-select":ot,autocomplete:d.AdapterAutocomplete,switch:Be,slider:d.AdapterSlider,"color-picker":d.AdapterColorPicker},Le={input:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"input-number":o=>({placeholder:o.placeholder,style:"width: 100%"}),"time-picker":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"time-select":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),autocomplete:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),switch:()=>({}),slider:()=>({style:"width: 100%; padding: 0 6px"}),"color-picker":()=>({})};function Qo(o){return o?Object.fromEntries(Object.entries(o).map(([s,r])=>[s.startsWith("on")?s:`on${s[0].toUpperCase()}${s.slice(1)}`,r])):{}}const st=e.defineComponent({name:"ProFormItem",props:{schema:{type:Object,required:!0},model:{type:Object,required:!0},modelValue:{default:void 0}},emits:["update:modelValue"],setup(o,{emit:s}){const r=e.inject("proTableEnumMap",{value:new Map}),i=e.computed({get:()=>o.modelValue,set:h=>s("update:modelValue",h)}),c=e.computed(()=>{var h,f;return(f=(h=o.schema.fieldNames)==null?void 0:h.label)!=null?f:"label"}),l=e.computed(()=>{var h,f;return(f=(h=o.schema.fieldNames)==null?void 0:h.value)!=null?f:"value"}),n=e.computed(()=>{var h,f;return(f=(h=o.schema.fieldNames)==null?void 0:h.children)!=null?f:"children"}),t=e.computed(()=>{var h;return o.schema.options!=null?o.schema.options:(h=r.value.get(o.schema.field))!=null?h:[]}),a=e.computed(()=>{const{label:h,value:f}={label:c.value,value:l.value};return h==="label"&&f==="value"?t.value:t.value.map(S=>q(x({},S),{label:S[h],value:S[f]}))}),b=e.computed(()=>{const h=x({},o.schema.props),{label:f,value:S,children:B}={label:c.value,value:l.value,children:n.value};return q(x({},h),{props:q(x({},h.props),{label:f,children:B}),nodeKey:S})}),N=e.computed(()=>{const h=x({},o.schema.props),{label:f,value:S,children:B}={label:c.value,value:l.value,children:n.value};return q(x({},h),{props:q(x({},h.props),{label:f,value:S,children:B})})}),P=e.computed(()=>x({},o.schema.props)),V=e.computed(()=>{var f,S,B;const h=(S=(f=o.schema.props)==null?void 0:f.type)!=null?S:"";return["daterange","datetimerange","monthrange","yearrange"].includes(h)||!!((B=o.schema.props)!=null&&B.isRange)}),I=e.computed(()=>{var f,S;if(((f=o.schema.props)==null?void 0:f.placeholder)!=null)return o.schema.props.placeholder;const h=(S=o.schema.component)!=null?S:"input";return["input","input-number","autocomplete"].includes(h)?"请输入":"请选择"}),g=e.computed(()=>{var h;return((h=o.schema.props)==null?void 0:h.clearable)!=null?o.schema.props.clearable:o.schema.defaultValue==null}),A=e.computed(()=>{var f,S,B;const h=x({},o.schema.props);return V.value?q(x({},h),{rangeSeparator:(f=h.rangeSeparator)!=null?f:"至",startPlaceholder:(S=h.startPlaceholder)!=null?S:"开始时间",endPlaceholder:(B=h.endPlaceholder)!=null?B:"结束时间",clearable:g.value}):q(x({},h),{placeholder:I.value,clearable:g.value})});return()=>{var F,T,R,E,$,K,U,j;const{schema:h}=o,f=(F=h.component)!=null?F:"input",S=Qo(h.events),B={modelValue:i.value,"onUpdate:modelValue":M=>i.value=M};if(h.render)return h.render(o.model);if(f==="text")return e.h("span",{class:"sy-pro-form-item__text"},String((T=i.value)!=null?T:""));if(f==="select")return e.h(et,q(x(x(x({},B),P.value),S),{placeholder:I.value,clearable:g.value,style:"width: 100%"}),{default:e.withCtx(()=>t.value.map(M=>e.h(tt,{key:M[l.value],label:M[c.value],value:M[l.value]})))});if(f==="select-v2")return e.h(d.AdapterSelectV2,q(x(x(x({},B),P.value),S),{placeholder:I.value,clearable:g.value,options:a.value,style:"width: 100%"}));if(f==="tree-select"){const M=(E=(R=o.schema.props)==null?void 0:R.data)!=null?E:t.value;return e.h(d.AdapterTreeSelect,q(x(x(x({},B),b.value),S),{placeholder:I.value,clearable:g.value,data:M,style:"width: 100%"}))}if(f==="cascader"){const M=(K=($=o.schema.props)==null?void 0:$.options)!=null?K:t.value;return e.h(ze,q(x(x(x({},B),N.value),S),{placeholder:I.value,clearable:g.value,options:M,style:"width: 100%"}))}if(f==="radio"||f==="radio-button"){const M=f==="radio"?Me:ve;return e.h(Xe,x(x(x({},B),P.value),S),{default:()=>t.value.map(G=>e.h(M,{key:G[l.value],value:G[l.value]},{default:()=>String(G[c.value])}))})}if(f==="checkbox")return e.h(qe,x(x(x({},B),P.value),S),{default:()=>t.value.map(M=>e.h(Oe,{key:M[l.value],value:M[l.value]},{default:()=>String(M[c.value])}))});if(f==="date-picker")return e.h(Ue,q(x(x(x({},B),A.value),S),{style:"width: 100%"}));const D=Wo[f];if(D){const M=(j=(U=Le[f])==null?void 0:U.call(Le,{placeholder:I.value,clearable:g.value}))!=null?j:{};return e.h(D,x(x(x(x({},B),P.value),S),M))}return e.h(Re,q(x(x(x({},B),P.value),S),{placeholder:I.value,clearable:g.value,style:"width: 100%"}))}}}),Jo=2,Zo=e.defineComponent({name:"SyProForm",__name:"ProForm",props:{model:{},schema:{},cols:{},labelWidth:{},labelPosition:{},disabled:{type:Boolean,default:!1},size:{},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},queryBtnText:{default:"查询"},resetBtnText:{default:"重置"},loading:{type:Boolean,default:!1},collapsible:{type:[Boolean,Number],default:!1},defaultCollapsed:{type:Boolean,default:!0},buttonAlign:{default:"inline"}},emits:["search","reset"],setup(o,{expose:s,emit:r}){var ce,Te;const i=e.useSlots(),c=o,l=(ce=e.inject(m.SY_UI_CONFIG_KEY,{}).proForm)!=null?ce:{},n=(Te=m.getMasterConfig(m.detectMicroAppName()).proForm)!=null?Te:{},t=e.computed(()=>{var u,k,w;return(w=(k=(u=n.cols)!=null?u:c.cols)!=null?k:l.cols)!=null?w:4}),a=e.computed(()=>{var u,k,w;return(w=(k=(u=n.labelWidth)!=null?u:c.labelWidth)!=null?k:l.labelWidth)!=null?w:"auto"}),b=e.computed(()=>{var u,k,w;return(w=(k=(u=n.labelPosition)!=null?u:c.labelPosition)!=null?k:l.labelPosition)!=null?w:"right"}),N=e.computed(()=>{var u,k;return(k=(u=n.size)!=null?u:c.size)!=null?k:l.size}),P=r;y.useNamespace("pro-form");const V=e.ref(),I=e.ref(c.defaultCollapsed),g=e.ref("xl");function A(){const u=window.innerWidth;return u<768?"xs":u<992?"sm":u<1200?"md":u<1920?"lg":"xl"}function h(){g.value=A()}e.onMounted(()=>{g.value=A(),window.addEventListener("resize",h)}),e.onUnmounted(()=>{window.removeEventListener("resize",h)});const f=e.computed(()=>c.schema.filter(u=>typeof u.hidden=="function"?!u.hidden(c.model):!u.hidden).sort((u,k)=>{var w,L;return((w=u.order)!=null?w:0)-((L=k.order)!=null?L:0)}));function S(u){var w,L,z;const k=g.value;return(z=(L=(w=u[k])==null?void 0:w.span)!=null?L:u.span)!=null?z:1}function B(u){var w,L,z;const k=g.value;return(z=(L=(w=u[k])==null?void 0:w.offset)!=null?L:u.offset)!=null?z:0}const D=e.computed(()=>{var w,L,z,oe,ie,se;const u=t.value;if(typeof u=="number")return u;const k=g.value;return(se=(ie=(oe=(z=(L=(w=u==null?void 0:u[k])!=null?w:u==null?void 0:u.xl)!=null?L:u==null?void 0:u.lg)!=null?z:u==null?void 0:u.md)!=null?oe:u==null?void 0:u.sm)!=null?ie:u==null?void 0:u.xs)!=null?se:4}),F=e.computed(()=>{const u=c.collapsible;return typeof u=="number"&&u>0?u:1}),T=e.computed(()=>{if(!c.collapsible)return-1;const u=c.buttonAlign==="inline"&&(c.showQueryBtn||c.showResetBtn||!!i["extra-buttons"]||!!i.buttons),k=D.value*F.value-(u?Jo:0);if(k<=0)return 0;let w=0;for(let L=0;L<f.value.length;L++){const z=f.value[L];if(w+=S(z)+B(z),w>k)return L}return-1}),R=e.computed(()=>T.value>=0),E=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${D.value}, 1fr)`,gap:"0 16px"}));function $(u){const k=S(u),w=B(u),L={gridColumn:`span ${k}`};return w>0&&(L.marginLeft=`calc(${w/D.value*100}% + ${w*16}px)`),L}const K=e.computed(()=>{const u=D.value,k=f.value,w=c.collapsible&&I.value&&T.value>=0?T.value:k.length;let L=0;for(let z=0;z<w;z++){const oe=S(k[z]),ie=B(k[z]),se=L+oe+ie;L=se>=u?se%u:se}return L}),U=e.computed(()=>{const u=K.value;return{gridColumn:`${u===0?1:u+1} / -1`}}),j={left:"flex-start",center:"center",right:"flex-end"},M=e.computed(()=>{var k;const u={display:"flex",alignItems:"center",justifyContent:(k=j[c.buttonAlign])!=null?k:"flex-start",gap:"8px",marginTop:"4px",flexWrap:"wrap"};if(c.buttonAlign==="left"&&b.value!=="top"){const w=a.value;w&&w!=="auto"&&(u.paddingLeft=typeof w=="number"?`${w}px`:String(w))}return u}),G=e.computed(()=>c.showQueryBtn||c.showResetBtn||!!i["extra-buttons"]||!!i.buttons);function ne(u,k){c.model[u]=k}function le(){var u;(u=V.value)==null||u.validate(k=>{k&&P("search",c.model)})}function re(){var u,k;for(const w of c.schema)ne(w.field,(u=w.defaultValue)!=null?u:null);(k=V.value)==null||k.clearValidate(),P("reset",c.model)}return s({formRef:V,validate:u=>{var k;return(k=V.value)==null?void 0:k.validate(u)},validateField:(u,k)=>{var w;return(w=V.value)==null?void 0:w.validateField(u,k)},resetFields:re,clearValidate:u=>{var k;return(k=V.value)==null?void 0:k.clearValidate(u)}}),(u,k)=>(e.openBlock(),e.createBlock(e.unref(Ke),{ref_key:"formRef",ref:V,class:"sy-pro-form",model:o.model,"label-width":a.value,"label-position":b.value,disabled:o.disabled,size:N.value,onSubmit:k[2]||(k[2]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"sy-pro-form__grid",style:e.normalizeStyle(E.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(w,L)=>{var z;return e.openBlock(),e.createElementBlock(e.Fragment,{key:w.field},[!o.collapsible||!I.value||T.value<0||L<T.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item",style:e.normalizeStyle($(w))},[e.createCommentVNode(" slot 类型:渲染具名插槽,用户自行提供完整的 sy-form-item 内容 "),w.component==="slot"?e.renderSlot(u.$slots,w.field,{key:0,item:w}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 内置组件类型:走原有渲染路径 "),e.createVNode(e.unref(Ge),e.mergeProps({prop:w.field,label:(z=w.label)!=null?z:""},{ref_for:!0},w.labelWidth!=null?{labelWidth:w.labelWidth}:{},{rules:w.rules}),e.createSlots({default:e.withCtx(()=>[e.createVNode(st,{"model-value":o.model[w.field],schema:w,model:o.model,"onUpdate:modelValue":oe=>ne(w.field,oe)},null,8,["model-value","schema","model","onUpdate:modelValue"])]),_:2},[w.tooltip?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(w.label),1),e.createVNode(e.unref(ge),{content:w.tooltip,placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(ue),{class:"sy-pro-form__tip-icon",style:{"margin-left":"4px","vertical-align":"middle",cursor:"pointer"}},{default:e.withCtx(()=>[e.createVNode(e.unref(J.InfoFilled))]),_:1})]),_:1},8,["content"])]),key:"0"}:void 0]),1040,["prop","label","rules"])],2112))],4)):e.createCommentVNode("v-if",!0)],64)}),128)),e.createCommentVNode(" 默认插槽:额外自定义字段 "),e.renderSlot(u.$slots,"default"),e.createCommentVNode(" 按钮区 —— inline 模式:在网格内贴右 "),o.buttonAlign==="inline"&&(G.value||o.collapsible&&R.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item sy-pro-form__buttons",style:e.normalizeStyle(U.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",loading:o.loading,onClick:le},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:1,onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&R.value?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",link:"",onClick:k[0]||(k[0]=w=>I.value=!I.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value?"展开":"合并")+" ",1),e.createVNode(e.unref(ue),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I.value?e.unref(J.ArrowDown):e.unref(J.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)],4),e.createCommentVNode(" 按钮区 —— 独立成行模式(left / center / right) "),o.buttonAlign!=="inline"&&(G.value||o.collapsible&&R.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__footer",style:e.normalizeStyle(M.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",loading:o.loading,onClick:le},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:1,onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&R.value?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",link:"",onClick:k[1]||(k[1]=w=>I.value=!I.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value?"展开":"合并")+" ",1),e.createVNode(e.unref(ue),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I.value?e.unref(J.ArrowDown):e.unref(J.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)]),_:3},8,["model","label-width","label-position","disabled","size"]))}}),rt=m.withInstall(Zo);function Xo(o="id"){const s=e.ref([]),r=e.computed(()=>s.value.length>0),i=e.computed(()=>s.value.map(n=>n[o]));function c(n){s.value=n}function l(){s.value=[]}return{selectedList:s,isSelected:r,selectedListIds:i,selectionChange:c,clearSelection:l}}function vo(o){const{request:s,params:r,searchParam:i,postData:c,requestError:l,pagination:n=!0,staticData:t,initialPageSize:a}=o,b=e.ref(!1),N=e.ref([]),P=e.reactive({pageNum:1,pageSize:a!=null?a:10,total:0}),V=e.reactive({}),I=e.reactive({}),g=e.computed(()=>{if(!(t!=null&&t.value))return N.value;if(!n)return t.value;const T=(P.pageNum-1)*P.pageSize;return t.value.slice(T,T+P.pageSize)});function A(T,R){for(const[E,$]of Object.entries(T))($!=null&&$!==""||$===!1||$===0)&&(R[E]=$)}function h(){const T={};return A(I,T),i!=null&&i.value&&A(i.value,T),T}function f(){return Ie(this,null,function*(){var T,R,E;if(t!=null&&t.value){P.total=t.value.length;return}if(s)try{b.value=!0;const $=h(),K=x(x(x({},V),$),(T=r==null?void 0:r.value)!=null?T:{});n&&(K.pageNum=P.pageNum,K.pageSize=P.pageSize);const U=yield s(K);if(!U.success){l==null||l(U);return}let j=(R=U.data)!=null?R:[];c&&(j=c(j)),N.value=j,n&&(P.total=(E=U.total)!=null?E:0)}catch($){l==null||l($)}finally{b.value=!1}})}function S(){P.pageNum=1,f()}function B(){var T;P.pageNum=1;for(const R of Object.keys(I))I[R]=(T=V[R])!=null?T:null;f()}function D(T){P.pageSize=T,P.pageNum=1,f()}function F(T){P.pageNum=T,f()}return r&&e.watch(r,()=>f(),{deep:!0}),{loading:b,tableData:N,pageable:P,processTableData:g,searchParam:I,searchInitParam:V,getTableList:f,search:S,reset:B,handleSizeChange:D,handleCurrentChange:F}}function at(o){var r;const s=[];for(const i of o)(r=i.children)!=null&&r.length?s.push(i,...at(i.children)):s.push(i);return s}const lt={border:!1,stripe:!1,rowKey:"id",type:"classic",searchCols:4,pageSizes:[10,20,50,100],pageLayout:"total, sizes, prev, pager, next, jumper"};function es(o,s,r){var oe,ie,se,ft;const c=(oe=e.inject(m.SY_UI_CONFIG_KEY,{}).proTable)!=null?oe:{},l=(ie=m.getMasterConfig(m.detectMicroAppName()).proTable)!=null?ie:{},n=new Proxy(o,{get(C,_,H){const Y=l[_];if(Y!==void 0)return Y;const Q=Reflect.get(C,_,H);if(Q!==void 0)return Q;const O=_;if(O in c&&c[O]!==void 0)return c[O];const X=_;if(X in lt)return lt[X]}}),t=n,a=e.ref(),b=e.ref(),N=e.ref(),P=e.ref(t.type!=="unify"),V=e.ref(null),I=e.computed(()=>e.reactive(at(o.columns))),g=e.ref(new Map);function A(C){return Ie(this,null,function*(){var H;if(!C.enum||!C.prop)return;const _=C.enum;if(typeof _=="function"){g.value.set(C.prop,[]);try{const Y=yield _();g.value.set(C.prop,Y)}catch(Y){}}else g.value.set(C.prop,Array.isArray(_)?_:(H=_.value)!=null?H:[])})}e.provide("proTableEnumMap",g),e.provide("proTableSlots",r);const h=e.computed(()=>I.value.filter(C=>{var _,H;return((_=C.search)==null?void 0:_.component)||((H=C.search)==null?void 0:H.render)}).sort((C,_)=>{var H,Y,Q,O;return((Y=(H=C.search)==null?void 0:H.order)!=null?Y:0)-((O=(Q=_.search)==null?void 0:Q.order)!=null?O:0)})),f=e.computed(()=>h.value.filter(C=>{var _;return!!((_=C.search)!=null&&_.quick)}).sort((C,_)=>{var Q,O,X,ae,be,Ce;const H=typeof((Q=C.search)==null?void 0:Q.quick)=="object"&&(X=(O=C.search)==null?void 0:O.quick.order)!=null?X:0,Y=typeof((ae=_.search)==null?void 0:ae.quick)=="object"&&(Ce=(be=_.search)==null?void 0:be.quick.order)!=null?Ce:0;return H-Y})),S=e.computed(()=>h.value.map(C=>{var _,H,Y,Q,O,X,ae,be,Ce,ut,ht,St,yt,gt,bt;return{field:(Y=(H=(_=C.search)==null?void 0:_.key)!=null?H:C.prop)!=null?Y:"",label:C.label,component:(Q=C.search)==null?void 0:Q.component,props:(O=C.search)==null?void 0:O.props,options:(()=>{var Ct,wt,At,kt,Nt,Pt,Bt;if(((Ct=C.search)==null?void 0:Ct.options)!==void 0){const Fe=C.search.options;return Array.isArray(Fe)?Fe:(wt=e.unref(Fe))!=null?wt:void 0}if(!(!C.enum||(kt=(At=C.search)==null?void 0:At.component)!=null&&kt.includes("tree")))return typeof C.enum=="function"?(Pt=g.value.get((Nt=C.prop)!=null?Nt:""))!=null?Pt:void 0:Array.isArray(C.enum)?C.enum:(Bt=e.unref(C.enum))!=null?Bt:void 0})(),fieldNames:C.fieldNames,defaultValue:(X=C.search)==null?void 0:X.defaultValue,span:(ae=C.search)==null?void 0:ae.span,offset:(be=C.search)==null?void 0:be.offset,order:(Ce=C.search)==null?void 0:Ce.order,render:(ut=C.search)==null?void 0:ut.render,xs:(ht=C.search)==null?void 0:ht.xs,sm:(St=C.search)==null?void 0:St.sm,md:(yt=C.search)==null?void 0:yt.md,lg:(gt=C.search)==null?void 0:gt.lg,xl:(bt=C.search)==null?void 0:bt.xl}})),B=e.ref({}),D={};function F(){var C,_,H,Y,Q;for(const O of Object.keys(B.value))delete B.value[O];for(const O of Object.keys(D))delete D[O];for(const O of h.value){const X=(H=(_=(C=O.search)==null?void 0:C.key)!=null?_:O.prop)!=null?H:"",ae=(Q=(Y=O.search)==null?void 0:Y.defaultValue)!=null?Q:null;B.value[X]=ae,D[X]=ae}}const{loading:T,processTableData:R,pageable:E,getTableList:$,handleSizeChange:K,handleCurrentChange:U}=vo({request:o.request,params:e.toRef(o,"params"),searchParam:B,postData:o.postData,requestError:o.requestError,pagination:o.pagination,staticData:e.computed(()=>o.data),initialPageSize:(ft=(se=t.pageSize)!=null?se:c.pageSize)!=null?ft:10});function j(){Object.assign(E,{pageNum:1}),$(),s("search")}function M(){F(),Object.assign(E,{pageNum:1}),$(),s("reset")}const{selectedList:G,isSelected:ne,selectedListIds:le,selectionChange:re,clearSelection:ce}=Xo(t.rowKey);function Te(C){var _;V.value=C[(_=t.rowKey)!=null?_:"id"]}function u(){var C,_;V.value=null,(_=(C=a.value)==null?void 0:C.setCurrentRow)==null||_.call(C,void 0)}function k(C){$()}function w(C){return t.toolButton===!0?!0:t.toolButton===!1?!1:t.toolButton.includes(C)}function L(){P.value=!P.value}function z(){var C,_;(_=(C=N.value)==null?void 0:C.open)==null||_.call(C)}return e.onMounted(()=>Ie(this,null,function*(){for(const C of I.value)A(C);F(),o.manualRequest||$()})),{props:n,type:t.type,tableRef:a,formRef:b,colSettingRef:N,flatColumns:I,enumMap:g,searchColumns:h,quickSearchColumns:f,searchSchema:S,searchParam:B,searchInitParam:D,loading:T,tableData:R,pageable:E,selectedList:G,selectedListIds:le,isSelected:ne,radio:V,isShowSearch:P,getTableList:$,search:j,reset:M,clearSelection:ce,clearRadio:u,handleSizeChange:K,handleCurrentChange:U,onSortChange:k,onRadioChange:Te,selectionChange:re,showToolBtn:w,toggleSearch:L,openColSetting:z}}const ts={key:1,style:{color:"var(--el-text-color-placeholder)"}},ns=e.defineComponent({__name:"ColSetting",props:{columns:{}},setup(o,{expose:s}){const r=o,i=e.ref(!1),c=e.computed(()=>r.columns.filter(a=>{if(a.type&&["selection","index","expand","radio","sort"].includes(a.type))return!1;const b=a.isSetting;return b===void 0||b===!0}));e.computed(()=>c.value.every(a=>a.isShow!==!1)),e.computed(()=>{const a=c.value.length,b=c.value.filter(N=>N.isShow!==!1).length;return b>0&&b<a});const l=new WeakMap;function n(){c.value.forEach(a=>{l.has(a)||l.set(a,{isShow:a.isShow!==!1,sortable:a.sortable})})}function t(){n(),i.value=!0}return s({open:t}),(a,b)=>(e.openBlock(),e.createBlock(e.unref(je),{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=N=>i.value=N),title:"列设置",size:"380px","append-to-body":!0,class:"sy-pro-table__col-setting"},{default:e.withCtx(()=>[e.createCommentVNode(" 全选 + 重置 "),e.createCommentVNode(` <div class="sy-pro-table__col-setting-toolbar">
|
|
5
5
|
<sy-checkbox :model-value="checkAll" :indeterminate="isIndeterminate" @change="onCheckAll"> 全部显示 </sy-checkbox>
|
|
6
6
|
<sy-button type="primary" link @click="onReset">重置</sy-button>
|
|
7
|
-
</div> `),e.createCommentVNode(" 列配置表格 "),e.createVNode(e.unref(Ve),{data:i.value,"row-key":"prop",border:!0,"default-expand-all":"","tree-props":{children:"_children"}},{empty:e.withCtx(()=>[...g[1]||(g[1]=[e.createElementVNode("div",{style:{padding:"24px 0",color:"var(--el-text-color-secondary)","font-size":"13px"}},"暂无可配置列",-1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Y),{prop:"label",label:"列名",align:"left","min-width":"100"},{default:e.withCtx(({row:P})=>{var N,R;return[e.createTextVNode(e.toDisplayString((R=(N=P.label)!=null?N:P.prop)!=null?R:"—"),1)]}),_:1}),e.createVNode(e.unref(Y),{prop:"isShow",label:"显示",align:"center",width:"80"},{default:e.withCtx(({row:P})=>[e.createVNode(e.unref(Ce),{"model-value":P.isShow!==!1,"onUpdate:modelValue":N=>{P.isShow=N}},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(e.unref(Y),{prop:"sortable",label:"排序",align:"center",width:"80"},{default:e.withCtx(({row:P})=>[typeof P.sortable=="boolean"?(e.openBlock(),e.createBlock(e.unref(Ce),{key:0,modelValue:P.sortable,"onUpdate:modelValue":N=>P.sortable=N},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("span",Go,"—"))]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"]))}}),ve=e.defineComponent({__name:"ProTableColSetting",props:{context:{}},setup(o,{expose:s}){const c=o.context.flatColumns,i=e.ref();function l(){var n,t;(t=(n=i.value)==null?void 0:n.open)==null||t.call(n)}return s({open:l}),(n,t)=>(e.openBlock(),e.createBlock(Wo,{ref_key:"innerRef",ref:i,columns:e.unref(c)},null,8,["columns"]))}}),Qo={key:0,class:"sy-pro-table__pagination"},et=e.defineComponent({__name:"ProTablePagination",props:{context:{}},setup(o){const s=o,r=s.context.props,c=s.context.pageable,i=s.context.handleSizeChange,l=s.context.handleCurrentChange;return(n,t)=>e.unref(r).pagination&&e.unref(c).total>0?(e.openBlock(),e.createElementBlock("div",Qo,[e.renderSlot(n.$slots,"pagination",{},()=>[e.createVNode(e.unref(je),{"current-page":e.unref(c).pageNum,"onUpdate:currentPage":t[0]||(t[0]=a=>e.unref(c).pageNum=a),"page-size":e.unref(c).pageSize,"onUpdate:pageSize":t[1]||(t[1]=a=>e.unref(c).pageSize=a),total:e.unref(c).total,"page-sizes":e.unref(r).pageSizes,layout:e.unref(r).pageLayout,background:"",onSizeChange:e.unref(i),onCurrentChange:e.unref(l)},null,8,["current-page","page-size","total","page-sizes","layout","onSizeChange","onCurrentChange"])])])):e.createCommentVNode("v-if",!0)}}),tt=e.defineComponent({__name:"ProTableSearchRenderer",props:{context:{},cols:{default:4},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0}},setup(o,{expose:s}){const r=o,c=r.context.searchParam,i=r.context.searchSchema,l=r.context.search,n=r.context.reset,t=e.ref();return s({validate:a=>{var g,P;return(P=(g=t.value)==null?void 0:g.validate)==null?void 0:P.call(g,a)},resetFields:()=>{var a,g;return(g=(a=t.value)==null?void 0:a.resetFields)==null?void 0:g.call(a)},clearValidate:a=>{var g,P;return(P=(g=t.value)==null?void 0:g.clearValidate)==null?void 0:P.call(g,a)},formRef:t}),(a,g)=>(e.openBlock(),e.createBlock(e.unref(Ze),{ref_key:"innerFormRef",ref:t,model:e.unref(c),schema:e.unref(i),cols:o.cols,"show-query-btn":o.showQueryBtn,"show-reset-btn":o.showResetBtn,collapsible:o.collapsible,onSearch:e.unref(l),onReset:e.unref(n)},null,8,["model","schema","cols","show-query-btn","show-reset-btn","collapsible","onSearch","onReset"]))}}),Yo=e.defineComponent({__name:"ProTableColumn",props:{column:{}},emits:["radioChange"],setup(o){const s=o,r=e.inject("proTableEnumMap",{value:new Map}),c=e.inject("proTableSlots",{}),i=e.computed(()=>{const C=s.column.isShow;return C===void 0?!0:e.unref(C)}),l=e.computed(()=>{var A,f,m,y;const C=s.column.enum;return typeof C=="function"?(f=r.value.get((A=s.column.prop)!=null?A:""))!=null?f:[]:C?e.unref(C):(y=r.value.get((m=s.column.prop)!=null?m:""))!=null?y:[]});function n(C){var x,V;const{fieldNames:A}=s.column,f=(x=A==null?void 0:A.label)!=null?x:"label",m=(V=A==null?void 0:A.value)!=null?V:"value",y=l.value.find(_=>_[m]===C);return y?y[f]:String(C!=null?C:"")}function t(C){var y;const{fieldNames:A}=s.column,f=(y=A==null?void 0:A.value)!=null?y:"value",m=l.value.find(x=>x[f]===C);return(m==null?void 0:m.tagType)||void 0}function a(C){return C.split(".").reduce((f,m,y)=>y===0?f+m:f+m.charAt(0).toUpperCase()+m.slice(1),"")}function g(C){var V;const{column:A}=s;if(A.render)return A.render(C);if(A.type==="expand"){const _="expand";return c[_]?c[_](C):null}const f=(V=A.prop)!=null?V:"",m=C.row[f],y=a(f);if(c[y])return c[y](C);if(A.isFilterEnum!==!1&&l.value.length>0){if(A.tag){const _=t(m);return e.h(be,_?{type:_}:{},()=>n(m))}return e.h("span",{},n(m))}return A.tag?e.h(be,{},()=>String(m!=null?m:"")):e.h("span",{},String(m!=null?m:""))}function P(C){var m,y;const{column:A}=s;if(A.headerRender)return A.headerRender(C);const f=`${a((m=A.prop)!=null?m:"")}Header`;return c[f]?c[f](C):(y=A.label)!=null?y:""}const N=e.defineComponent({name:"ProTableExpandRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>c.expand?c.expand(C.scope):null}}),R=e.defineComponent({name:"ProTableHeaderRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>P(C.scope)}}),I=e.defineComponent({name:"ProTableCellRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>g(C.scope)}});return(C,A)=>{var m;const f=e.resolveComponent("ProTableColumn",!0);return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" 多级表头 "),(m=o.column.children)!=null&&m.length?(e.openBlock(),e.createBlock(e.unref(Y),{key:0,label:o.column.label,align:o.column.align},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.column.children,y=>{var x;return e.openBlock(),e.createBlock(f,{key:(x=y.prop)!=null?x:y.label,column:y},null,8,["column"])}),128))]),_:1},8,["label","align"])):o.column.type&&["selection","index"].includes(o.column.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 特殊列:selection / index(自闭合,无需 slot) "),e.createVNode(e.unref(Y),e.normalizeProps(e.guardReactiveProps(o.column)),null,16)],2112)):o.column.type==="expand"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" expand 列:必须通过 #default slot 提供展开行内容 "),e.createVNode(e.unref(Y),e.normalizeProps(e.guardReactiveProps(o.column)),{default:e.withCtx(y=>[e.createVNode(e.unref(N),{scope:y},null,8,["scope"])]),_:1},16)],2112)):o.column.type==="radio"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createCommentVNode(" radio 列 "),e.createVNode(e.unref(Y),e.mergeProps(o.column,{width:"60",align:"center"}),{default:e.withCtx(y=>[e.createVNode(e.unref(xe),{modelValue:y.row.__radioSelected,"onUpdate:modelValue":x=>y.row.__radioSelected=x,value:!0,onChange:()=>C.$emit("radioChange",y.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},16)],2112)):o.column.type==="sort"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createCommentVNode(" sort 列(拖拽手柄) "),e.createVNode(e.unref(Y),e.mergeProps(o.column,{width:"60",align:"center",label:"排序"}),{default:e.withCtx(()=>[e.createVNode(e.unref(be),{class:"move",style:{cursor:"move"}},{default:e.withCtx(()=>[e.createVNode(e.unref(le),null,{default:e.withCtx(()=>[e.createVNode(e.unref(G.DCaret))]),_:1})]),_:1})]),_:1},16)],2112)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createCommentVNode(" 普通列 "),e.createVNode(e.unref(Y),e.normalizeProps(e.guardReactiveProps(o.column)),{header:e.withCtx(y=>[e.createVNode(e.unref(R),{scope:y},null,8,["scope"])]),default:e.withCtx(y=>[e.createVNode(e.unref(I),{scope:y},null,8,["scope"])]),_:1},16)],2112))],64)):e.createCommentVNode("v-if",!0)}}}),Jo={class:"sy-pro-table__table"},Zo={class:"sy-pro-table__empty"},nt=e.defineComponent({__name:"ProTableTable",props:{context:{},tableHeight:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=e.computed(()=>s.tableHeight),i=s.context.tableRef,l=s.context.loading,n=s.context.tableData,t=s.context.flatColumns,a=s.context.selectionChange,g=s.context.onSortChange,P=s.context.onRadioChange;function N(I){i.value=I}function R(){var A;if(!r.columns.some(f=>f.type==="sort")||!i.value)return;const C=(A=i.value.$el)==null?void 0:A.querySelector("tbody");C&&Ae.create(C,{handle:".move",animation:150,onEnd({newIndex:f,oldIndex:m}){var V;if(f===m)return;const y=n.value,x=y.splice(m,1)[0];y.splice(f,0,x),(V=s.onDragSort)==null||V.call(s,{newIndex:f,oldIndex:m})}})}return e.onMounted(()=>{e.nextTick(()=>R())}),(I,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" wrapper 保证 querySelector 能找到 .sy-pro-table__table,height 直接传给 el-table "),e.createElementVNode("div",Jo,[e.withDirectives((e.openBlock(),e.createBlock(e.unref(Ve),{ref:N,height:c.value,data:e.unref(n),border:e.unref(r).border,stripe:e.unref(r).stripe,"row-key":e.unref(r).rowKey,size:e.unref(r).size,"highlight-current-row":e.unref(r).highlightCurrentRow,onSelectionChange:e.unref(a),onSortChange:e.unref(g)},{append:e.withCtx(()=>[e.renderSlot(I.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(I.$slots,"empty",{},()=>[e.createElementVNode("div",Zo,[e.createVNode(e.unref(Ee),{description:"暂无数据"})])])]),default:e.withCtx(()=>[e.renderSlot(I.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t),A=>{var f,m;return e.openBlock(),e.createBlock(Yo,{key:(m=(f=A.prop)!=null?f:A.label)!=null?m:A.type,column:A,onRadioChange:e.unref(P)},null,8,["column","onRadioChange"])}),128))]),_:3},8,["height","data","border","stripe","row-key","size","highlight-current-row","onSelectionChange","onSortChange"])),[[e.unref(d.AdapterLoadingDirective),e.unref(l)]])])],2112))}}),Xo={key:0,class:"sy-pro-table__search"},vo={class:"sy-pro-table__main"},es={class:"sy-pro-table__header"},ts={class:"sy-pro-table__header-left"},ns={class:"sy-pro-table__header-right"},ot=e.defineComponent({__name:"ClassicLayout",props:{context:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,l=s.context.selectedList,n=s.context.selectedListIds,t=s.context.isSelected,a=s.context.getTableList,g=s.context.openColSetting,P=s.context.toggleSearch,N=s.context.showToolBtn,R=s.context.formRef,I=s.context.colSettingRef,C=e.ref(),A=e.ref(void 0);function f(){var z;if(r.height!==void 0){A.value=r.height;return}const V=C.value;if(!V)return;const _=V.querySelector(".sy-pro-table__table"),T=V.querySelector(".sy-pro-table__pagination");if(!_)return;const $=_.getBoundingClientRect().top,L=T?T.getBoundingClientRect().height:0,E=(z=r.heightOffset)!=null?z:0,q=Math.floor(window.innerHeight-$-L-E);q>80&&(A.value=q)}e.watch(c,()=>e.nextTick(f));let m=null;e.onMounted(()=>{e.nextTick(f),window.addEventListener("resize",f),C.value&&(m=new ResizeObserver(f),m.observe(C.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",f),m==null||m.disconnect()});function y(V){R.value=V}function x(V){I.value=V}return(V,_)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:C,class:"sy-pro-table sy-pro-table--classic"},[e.unref(r).showSearch&&e.unref(c)&&e.unref(i).length>0?(e.openBlock(),e.createElementBlock("div",Xo,[e.createVNode(tt,{ref:y,context:o.context,cols:e.unref(r).searchCols},null,8,["context","cols"])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",vo,[e.createElementVNode("div",es,[e.createElementVNode("div",ts,[e.renderSlot(V.$slots,"tableHeader",{selectedList:e.unref(l),selectedListIds:e.unref(n),isSelected:e.unref(t)})]),e.createElementVNode("div",ns,[e.renderSlot(V.$slots,"toolButton",{},()=>[e.unref(N)("refresh")?(e.openBlock(),e.createBlock(e.unref(pe),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(U),{icon:e.unref(G.Refresh),circle:"",onClick:e.unref(a)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(N)("setting")?(e.openBlock(),e.createBlock(e.unref(pe),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(U),{icon:e.unref(G.Operation),circle:"",onClick:e.unref(g)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(N)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(pe),{key:2,content:"搜索",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(U),{icon:e.unref(G.Search),circle:"",onClick:e.unref(P)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])])]),e.createVNode(nt,{context:o.context,"table-height":A.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(V.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(V.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(V.$slots,"default")]),_:3},8,["context","table-height","on-drag-sort"]),e.createVNode(et,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(V.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ve,{ref:x,context:o.context},null,8,["context"])],512))}}),os=e.defineComponent({__name:"CustomLayout",props:{context:{},onDragSort:{type:Function}},setup(o){return(s,r)=>(e.openBlock(),e.createBlock(ot,{context:o.context,"on-drag-sort":o.onDragSort},{tableHeader:e.withCtx(c=>[e.renderSlot(s.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(c)))]),toolButton:e.withCtx(()=>[e.renderSlot(s.$slots,"toolButton")]),append:e.withCtx(()=>[e.renderSlot(s.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(s.$slots,"empty")]),pagination:e.withCtx(()=>[e.renderSlot(s.$slots,"pagination")]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["context","on-drag-sort"]))}}),ss=e.defineComponent({__name:"UnifyQuickSearch",props:{column:{},model:{},modelValue:{}},emits:["search","update:modelValue"],setup(o,{emit:s}){const r=o,c=s,i=e.inject("proTableEnumMap",{value:new Map}),l=e.computed(()=>{var P;const a=(P=r.column.search)==null?void 0:P.quick,g=typeof a=="object"&&(a==null?void 0:a.width)||220;return{width:typeof g=="number"?`${g}px`:g}}),n=e.computed(()=>{var P,N,R,I,C,A,f;const a=r.column,g=(()=>{var m,y,x,V,_,T,$;if(((m=a.search)==null?void 0:m.options)!==void 0){const L=a.search.options;return Array.isArray(L)?L:(y=e.unref(L))!=null?y:void 0}if(!(!a.enum||(V=(x=a.search)==null?void 0:x.component)!=null&&V.includes("tree")))return typeof a.enum=="function"?(T=i.value.get((_=a.prop)!=null?_:""))!=null?T:void 0:Array.isArray(a.enum)?a.enum:($=e.unref(a.enum))!=null?$:void 0})();return{field:(R=(N=(P=a.search)==null?void 0:P.key)!=null?N:a.prop)!=null?R:"",label:a.label,component:(I=a.search)==null?void 0:I.component,props:(C=a.search)==null?void 0:C.props,options:g,fieldNames:a.fieldNames,defaultValue:(A=a.search)==null?void 0:A.defaultValue,render:(f=a.search)==null?void 0:f.render}});function t(a){c("update:modelValue",a)}return(a,g)=>(e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__unify-quick",style:e.normalizeStyle(l.value),onKeyup:g[0]||(g[0]=e.withKeys(P=>c("search"),["enter"]))},[e.createVNode(Je,{schema:n.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":t},null,8,["schema","model","model-value"])],36))}}),rs={class:"sy-pro-table__unify-panel-inner"},as={class:"sy-pro-table__unify-panel-footer"},ls=e.defineComponent({__name:"UnifySearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""}},emits:["close"],setup(o,{emit:s}){const r=o,c=s,i=r.context.search,l=r.context.reset,n=r.context.formRef,t=e.ref();function a(N){n.value=N}let g=null;function P(N){var I;const R=N.target;R&&((I=t.value)!=null&&I.contains(R)||r.excludeSelector&&R.closest(r.excludeSelector)||R.closest(".el-popper")||R.closest(".el-overlay")||c("close"))}return e.watch(()=>r.visible,N=>{g==null||g(),g=null,N&&e.nextTick(()=>{document.addEventListener("mousedown",P,!0),g=()=>document.removeEventListener("mousedown",P,!0)})}),e.onBeforeUnmount(()=>g==null?void 0:g()),(N,R)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:t,class:"sy-pro-table__unify-panel"},[e.createElementVNode("div",rs,[e.createVNode(tt,{ref:a,context:o.context,cols:1,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context"]),e.createElementVNode("div",as,[e.createVNode(e.unref(U),{onClick:e.unref(l)},{default:e.withCtx(()=>[...R[0]||(R[0]=[e.createTextVNode("重置",-1)])]),_:1},8,["onClick"]),e.createVNode(e.unref(U),{type:"primary",onClick:e.unref(i)},{default:e.withCtx(()=>[...R[1]||(R[1]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])])])],512),[[e.vShow,o.visible]])]),_:1}))}}),cs={class:"sy-pro-table__main sy-pro-table__main--unify"},is={class:"sy-pro-table__header sy-pro-table__header--unify"},ds={class:"sy-pro-table__header-left"},ps={class:"sy-pro-table__header-right sy-pro-table__header-right--unify"},ms=e.defineComponent({__name:"UnifyLayout",props:{context:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,l=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,a=s.context.selectedListIds,g=s.context.isSelected,P=s.context.search,N=s.context.toggleSearch,R=s.context.showToolBtn,I=s.context.colSettingRef,C=e.computed(()=>!!r.showSearch&&c.value&&i.value.length>0),A=e.ref(),f=e.ref(void 0);function m(){var u;if(r.height!==void 0){f.value=r.height;return}const _=A.value;if(!_)return;const T=_.querySelector(".sy-pro-table__table"),$=_.querySelector(".sy-pro-table__pagination");if(!T)return;const L=T.getBoundingClientRect().top,E=$?$.getBoundingClientRect().height:0,q=(u=r.heightOffset)!=null?u:0,z=Math.floor(window.innerHeight-L-E-q);z>80&&(f.value=z)}let y=null;e.onMounted(()=>{e.nextTick(m),window.addEventListener("resize",m),A.value&&(y=new ResizeObserver(m),y.observe(A.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",m),y==null||y.disconnect()});function x(_){I.value=_}function V(){c.value&&N()}return(_,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:A,class:"sy-pro-table sy-pro-table--unify"},[e.createElementVNode("div",cs,[e.createElementVNode("div",is,[e.createElementVNode("div",ds,[e.renderSlot(_.$slots,"tableHeader",{selectedList:e.unref(t),selectedListIds:e.unref(a),isSelected:e.unref(g)})]),e.createElementVNode("div",ps,[e.renderSlot(_.$slots,"toolButton",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),$=>{var L,E,q,z,u;return e.openBlock(),e.createBlock(ss,{key:(E=(L=$.search)==null?void 0:L.key)!=null?E:$.prop,modelValue:e.unref(n)[(u=(z=(q=$.search)==null?void 0:q.key)!=null?z:$.prop)!=null?u:""],"onUpdate:modelValue":b=>{var k,M,F;return e.unref(n)[(F=(M=(k=$.search)==null?void 0:k.key)!=null?M:$.prop)!=null?F:""]=b},column:$,model:e.unref(n),onSearch:e.unref(P)},null,8,["modelValue","onUpdate:modelValue","column","model","onSearch"])}),128)),e.unref(l).length>0?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",onClick:e.unref(P)},{default:e.withCtx(()=>[...T[0]||(T[0]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(R)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(U),{key:1,class:"sy-pro-table__unify-advanced-btn",type:"primary",plain:"",onClick:e.unref(N)},{default:e.withCtx(()=>[...T[1]||(T[1]=[e.createTextVNode(" 高级筛选 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0)])])]),e.createVNode(ls,{context:o.context,visible:C.value,"exclude-selector":".sy-pro-table__unify-advanced-btn",onClose:V},null,8,["context","visible"]),e.createVNode(nt,{context:o.context,"table-height":f.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(_.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(_.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(_.$slots,"default")]),_:3},8,["context","table-height","on-drag-sort"]),e.createVNode(et,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(_.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ve,{ref:x,context:o.context},null,8,["context"])],512))}}),fs=e.defineComponent({name:"SyProTable",inheritAttrs:!1,__name:"ProTable",props:{columns:{},data:{},request:{},params:{},postData:{},requestError:{},manualRequest:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},rowKey:{default:"id"},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!0},searchCols:{default:4},toolButton:{type:[Boolean,Array],default:!0},highlightCurrentRow:{type:Boolean,default:!1},size:{},pageSizes:{default:()=>[10,20,50,100]},pageSize:{default:10},pageLayout:{default:"total, sizes, prev, pager, next, jumper"},type:{default:"classic"},height:{},heightOffset:{default:0}},emits:["search","reset","dragSort"],setup(o,{expose:s,emit:r}){const c=o,i=r,l=e.useSlots(),n=Ko(c,i,l);function t(a){i("dragSort",a)}return s({tableRef:n.tableRef,formRef:n.formRef,tableData:n.tableData,enumMap:n.enumMap,pageable:n.pageable,searchParam:n.searchParam,searchInitParam:n.searchInitParam,isSelected:n.isSelected,selectedList:n.selectedList,selectedListIds:n.selectedListIds,radio:n.radio,getTableList:n.getTableList,search:n.search,reset:n.reset,clearSelection:n.clearSelection,clearRadio:n.clearRadio,handleSizeChange:n.handleSizeChange,handleCurrentChange:n.handleCurrentChange}),(a,g)=>c.type==="classic"?(e.openBlock(),e.createBlock(ot,{key:0,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):c.type==="unify"?(e.openBlock(),e.createBlock(ms,{key:1,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):(e.openBlock(),e.createBlock(os,{key:2,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"]))}}),us=S.withInstall(fs);p.SyAlert=bt,p.SyAside=Gt,p.SyAutocomplete=J,p.SyBacktop=At,p.SyButton=U,p.SyCard=Pt,p.SyCascader=Re,p.SyCheckbox=_e,p.SyCheckboxButton=It,p.SyCheckboxGroup=$e,p.SyCol=xn,p.SyCollapse=Mt,p.SyCollapseItem=Et,p.SyColorPicker=_t,p.SyConfigProvider=Jt,p.SyContainer=Ut,p.SyDatePicker=De,p.SyDateTimePicker=vt,p.SyDescriptions=nn,p.SyDescriptionsItem=on,p.SyDialog=rn,p.SyDivider=ln,p.SyDrawer=Me,p.SyDropdown=fn,p.SyDropdownItem=hn,p.SyDropdownMenu=un,p.SyEmpty=Ee,p.SyFooter=Qt,p.SyForm=Le,p.SyFormItem=Fe,p.SyHeader=Kt,p.SyIcon=le,p.SyImage=wn,p.SyInput=ke,p.SyInputNumber=ze,p.SyLink=Tn,p.SyLoading=$n,p.SyLoadingDirective=he,p.SyMain=Wt,p.SyMenu=Fn,p.SyMenuItem=On,p.SyMenuItemGroup=qn,p.SyMessage=ne,p.SyMessageBox=qe,p.SyNotification=He,p.SyOption=We,p.SyPagination=je,p.SyPopconfirm=Un,p.SyPopover=Wn,p.SyProForm=Ze,p.SyProTable=us,p.SyProgress=Yn,p.SyRadio=xe,p.SyRadioButton=Ke,p.SyRadioGroup=Ue,p.SyRow=Bn,p.SyScrollbar=eo,p.SySelect=Ge,p.SySelectV2=ro,p.SySkeleton=co,p.SySkeletonItem=io,p.SySlider=mo,p.SySpace=uo,p.SyStep=go,p.SySteps=So,p.SySubMenu=zn,p.SySwitch=Ce,p.SyTabPane=Po,p.SyTable=Ve,p.SyTableColumn=Y,p.SyTabs=No,p.SyTag=be,p.SyText=Vo,p.SyTimePicker=Qe,p.SyTimeSelect=Ye,p.SyTooltip=pe,p.SyTree=Do,p.SyTreeSelect=Eo,p.SyUpload=Fo,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
7
|
+
</div> `),e.createCommentVNode(" 列配置表格 "),e.createVNode(e.unref(Ee),{data:c.value,"row-key":"prop",border:!0,"default-expand-all":"","tree-props":{children:"_children"}},{empty:e.withCtx(()=>[...b[1]||(b[1]=[e.createElementVNode("div",{style:{padding:"24px 0",color:"var(--el-text-color-secondary)","font-size":"13px"}},"暂无可配置列",-1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(v),{prop:"label",label:"列名",align:"left","min-width":"100"},{default:e.withCtx(({row:N})=>{var P,V;return[e.createTextVNode(e.toDisplayString((V=(P=N.label)!=null?P:N.prop)!=null?V:"—"),1)]}),_:1}),e.createVNode(e.unref(v),{prop:"isShow",label:"显示",align:"center",width:"80"},{default:e.withCtx(({row:N})=>[e.createVNode(e.unref(Be),{"model-value":N.isShow!==!1,"onUpdate:modelValue":P=>{N.isShow=P}},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(e.unref(v),{prop:"sortable",label:"排序",align:"center",width:"80"},{default:e.withCtx(({row:N})=>[typeof N.sortable=="boolean"?(e.openBlock(),e.createBlock(e.unref(Be),{key:0,modelValue:N.sortable,"onUpdate:modelValue":P=>N.sortable=P},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("span",ts,"—"))]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"]))}}),ct=e.defineComponent({__name:"ProTableColSetting",props:{context:{}},setup(o,{expose:s}){const i=o.context.flatColumns,c=e.ref();function l(){var n,t;(t=(n=c.value)==null?void 0:n.open)==null||t.call(n)}return s({open:l}),(n,t)=>(e.openBlock(),e.createBlock(ns,{ref_key:"innerRef",ref:c,columns:e.unref(i)},null,8,["columns"]))}}),os={key:0,class:"sy-pro-table__pagination"},it=e.defineComponent({__name:"ProTablePagination",props:{context:{}},setup(o){const s=o,r=s.context.props,i=s.context.pageable,c=s.context.handleSizeChange,l=s.context.handleCurrentChange;return(n,t)=>e.unref(r).pagination&&e.unref(i).total>0?(e.openBlock(),e.createElementBlock("div",os,[e.renderSlot(n.$slots,"pagination",{},()=>[e.createVNode(e.unref(Ze),{"current-page":e.unref(i).pageNum,"onUpdate:currentPage":t[0]||(t[0]=a=>e.unref(i).pageNum=a),"page-size":e.unref(i).pageSize,"onUpdate:pageSize":t[1]||(t[1]=a=>e.unref(i).pageSize=a),total:e.unref(i).total,"page-sizes":e.unref(r).pageSizes,layout:e.unref(r).pageLayout,background:"",onSizeChange:e.unref(c),onCurrentChange:e.unref(l)},null,8,["current-page","page-size","total","page-sizes","layout","onSizeChange","onCurrentChange"])])])):e.createCommentVNode("v-if",!0)}}),dt=e.defineComponent({__name:"ProTableSearchRenderer",props:{context:{},cols:{default:4},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0}},setup(o,{expose:s}){const r=o,i=r.context.searchParam,c=r.context.searchSchema,l=r.context.search,n=r.context.reset,t=e.ref();return s({validate:a=>{var b,N;return(N=(b=t.value)==null?void 0:b.validate)==null?void 0:N.call(b,a)},resetFields:()=>{var a,b;return(b=(a=t.value)==null?void 0:a.resetFields)==null?void 0:b.call(a)},clearValidate:a=>{var b,N;return(N=(b=t.value)==null?void 0:b.clearValidate)==null?void 0:N.call(b,a)},formRef:t}),(a,b)=>(e.openBlock(),e.createBlock(e.unref(rt),{ref_key:"innerFormRef",ref:t,model:e.unref(i),schema:e.unref(c),cols:o.cols,"show-query-btn":o.showQueryBtn,"show-reset-btn":o.showResetBtn,collapsible:o.collapsible,onSearch:e.unref(l),onReset:e.unref(n)},null,8,["model","schema","cols","show-query-btn","show-reset-btn","collapsible","onSearch","onReset"]))}}),ss=e.defineComponent({__name:"ProTableColumn",props:{column:{}},emits:["radioChange"],setup(o){const s=o,r=e.inject("proTableEnumMap",{value:new Map}),i=e.inject("proTableSlots",{}),c=e.computed(()=>{const g=s.column.isShow;return g===void 0?!0:e.unref(g)}),l=e.computed(()=>{var A,h,f,S;const g=s.column.enum;return typeof g=="function"?(h=r.value.get((A=s.column.prop)!=null?A:""))!=null?h:[]:g?e.unref(g):(S=r.value.get((f=s.column.prop)!=null?f:""))!=null?S:[]});function n(g){var B,D;const{fieldNames:A}=s.column,h=(B=A==null?void 0:A.label)!=null?B:"label",f=(D=A==null?void 0:A.value)!=null?D:"value",S=l.value.find(F=>F[f]===g);return S?S[h]:String(g!=null?g:"")}function t(g){var S;const{fieldNames:A}=s.column,h=(S=A==null?void 0:A.value)!=null?S:"value",f=l.value.find(B=>B[h]===g);return(f==null?void 0:f.tagType)||void 0}function a(g){return g.split(".").reduce((h,f,S)=>S===0?h+f:h+f.charAt(0).toUpperCase()+f.slice(1),"")}function b(g){var D;const{column:A}=s;if(A.render)return A.render(g);if(A.type==="expand"){const F="expand";return i[F]?i[F](g):null}const h=(D=A.prop)!=null?D:"",f=g.row[h],S=a(h);if(i[S])return i[S](g);if(A.isFilterEnum!==!1&&l.value.length>0){if(A.tag){const F=t(f);return e.h(xe,F?{type:F}:{},()=>n(f))}return e.h("span",{},n(f))}return A.tag?e.h(xe,{},()=>String(f!=null?f:"")):e.h("span",{},String(f!=null?f:""))}function N(g){var f,S;const{column:A}=s;if(A.headerRender)return A.headerRender(g);const h=`${a((f=A.prop)!=null?f:"")}Header`;return i[h]?i[h](g):(S=A.label)!=null?S:""}const P=e.defineComponent({name:"ProTableExpandRenderer",props:{scope:{type:Object,required:!0}},setup(g){return()=>i.expand?i.expand(g.scope):null}}),V=e.defineComponent({name:"ProTableHeaderRenderer",props:{scope:{type:Object,required:!0}},setup(g){return()=>N(g.scope)}}),I=e.defineComponent({name:"ProTableCellRenderer",props:{scope:{type:Object,required:!0}},setup(g){return()=>b(g.scope)}});return(g,A)=>{var f;const h=e.resolveComponent("ProTableColumn",!0);return c.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" 多级表头 "),(f=o.column.children)!=null&&f.length?(e.openBlock(),e.createBlock(e.unref(v),{key:0,label:o.column.label,align:o.column.align},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.column.children,S=>{var B;return e.openBlock(),e.createBlock(h,{key:(B=S.prop)!=null?B:S.label,column:S},null,8,["column"])}),128))]),_:1},8,["label","align"])):o.column.type&&["selection","index"].includes(o.column.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 特殊列:selection / index(自闭合,无需 slot) "),e.createVNode(e.unref(v),e.normalizeProps(e.guardReactiveProps(o.column)),null,16)],2112)):o.column.type==="expand"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" expand 列:必须通过 #default slot 提供展开行内容 "),e.createVNode(e.unref(v),e.normalizeProps(e.guardReactiveProps(o.column)),{default:e.withCtx(S=>[e.createVNode(e.unref(P),{scope:S},null,8,["scope"])]),_:1},16)],2112)):o.column.type==="radio"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createCommentVNode(" radio 列 "),e.createVNode(e.unref(v),e.mergeProps(o.column,{width:"60",align:"center"}),{default:e.withCtx(S=>[e.createVNode(e.unref(Me),{modelValue:S.row.__radioSelected,"onUpdate:modelValue":B=>S.row.__radioSelected=B,value:!0,onChange:()=>g.$emit("radioChange",S.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},16)],2112)):o.column.type==="sort"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createCommentVNode(" sort 列(拖拽手柄) "),e.createVNode(e.unref(v),e.mergeProps(o.column,{width:"60",align:"center",label:"排序"}),{default:e.withCtx(()=>[e.createVNode(e.unref(xe),{class:"move",style:{cursor:"move"}},{default:e.withCtx(()=>[e.createVNode(e.unref(ue),null,{default:e.withCtx(()=>[e.createVNode(e.unref(J.DCaret))]),_:1})]),_:1})]),_:1},16)],2112)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createCommentVNode(" 普通列 "),e.createVNode(e.unref(v),e.normalizeProps(e.guardReactiveProps(o.column)),{header:e.withCtx(S=>[e.createVNode(e.unref(V),{scope:S},null,8,["scope"])]),default:e.withCtx(S=>[e.createVNode(e.unref(I),{scope:S},null,8,["scope"])]),_:1},16)],2112))],64)):e.createCommentVNode("v-if",!0)}}}),rs={class:"sy-pro-table__table"},as={class:"sy-pro-table__empty"},pt=e.defineComponent({__name:"ProTableTable",props:{context:{},tableHeight:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,i=e.computed(()=>s.tableHeight),c=s.context.tableRef,l=s.context.loading,n=s.context.tableData,t=s.context.flatColumns,a=s.context.selectionChange,b=s.context.onSortChange,N=s.context.onRadioChange;function P(I){c.value=I}function V(){var A;if(!r.columns.some(h=>h.type==="sort")||!c.value)return;const g=(A=c.value.$el)==null?void 0:A.querySelector("tbody");g&&Ve.create(g,{handle:".move",animation:150,onEnd({newIndex:h,oldIndex:f}){var D;if(h===f)return;const S=n.value,B=S.splice(f,1)[0];S.splice(h,0,B),(D=s.onDragSort)==null||D.call(s,{newIndex:h,oldIndex:f})}})}return e.onMounted(()=>{e.nextTick(()=>V())}),(I,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" wrapper 保证 querySelector 能找到 .sy-pro-table__table,height 直接传给 el-table "),e.createElementVNode("div",rs,[e.withDirectives((e.openBlock(),e.createBlock(e.unref(Ee),{ref:P,height:i.value,data:e.unref(n),border:e.unref(r).border,stripe:e.unref(r).stripe,"row-key":e.unref(r).rowKey,size:e.unref(r).size,"highlight-current-row":e.unref(r).highlightCurrentRow,onSelectionChange:e.unref(a),onSortChange:e.unref(b)},{append:e.withCtx(()=>[e.renderSlot(I.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(I.$slots,"empty",{},()=>[e.createElementVNode("div",as,[e.createVNode(e.unref(He),{description:"暂无数据"})])])]),default:e.withCtx(()=>[e.renderSlot(I.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t),A=>{var h,f;return e.openBlock(),e.createBlock(ss,{key:(f=(h=A.prop)!=null?h:A.label)!=null?f:A.type,column:A,onRadioChange:e.unref(N)},null,8,["column","onRadioChange"])}),128))]),_:3},8,["height","data","border","stripe","row-key","size","highlight-current-row","onSelectionChange","onSortChange"])),[[e.unref(d.AdapterLoadingDirective),e.unref(l)]])])],2112))}}),ls={key:0,class:"sy-pro-table__search"},cs={class:"sy-pro-table__main"},is={class:"sy-pro-table__header"},ds={class:"sy-pro-table__header-left"},ps={class:"sy-pro-table__header-right"},mt=e.defineComponent({__name:"ClassicLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var F;const s=o,r=s.context.props,i=s.context.isShowSearch,c=s.context.searchColumns,l=s.context.selectedList,n=s.context.selectedListIds,t=s.context.isSelected,a=s.context.getTableList,b=s.context.openColSetting,N=s.context.toggleSearch,P=s.context.showToolBtn,V=s.context.formRef,I=s.context.colSettingRef,g=e.ref(),A=e.ref(void 0),h=(F=e.inject(m.SY_UI_CONFIG_KEY,{}).proTable)!=null?F:{};function f(){var M,G;if(r.height!==void 0){A.value=r.height;return}const T=g.value;if(!T)return;const R=T.querySelector(".sy-pro-table__table"),E=T.querySelector(".sy-pro-table__pagination");if(!R)return;const $=R.getBoundingClientRect().top,K=E?E.getBoundingClientRect().height:0,U=(G=(M=r.heightOffset)!=null?M:h.heightOffset)!=null?G:0,j=Math.floor(window.innerHeight-$-K-U);j>80&&(A.value=j)}e.watch(i,()=>e.nextTick(f));let S=null;e.onMounted(()=>{e.nextTick(f),window.addEventListener("resize",f),g.value&&(S=new ResizeObserver(f),S.observe(g.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",f),S==null||S.disconnect()});function B(T){V.value=T}function D(T){I.value=T}return(T,R)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:g,class:"sy-pro-table sy-pro-table--classic"},[e.unref(r).showSearch&&e.unref(i)&&e.unref(c).length>0?(e.openBlock(),e.createElementBlock("div",ls,[e.createVNode(dt,{ref:B,context:o.context,cols:e.unref(r).searchCols},null,8,["context","cols"])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",cs,[e.createElementVNode("div",is,[e.createElementVNode("div",ds,[e.renderSlot(T.$slots,"tableHeader",{selectedList:e.unref(l),selectedListIds:e.unref(n),isSelected:e.unref(t)})]),e.createElementVNode("div",ps,[e.renderSlot(T.$slots,"toolButton",{},()=>[e.unref(P)("refresh")?(e.openBlock(),e.createBlock(e.unref(ge),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(W),{icon:e.unref(J.Refresh),circle:"",onClick:e.unref(a)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(P)("setting")?(e.openBlock(),e.createBlock(e.unref(ge),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(W),{icon:e.unref(J.Operation),circle:"",onClick:e.unref(b)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(P)("search")&&e.unref(c).length>0?(e.openBlock(),e.createBlock(e.unref(ge),{key:2,content:"搜索",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(W),{icon:e.unref(J.Search),circle:"",onClick:e.unref(N)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])])]),e.createVNode(pt,{context:o.context,"table-height":A.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(T.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(T.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(T.$slots,"default")]),_:3},8,["context","table-height","on-drag-sort"]),e.createVNode(it,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(T.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ct,{ref:D,context:o.context},null,8,["context"])],512))}}),ms=e.defineComponent({__name:"CustomLayout",props:{context:{},onDragSort:{type:Function}},setup(o){return(s,r)=>(e.openBlock(),e.createBlock(mt,{context:o.context,"on-drag-sort":o.onDragSort},{tableHeader:e.withCtx(i=>[e.renderSlot(s.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(i)))]),toolButton:e.withCtx(()=>[e.renderSlot(s.$slots,"toolButton")]),append:e.withCtx(()=>[e.renderSlot(s.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(s.$slots,"empty")]),pagination:e.withCtx(()=>[e.renderSlot(s.$slots,"pagination")]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["context","on-drag-sort"]))}}),fs=e.defineComponent({__name:"UnifyQuickSearch",props:{column:{},model:{},modelValue:{}},emits:["search","update:modelValue"],setup(o,{emit:s}){const r=o,i=s,c=e.inject("proTableEnumMap",{value:new Map}),l=e.computed(()=>{var N;const a=(N=r.column.search)==null?void 0:N.quick,b=typeof a=="object"&&(a==null?void 0:a.width)||220;return{width:typeof b=="number"?`${b}px`:b}}),n=e.computed(()=>{var N,P,V,I,g,A,h;const a=r.column,b=(()=>{var f,S,B,D,F,T,R;if(((f=a.search)==null?void 0:f.options)!==void 0){const E=a.search.options;return Array.isArray(E)?E:(S=e.unref(E))!=null?S:void 0}if(!(!a.enum||(D=(B=a.search)==null?void 0:B.component)!=null&&D.includes("tree")))return typeof a.enum=="function"?(T=c.value.get((F=a.prop)!=null?F:""))!=null?T:void 0:Array.isArray(a.enum)?a.enum:(R=e.unref(a.enum))!=null?R:void 0})();return{field:(V=(P=(N=a.search)==null?void 0:N.key)!=null?P:a.prop)!=null?V:"",label:a.label,component:(I=a.search)==null?void 0:I.component,props:(g=a.search)==null?void 0:g.props,options:b,fieldNames:a.fieldNames,defaultValue:(A=a.search)==null?void 0:A.defaultValue,render:(h=a.search)==null?void 0:h.render}});function t(a){i("update:modelValue",a)}return(a,b)=>(e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__unify-quick",style:e.normalizeStyle(l.value),onKeyup:b[0]||(b[0]=e.withKeys(N=>i("search"),["enter"]))},[e.createVNode(st,{schema:n.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":t},null,8,["schema","model","model-value"])],36))}}),us={class:"sy-pro-table__unify-panel-inner"},hs={class:"sy-pro-table__unify-panel-footer"},Ss=e.defineComponent({__name:"UnifySearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""}},emits:["close"],setup(o,{emit:s}){const r=o,i=s,c=r.context.search,l=r.context.reset,n=r.context.formRef,t=e.ref();function a(P){n.value=P}let b=null;function N(P){var I;const V=P.target;V&&((I=t.value)!=null&&I.contains(V)||r.excludeSelector&&V.closest(r.excludeSelector)||V.closest(".el-popper")||V.closest(".el-overlay")||i("close"))}return e.watch(()=>r.visible,P=>{b==null||b(),b=null,P&&e.nextTick(()=>{document.addEventListener("mousedown",N,!0),b=()=>document.removeEventListener("mousedown",N,!0)})}),e.onBeforeUnmount(()=>b==null?void 0:b()),(P,V)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:t,class:"sy-pro-table__unify-panel"},[e.createElementVNode("div",us,[e.createVNode(dt,{ref:a,context:o.context,cols:1,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context"]),e.createElementVNode("div",hs,[e.createVNode(e.unref(W),{onClick:e.unref(l)},{default:e.withCtx(()=>[...V[0]||(V[0]=[e.createTextVNode("重置",-1)])]),_:1},8,["onClick"]),e.createVNode(e.unref(W),{type:"primary",onClick:e.unref(c)},{default:e.withCtx(()=>[...V[1]||(V[1]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])])])],512),[[e.vShow,o.visible]])]),_:1}))}}),ys={class:"sy-pro-table__main sy-pro-table__main--unify"},gs={class:"sy-pro-table__header sy-pro-table__header--unify"},bs={class:"sy-pro-table__header-left"},Cs={class:"sy-pro-table__header-right sy-pro-table__header-right--unify"},ws=e.defineComponent({__name:"UnifyLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var T;const s=o,r=s.context.props,i=s.context.isShowSearch,c=s.context.searchColumns,l=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,a=s.context.selectedListIds,b=s.context.isSelected,N=s.context.search,P=s.context.toggleSearch,V=s.context.showToolBtn,I=s.context.colSettingRef,g=e.computed(()=>!!r.showSearch&&i.value&&c.value.length>0),A=e.ref(),h=e.ref(void 0),f=(T=e.inject(m.SY_UI_CONFIG_KEY,{}).proTable)!=null?T:{};function S(){var G,ne;if(r.height!==void 0){h.value=r.height;return}const R=A.value;if(!R)return;const E=R.querySelector(".sy-pro-table__table"),$=R.querySelector(".sy-pro-table__pagination");if(!E)return;const K=E.getBoundingClientRect().top,U=$?$.getBoundingClientRect().height:0,j=(ne=(G=r.heightOffset)!=null?G:f.heightOffset)!=null?ne:0,M=Math.floor(window.innerHeight-K-U-j);M>80&&(h.value=M)}let B=null;e.onMounted(()=>{e.nextTick(S),window.addEventListener("resize",S),A.value&&(B=new ResizeObserver(S),B.observe(A.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",S),B==null||B.disconnect()});function D(R){I.value=R}function F(){i.value&&P()}return(R,E)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:A,class:"sy-pro-table sy-pro-table--unify"},[e.createElementVNode("div",ys,[e.createElementVNode("div",gs,[e.createElementVNode("div",bs,[e.renderSlot(R.$slots,"tableHeader",{selectedList:e.unref(t),selectedListIds:e.unref(a),isSelected:e.unref(b)})]),e.createElementVNode("div",Cs,[e.renderSlot(R.$slots,"toolButton",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),$=>{var K,U,j,M,G;return e.openBlock(),e.createBlock(fs,{key:(U=(K=$.search)==null?void 0:K.key)!=null?U:$.prop,modelValue:e.unref(n)[(G=(M=(j=$.search)==null?void 0:j.key)!=null?M:$.prop)!=null?G:""],"onUpdate:modelValue":ne=>{var le,re,ce;return e.unref(n)[(ce=(re=(le=$.search)==null?void 0:le.key)!=null?re:$.prop)!=null?ce:""]=ne},column:$,model:e.unref(n),onSearch:e.unref(N)},null,8,["modelValue","onUpdate:modelValue","column","model","onSearch"])}),128)),e.unref(l).length>0?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",onClick:e.unref(N)},{default:e.withCtx(()=>[...E[0]||(E[0]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(V)("search")&&e.unref(c).length>0?(e.openBlock(),e.createBlock(e.unref(W),{key:1,class:"sy-pro-table__unify-advanced-btn",type:"primary",plain:"",onClick:e.unref(P)},{default:e.withCtx(()=>[...E[1]||(E[1]=[e.createTextVNode(" 高级筛选 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0)])])]),e.createVNode(Ss,{context:o.context,visible:g.value,"exclude-selector":".sy-pro-table__unify-advanced-btn",onClose:F},null,8,["context","visible"]),e.createVNode(pt,{context:o.context,"table-height":h.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(R.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(R.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(R.$slots,"default")]),_:3},8,["context","table-height","on-drag-sort"]),e.createVNode(it,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(R.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ct,{ref:D,context:o.context},null,8,["context"])],512))}}),As=e.defineComponent({name:"SyProTable",inheritAttrs:!1,__name:"ProTable",props:{columns:{},data:{},request:{},params:{},postData:{},requestError:{},manualRequest:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},rowKey:{},border:{type:Boolean},stripe:{type:Boolean},showSearch:{type:Boolean,default:!0},searchCols:{},toolButton:{type:[Boolean,Array],default:!0},highlightCurrentRow:{type:Boolean,default:!1},size:{},pageSizes:{},pageSize:{},pageLayout:{},type:{},height:{},heightOffset:{}},emits:["search","reset","dragSort"],setup(o,{expose:s,emit:r}){const i=o,c=r,l=e.useSlots(),n=es(i,c,l);function t(a){c("dragSort",a)}return s({tableRef:n.tableRef,formRef:n.formRef,tableData:n.tableData,enumMap:n.enumMap,pageable:n.pageable,searchParam:n.searchParam,searchInitParam:n.searchInitParam,isSelected:n.isSelected,selectedList:n.selectedList,selectedListIds:n.selectedListIds,radio:n.radio,getTableList:n.getTableList,search:n.search,reset:n.reset,clearSelection:n.clearSelection,clearRadio:n.clearRadio,handleSizeChange:n.handleSizeChange,handleCurrentChange:n.handleCurrentChange}),(a,b)=>e.unref(n).type==="classic"?(e.openBlock(),e.createBlock(mt,{key:0,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(N=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(N)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):e.unref(n).type==="unify"?(e.openBlock(),e.createBlock(ws,{key:1,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(N=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(N)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):(e.openBlock(),e.createBlock(ms,{key:2,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(N=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(N)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"]))}}),ks=m.withInstall(As);Object.defineProperty(p,"SY_UI_CONFIG_KEY",{enumerable:!0,get:()=>m.SY_UI_CONFIG_KEY}),p.SyAlert=It,p.SyAside=tn,p.SyAutocomplete=ee,p.SyBacktop=Rt,p.SyButton=W,p.SyCard=Dt,p.SyCascader=ze,p.SyCheckbox=Oe,p.SyCheckboxButton=zt,p.SyCheckboxGroup=qe,p.SyCol=En,p.SyCollapse=Ht,p.SyCollapseItem=Kt,p.SyColorPicker=qt,p.SyConfigProvider=rn,p.SyContainer=vt,p.SyDatePicker=Ue,p.SyDateTimePicker=cn,p.SyDescriptions=mn,p.SyDescriptionsItem=fn,p.SyDialog=hn,p.SyDivider=yn,p.SyDrawer=je,p.SyDropdown=An,p.SyDropdownItem=Nn,p.SyDropdownMenu=kn,p.SyEmpty=He,p.SyFooter=on,p.SyForm=Ke,p.SyFormItem=Ge,p.SyHeader=en,p.SyIcon=ue,p.SyImage=Vn,p.SyInput=Re,p.SyInputNumber=Ye,p.SyLink=Fn,p.SyLoading=Un,p.SyLoadingDirective=Ae,p.SyMain=nn,p.SyMenu=Yn,p.SyMenuItem=Qn,p.SyMenuItemGroup=Jn,p.SyMessage=de,p.SyMessageBox=Qe,p.SyNotification=Je,p.SyOption=tt,p.SyPagination=Ze,p.SyPopconfirm=vn,p.SyPopover=no,p.SyProForm=rt,p.SyProTable=ks,p.SyProgress=so,p.SyRadio=Me,p.SyRadioButton=ve,p.SyRadioGroup=Xe,p.SyRow=Mn,p.SyScrollbar=io,p.SySelect=et,p.SySelectV2=ho,p.SySkeleton=go,p.SySkeletonItem=bo,p.SySlider=wo,p.SySpace=ko,p.SyStep=xo,p.SySteps=Bo,p.SySubMenu=Wn,p.SySwitch=Be,p.SyTabPane=Do,p.SyTable=Ee,p.SyTableColumn=v,p.SyTabs=$o,p.SyTag=xe,p.SyText=Lo,p.SyTimePicker=nt,p.SyTimeSelect=ot,p.SyTooltip=ge,p.SyTree=jo,p.SyTreeSelect=Ko,p.SyUpload=Yo,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|