sunyard-szyy-ui 0.7.5 → 0.7.6
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 +626 -622
- package/es/hooks/dist/index.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/make-installer.mjs +1 -1
- package/es/pro-form/src/ProFormItem.vue.mjs +1 -1
- package/es/utils/dist/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +2 -2
- package/lib/hooks/dist/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/make-installer.js +1 -1
- package/lib/pro-form/src/ProFormItem.vue.js +1 -1
- package/lib/utils/dist/index.js +1 -1
- 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(
|
|
2
|
-
* sunyard-szyy-ui v0.7.
|
|
1
|
+
(function(p,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/utils"),require("@sunyard-szyy-ui/adapter"),require("@element-plus/icons-vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/utils","@sunyard-szyy-ui/adapter","@element-plus/icons-vue","sortablejs"],e):(p=typeof globalThis!="undefined"?globalThis:p||self,e(p.SunyardSzyyUI={},p.Vue,p.hooks,p.utils,p.adapter,p.iconsVue,p.Sortable))})(this,function(p,e,h,S,d,G,Ae){"use strict";var hs=Object.defineProperty,ys=Object.defineProperties;var Ss=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,Cs=Object.prototype.propertyIsEnumerable;var Ct=(p,e,h)=>e in p?hs(p,e,{enumerable:!0,configurable:!0,writable:!0,value:h}):p[e]=h,B=(p,e)=>{for(var h in e||(e={}))gs.call(e,h)&&Ct(p,h,e[h]);if(gt)for(var h of gt(e))Cs.call(e,h)&&Ct(p,h,e[h]);return p},O=(p,e)=>ys(p,Ss(e));var we=(p,e,h)=>new Promise((S,d)=>{var G=J=>{try{re(h.next(J))}catch(ae){d(ae)}},Ae=J=>{try{re(h.throw(J))}catch(ae){d(ae)}},re=J=>J.done?S(J.value):Promise.resolve(J.value).then(G,Ae);re((h=h.apply(p,e)).next())});/*!
|
|
2
|
+
* sunyard-szyy-ui v0.7.6
|
|
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=P({},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(P({},s),{value:O(P({},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(P({},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(P({},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(P({},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=P({},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(P({},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=P({},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,p;return(p=(f=o.schema.fieldNames)==null?void 0:f.label)!=null?p:"label"}),l=e.computed(()=>{var f,p;return(p=(f=o.schema.fieldNames)==null?void 0:f.value)!=null?p:"value"}),n=e.computed(()=>{var f,p;return(p=(f=o.schema.fieldNames)==null?void 0:f.children)!=null?p:"children"}),t=e.computed(()=>{var f,p;return(f=o.schema.options)!=null&&f.length?o.schema.options:(p=r.value.get(o.schema.field))!=null?p:[]}),a=e.computed(()=>{const{label:f,value:p}={label:i.value,value:l.value};return f==="label"&&p==="value"?t.value:t.value.map(y=>O(P({},y),{label:y[f],value:y[p]}))}),g=e.computed(()=>{const f=P({},o.schema.props),{label:p,value:y,children:B}={label:i.value,value:l.value,children:n.value};return O(P({},f),{props:O(P({},f.props),{label:p,children:B}),nodeKey:y})}),N=e.computed(()=>{const f=P({},o.schema.props),{label:p,value:y,children:B}={label:i.value,value:l.value,children:n.value};return O(P({},f),{props:O(P({},f.props),{label:p,value:y,children:B})})}),A=e.computed(()=>P({},o.schema.props)),_=e.computed(()=>{var p,y,B;const f=(y=(p=o.schema.props)==null?void 0:p.type)!=null?y:"";return["daterange","datetimerange","monthrange","yearrange"].includes(f)||!!((B=o.schema.props)!=null&&B.isRange)}),I=e.computed(()=>{var p,y;if(((p=o.schema.props)==null?void 0:p.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}),w=e.computed(()=>{var p,y,B;const f=P({},o.schema.props);return _.value?O(P({},f),{rangeSeparator:(p=f.rangeSeparator)!=null?p:"至",startPlaceholder:(y=f.startPlaceholder)!=null?y:"开始时间",endPlaceholder:(B=f.endPlaceholder)!=null?B:"结束时间",clearable:C.value}):O(P({},f),{placeholder:I.value,clearable:C.value})});return()=>{var $,T,D,L;const{schema:f}=o,p=($=f.component)!=null?$:"input",y=Oo(f.events),B={modelValue:c.value,"onUpdate:modelValue":R=>c.value=R};if(f.render)return f.render(o.model);if(p==="text")return e.h("span",{class:"sy-pro-form-item__text"},String((T=c.value)!=null?T:""));if(p==="select")return e.h(Ge,O(P(P(P({},B),A.value),y),{placeholder:I.value,clearable:C.value,style:"width: 100%"}),{default:e.withCtx(()=>t.value.map(R=>e.h(We,{key:R[l.value],label:R[i.value],value:R[l.value]})))});if(p==="select-v2")return e.h(d.AdapterSelectV2,O(P(P(P({},B),A.value),y),{placeholder:I.value,clearable:C.value,options:a.value,style:"width: 100%"}));if(p==="tree-select")return e.h(d.AdapterTreeSelect,O(P(P(P({},B),g.value),y),{placeholder:I.value,clearable:C.value,data:t.value,style:"width: 100%"}));if(p==="cascader")return e.h(Re,O(P(P(P({},B),N.value),y),{placeholder:I.value,clearable:C.value,options:t.value,style:"width: 100%"}));if(p==="radio"||p==="radio-button"){const R=p==="radio"?xe:Ke;return e.h(Ue,P(P(P({},B),A.value),y),{default:()=>t.value.map(z=>e.h(R,{key:z[l.value],value:z[l.value]},{default:()=>String(z[i.value])}))})}if(p==="checkbox")return e.h($e,P(P(P({},B),A.value),y),{default:()=>t.value.map(R=>e.h(_e,{key:R[l.value],value:R[l.value]},{default:()=>String(R[i.value])}))});if(p==="date-picker")return e.h(De,O(P(P(P({},B),w.value),y),{style:"width: 100%"}));const V=zo[p];if(V){const R=(L=(D=Te[p])==null?void 0:D.call(Te,{placeholder:I.value,clearable:C.value}))!=null?L:{};return e.h(V,P(P(P(P({},B),A.value),y),R))}return e.h(ke,O(P(P(P({},B),A.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 N(){a.value=g()}e.onMounted(()=>{a.value=g(),window.addEventListener("resize",N)}),e.onUnmounted(()=>{window.removeEventListener("resize",N)});const A=e.computed(()=>i.schema.filter(u=>typeof u.hidden=="function"?!u.hidden(i.model):!u.hidden).sort((u,x)=>{var k,E;return((k=u.order)!=null?k:0)-((E=x.order)!=null?E:0)}));function _(u){var k,E,F;const x=a.value;return(F=(E=(k=u[x])==null?void 0:k.span)!=null?E:u.span)!=null?F:1}function I(u){var k,E,F;const x=a.value;return(F=(E=(k=u[x])==null?void 0:k.offset)!=null?E:u.offset)!=null?F:0}const C=e.computed(()=>{var k,E,F,X,se,v;const u=i.cols;if(typeof u=="number")return u;const x=a.value;return(v=(se=(X=(F=(E=(k=u==null?void 0:u[x])!=null?k:u==null?void 0:u.xl)!=null?E: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}),w=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),x=C.value*w.value-(u?qo:0);if(x<=0)return 0;let k=0;for(let E=0;E<A.value.length;E++){const F=A.value[E];if(k+=_(F)+I(F),k>x)return E}return-1}),p=e.computed(()=>f.value>=0),y=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${C.value}, 1fr)`,gap:"0 16px"}));function B(u){const x=_(u),k=I(u),E={gridColumn:`span ${x}`};return k>0&&(E.marginLeft=`calc(${k/C.value*100}% + ${k*16}px)`),E}const V=e.computed(()=>{const u=C.value,x=A.value,k=i.collapsible&&t.value&&f.value>=0?f.value:x.length;let E=0;for(let F=0;F<k;F++){const X=_(x[F]),se=I(x[F]),v=E+X+se;E=v>=u?v%u:v}return E}),$=e.computed(()=>{const u=V.value;return{gridColumn:`${u===0?1:u+1} / -1`}}),T={left:"flex-start",center:"center",right:"flex-end"},D=e.computed(()=>{var x;const u={display:"flex",alignItems:"center",justifyContent:(x=T[i.buttonAlign])!=null?x:"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 R(u,x){i.model[u]=x}function z(){var u;(u=n.value)==null||u.validate(x=>{x&&l("search",i.model)})}function q(){var u,x;for(const k of i.schema)R(k.field,(u=k.defaultValue)!=null?u:null);(x=n.value)==null||x.clearValidate(),l("reset",i.model)}return s({formRef:n,validate:u=>{var x;return(x=n.value)==null?void 0:x.validate(u)},validateField:(u,x)=>{var k;return(k=n.value)==null?void 0:k.validateField(u,x)},resetFields:q,clearValidate:u=>{var x;return(x=n.value)==null?void 0:x.clearValidate(u)}}),(u,x)=>(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:x[2]||(x[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(A.value,(k,E)=>{var F;return e.openBlock(),e.createElementBlock(e.Fragment,{key:k.field},[!o.collapsible||!t.value||f.value<0||E<f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item",style:e.normalizeStyle(B(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=>R(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&&p.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:z},{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:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&p.value?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",link:"",onClick:x[0]||(x[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&&p.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__footer",style:e.normalizeStyle(D.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",loading:o.loading,onClick:z},{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:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&p.value?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",link:"",onClick:x[1]||(x[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),N=e.ref([]),A=e.reactive({pageNum:1,pageSize:a!=null?a:10,total:0}),_=e.reactive({}),I=e.reactive({}),C=e.computed(()=>{if(!(t!=null&&t.value))return N.value;if(!n)return t.value;const T=(A.pageNum-1)*A.pageSize;return t.value.slice(T,T+A.pageSize)});function w(T,D){for(const[L,R]of Object.entries(T))(R!=null&&R!==""||R===!1||R===0)&&(D[L]=R)}function f(){const T={};return w(I,T),c!=null&&c.value&&w(c.value,T),T}function p(){return we(this,null,function*(){var T,D,L;if(t!=null&&t.value){A.total=t.value.length;return}if(s)try{g.value=!0;const R=f(),z=P(P(P({},_),R),(T=r==null?void 0:r.value)!=null?T:{});n&&(z.pageNum=A.pageNum,z.pageSize=A.pageSize);const q=yield s(z);if(!q.success){l==null||l(q);return}let u=(D=q.data)!=null?D:[];i&&(u=i(u)),N.value=u,n&&(A.total=(L=q.total)!=null?L:0)}catch(R){l==null||l(R)}finally{g.value=!1}})}function y(){A.pageNum=1,p()}function B(){var T;A.pageNum=1;for(const D of Object.keys(I))I[D]=(T=_[D])!=null?T:null;p()}function V(T){A.pageSize=T,A.pageNum=1,p()}function $(T){A.pageNum=T,p()}return r&&e.watch(r,()=>p(),{deep:!0}),{loading:g,tableData:N,pageable:A,processTableData:C,searchParam:I,searchInitParam:_,getTableList:p,search:y,reset:B,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 N(b){return we(this,null,function*(){var H;if(!b.enum||!b.prop)return;const M=b.enum;if(typeof M=="function"){g.value.set(b.prop,[]);try{const K=yield M();g.value.set(b.prop,K)}catch(K){}}else g.value.set(b.prop,Array.isArray(M)?M:(H=M.value)!=null?H:[])})}e.provide("proTableEnumMap",g),e.provide("proTableSlots",r);const A=e.computed(()=>a.value.filter(b=>{var M,H;return((M=b.search)==null?void 0:M.component)||((H=b.search)==null?void 0:H.render)}).sort((b,M)=>{var H,K,Q,j;return((K=(H=b.search)==null?void 0:H.order)!=null?K:0)-((j=(Q=M.search)==null?void 0:Q.order)!=null?j:0)})),_=e.computed(()=>A.value.filter(b=>{var M;return!!((M=b.search)!=null&&M.quick)}).sort((b,M)=>{var Q,j,ee,te,me,fe;const H=typeof((Q=b.search)==null?void 0:Q.quick)=="object"&&(ee=(j=b.search)==null?void 0:j.quick.order)!=null?ee:0,K=typeof((te=M.search)==null?void 0:te.quick)=="object"&&(fe=(me=M.search)==null?void 0:me.quick.order)!=null?fe:0;return H-K})),I=e.computed(()=>A.value.map(b=>{var M,H,K,Q,j,ee,te,me,fe,rt,at,lt,ct,it,dt;return{field:(K=(H=(M=b.search)==null?void 0:M.key)!=null?H:b.prop)!=null?K:"",label:b.label,component:(Q=b.search)==null?void 0:Q.component,props:(j=b.search)==null?void 0:j.props,options:(()=>{var pt,mt,ft,ut,ht,yt,St;if(((pt=b.search)==null?void 0:pt.options)!==void 0){const Ie=b.search.options;return Array.isArray(Ie)?Ie:(mt=e.unref(Ie))!=null?mt:void 0}if(!(!b.enum||(ut=(ft=b.search)==null?void 0:ft.component)!=null&&ut.includes("tree")))return typeof b.enum=="function"?(yt=g.value.get((ht=b.prop)!=null?ht:""))!=null?yt:void 0:Array.isArray(b.enum)?b.enum:(St=e.unref(b.enum))!=null?St:void 0})(),fieldNames:b.fieldNames,defaultValue:(ee=b.search)==null?void 0:ee.defaultValue,span:(te=b.search)==null?void 0:te.span,offset:(me=b.search)==null?void 0:me.offset,order:(fe=b.search)==null?void 0:fe.order,render:(rt=b.search)==null?void 0:rt.render,xs:(at=b.search)==null?void 0:at.xs,sm:(lt=b.search)==null?void 0:lt.sm,md:(ct=b.search)==null?void 0:ct.md,lg:(it=b.search)==null?void 0:it.lg,xl:(dt=b.search)==null?void 0:dt.xl}})),C=e.ref({}),w={};function f(){var b,M,H,K,Q;for(const j of Object.keys(C.value))delete C.value[j];for(const j of Object.keys(w))delete w[j];for(const j of A.value){const ee=(H=(M=(b=j.search)==null?void 0:b.key)!=null?M:j.prop)!=null?H:"",te=(Q=(K=j.search)==null?void 0:K.defaultValue)!=null?Q:null;C.value[ee]=te,w[ee]=te}}const{loading:p,processTableData:y,pageable:B,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 D(){Object.assign(B,{pageNum:1}),V(),s("search")}function L(){f(),Object.assign(B,{pageNum:1}),V(),s("reset")}const{selectedList:R,isSelected:z,selectedListIds:q,selectionChange:u,clearSelection:x}=jo(o.rowKey);function k(b){var M;t.value=b[(M=o.rowKey)!=null?M:"id"]}function E(){var b,M;t.value=null,(M=(b=c.value)==null?void 0:b.setCurrentRow)==null||M.call(b,void 0)}function F(b){V()}function X(b){return o.toolButton===!0?!0:o.toolButton===!1?!1:o.toolButton.includes(b)}function se(){n.value=!n.value}function v(){var b,M;(M=(b=l.value)==null?void 0:b.open)==null||M.call(b)}return e.onMounted(()=>we(this,null,function*(){for(const b of a.value)N(b);f(),o.manualRequest||V()})),{props:o,type:(st=o.type)!=null?st:"classic",tableRef:c,formRef:i,colSettingRef:l,flatColumns:a,enumMap:g,searchColumns:A,quickSearchColumns:_,searchSchema:I,searchParam:C,searchInitParam:w,loading:p,tableData:y,pageable:B,selectedList:R,selectedListIds:q,isSelected:z,radio:t,isShowSearch:n,getTableList:V,search:D,reset:L,clearSelection:x,clearRadio:E,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(N=>N.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]=N=>c.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">
|
|
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">
|
|
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:N})=>{var A,_;return[e.createTextVNode(e.toDisplayString((_=(A=N.label)!=null?A:N.prop)!=null?_:"—"),1)]}),_:1}),e.createVNode(e.unref(Y),{prop:"isShow",label:"显示",align:"center",width:"80"},{default:e.withCtx(({row:N})=>[e.createVNode(e.unref(Ce),{"model-value":N.isShow!==!1,"onUpdate:modelValue":A=>{N.isShow=A}},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(e.unref(Y),{prop:"sortable",label:"排序",align:"center",width:"80"},{default:e.withCtx(({row:N})=>[typeof N.sortable=="boolean"?(e.openBlock(),e.createBlock(e.unref(Ce),{key:0,modelValue:N.sortable,"onUpdate:modelValue":A=>N.sortable=A},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,N;return(N=(g=t.value)==null?void 0:g.validate)==null?void 0:N.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,N;return(N=(g=t.value)==null?void 0:g.clearValidate)==null?void 0:N.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 w,f,p,y;const C=s.column.enum;return typeof C=="function"?(f=r.value.get((w=s.column.prop)!=null?w:""))!=null?f:[]:C?e.unref(C):(y=r.value.get((p=s.column.prop)!=null?p:""))!=null?y:[]});function n(C){var B,V;const{fieldNames:w}=s.column,f=(B=w==null?void 0:w.label)!=null?B:"label",p=(V=w==null?void 0:w.value)!=null?V:"value",y=l.value.find($=>$[p]===C);return y?y[f]:String(C!=null?C:"")}function t(C){var y;const{fieldNames:w}=s.column,f=(y=w==null?void 0:w.value)!=null?y:"value",p=l.value.find(B=>B[f]===C);return(p==null?void 0:p.tagType)||void 0}function a(C){return C.split(".").reduce((f,p,y)=>y===0?f+p:f+p.charAt(0).toUpperCase()+p.slice(1),"")}function g(C){var V;const{column:w}=s;if(w.render)return w.render(C);if(w.type==="expand"){const $="expand";return c[$]?c[$](C):null}const f=(V=w.prop)!=null?V:"",p=C.row[f],y=a(f);if(c[y])return c[y](C);if(w.isFilterEnum!==!1&&l.value.length>0){if(w.tag){const $=t(p);return e.h(be,$?{type:$}:{},()=>n(p))}return e.h("span",{},n(p))}return w.tag?e.h(be,{},()=>String(p!=null?p:"")):e.h("span",{},String(p!=null?p:""))}function N(C){var p,y;const{column:w}=s;if(w.headerRender)return w.headerRender(C);const f=`${a((p=w.prop)!=null?p:"")}Header`;return c[f]?c[f](C):(y=w.label)!=null?y:""}const A=e.defineComponent({name:"ProTableExpandRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>c.expand?c.expand(C.scope):null}}),_=e.defineComponent({name:"ProTableHeaderRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>N(C.scope)}}),I=e.defineComponent({name:"ProTableCellRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>g(C.scope)}});return(C,w)=>{var p;const f=e.resolveComponent("ProTableColumn",!0);return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" 多级表头 "),(p=o.column.children)!=null&&p.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 B;return e.openBlock(),e.createBlock(f,{key:(B=y.prop)!=null?B: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(A),{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":B=>y.row.__radioSelected=B,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(_),{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,N=s.context.onRadioChange;function A(I){i.value=I}function _(){var w;if(!r.columns.some(f=>f.type==="sort")||!i.value)return;const C=(w=i.value.$el)==null?void 0:w.querySelector("tbody");C&&Ae.create(C,{handle:".move",animation:150,onEnd({newIndex:f,oldIndex:p}){var V;if(f===p)return;const y=n.value,B=y.splice(p,1)[0];y.splice(f,0,B),(V=s.onDragSort)==null||V.call(s,{newIndex:f,oldIndex:p})}})}return e.onMounted(()=>{e.nextTick(()=>_())}),(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:A,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),w=>{var f,p;return e.openBlock(),e.createBlock(Yo,{key:(p=(f=w.prop)!=null?f:w.label)!=null?p:w.type,column:w,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))}}),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,N=s.context.toggleSearch,A=s.context.showToolBtn,_=s.context.formRef,I=s.context.colSettingRef,C=e.ref(),w=e.ref(void 0);function f(){var q;if(r.height!==void 0){w.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 D=$.getBoundingClientRect().top,L=T?T.getBoundingClientRect().height:0,R=(q=r.heightOffset)!=null?q:0,z=Math.floor(window.innerHeight-D-L-R);z>80&&(w.value=z)}e.watch(c,()=>e.nextTick(f));let p=null;e.onMounted(()=>{e.nextTick(f),window.addEventListener("resize",f),C.value&&(p=new ResizeObserver(f),p.observe(C.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",f),p==null||p.disconnect()});function y(V){_.value=V}function B(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(A)("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(A)("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(A)("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(N)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])])]),e.createVNode(nt,{context:o.context,"table-height":w.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:B,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 N;const a=(N=r.column.search)==null?void 0:N.quick,g=typeof a=="object"&&(a==null?void 0:a.width)||220;return{width:typeof g=="number"?`${g}px`:g}}),n=e.computed(()=>{var N,A,_,I,C,w,f;const a=r.column,g=(()=>{var p,y,B,V,$,T,D;if(((p=a.search)==null?void 0:p.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=(B=a.search)==null?void 0:B.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:(D=e.unref(a.enum))!=null?D:void 0})();return{field:(_=(A=(N=a.search)==null?void 0:N.key)!=null?A:a.prop)!=null?_:"",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:(w=a.search)==null?void 0:w.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(N=>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(A){n.value=A}let g=null;function N(A){var I;const _=A.target;_&&((I=t.value)!=null&&I.contains(_)||r.excludeSelector&&_.closest(r.excludeSelector)||_.closest(".el-popper")||_.closest(".el-overlay")||c("close"))}return e.watch(()=>r.visible,A=>{g==null||g(),g=null,A&&e.nextTick(()=>{document.addEventListener("mousedown",N,!0),g=()=>document.removeEventListener("mousedown",N,!0)})}),e.onBeforeUnmount(()=>g==null?void 0:g()),(A,_)=>(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(()=>[..._[0]||(_[0]=[e.createTextVNode("重置",-1)])]),_:1},8,["onClick"]),e.createVNode(e.unref(U),{type:"primary",onClick:e.unref(i)},{default:e.withCtx(()=>[..._[1]||(_[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,N=s.context.search,A=s.context.toggleSearch,_=s.context.showToolBtn,I=s.context.colSettingRef,C=e.computed(()=>!!r.showSearch&&c.value&&i.value.length>0),w=e.ref(),f=e.ref(void 0);function p(){var u;if(r.height!==void 0){f.value=r.height;return}const $=w.value;if(!$)return;const T=$.querySelector(".sy-pro-table__table"),D=$.querySelector(".sy-pro-table__pagination");if(!T)return;const L=T.getBoundingClientRect().top,R=D?D.getBoundingClientRect().height:0,z=(u=r.heightOffset)!=null?u:0,q=Math.floor(window.innerHeight-L-R-z);q>80&&(f.value=q)}let y=null;e.onMounted(()=>{e.nextTick(p),window.addEventListener("resize",p),w.value&&(y=new ResizeObserver(p),y.observe(w.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",p),y==null||y.disconnect()});function B($){I.value=$}function V(){c.value&&A()}return($,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:w,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),D=>{var L,R,z,q,u;return e.openBlock(),e.createBlock(ss,{key:(R=(L=D.search)==null?void 0:L.key)!=null?R:D.prop,modelValue:e.unref(n)[(u=(q=(z=D.search)==null?void 0:z.key)!=null?q:D.prop)!=null?u:""],"onUpdate:modelValue":x=>{var k,E,F;return e.unref(n)[(F=(E=(k=D.search)==null?void 0:k.key)!=null?E:D.prop)!=null?F:""]=x},column:D,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(U),{key:0,type:"primary",onClick:e.unref(N)},{default:e.withCtx(()=>[...T[0]||(T[0]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(_)("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(A)},{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:B,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(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"])):c.type==="unify"?(e.openBlock(),e.createBlock(ms,{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(os,{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"]))}}),us=S.withInstall(fs);m.SyAlert=bt,m.SyAside=Gt,m.SyAutocomplete=J,m.SyBacktop=At,m.SyButton=U,m.SyCard=Pt,m.SyCascader=Re,m.SyCheckbox=_e,m.SyCheckboxButton=It,m.SyCheckboxGroup=$e,m.SyCol=xn,m.SyCollapse=Mt,m.SyCollapseItem=Et,m.SyColorPicker=_t,m.SyConfigProvider=Jt,m.SyContainer=Ut,m.SyDatePicker=De,m.SyDateTimePicker=vt,m.SyDescriptions=nn,m.SyDescriptionsItem=on,m.SyDialog=rn,m.SyDivider=ln,m.SyDrawer=Me,m.SyDropdown=fn,m.SyDropdownItem=hn,m.SyDropdownMenu=un,m.SyEmpty=Ee,m.SyFooter=Qt,m.SyForm=Le,m.SyFormItem=Fe,m.SyHeader=Kt,m.SyIcon=le,m.SyImage=wn,m.SyInput=ke,m.SyInputNumber=ze,m.SyLink=Tn,m.SyLoading=$n,m.SyLoadingDirective=he,m.SyMain=Wt,m.SyMenu=Fn,m.SyMenuItem=On,m.SyMenuItemGroup=qn,m.SyMessage=ne,m.SyMessageBox=qe,m.SyNotification=He,m.SyOption=We,m.SyPagination=je,m.SyPopconfirm=Un,m.SyPopover=Wn,m.SyProForm=Ze,m.SyProTable=us,m.SyProgress=Yn,m.SyRadio=xe,m.SyRadioButton=Ke,m.SyRadioGroup=Ue,m.SyRow=Bn,m.SyScrollbar=eo,m.SySelect=Ge,m.SySelectV2=ro,m.SySkeleton=co,m.SySkeletonItem=io,m.SySlider=mo,m.SySpace=uo,m.SyStep=go,m.SySteps=So,m.SySubMenu=zn,m.SySwitch=Ce,m.SyTabPane=Po,m.SyTable=Ve,m.SyTableColumn=Y,m.SyTabs=No,m.SyTag=be,m.SyText=Vo,m.SyTimePicker=Qe,m.SyTimeSelect=Ye,m.SyTooltip=pe,m.SyTree=Do,m.SyTreeSelect=Eo,m.SyUpload=Fo,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|