1 |
- import{w as _,Z as j}from"./index.26d13061.js";const m=o=>o?j(o).format("YYYY-MM-DD"):"";function A(o,c,d,h,f){const i=_(null);function l(n){const{result:r,deleteProps:t}=o?o(n):{result:{},deleteProps:[]},e={...n,...r};if(d){const{formItems:s}=d;return s.forEach(E=>{const{field:a,type_field:u,otherOptions:M={},type:g}=E,{startProp:P,endProp:p}=M;(P||p)&&e[a]&&(e[P]=g==="date_picker"?m(e[a][0]):e[a][0],e[p]=g==="date_picker"?m(e[a][1]):e[a][1],delete e[a]),u&&(e[e[u]]=e[a],delete e[a],delete e[u])}),e}t.forEach(s=>delete e[s]),Object.keys(e).forEach(s=>{Array.isArray(e[s])&&e[s].length===0&&(e[s]="")})}function D(n){var t;const r=l(n);(t=i.value)==null||t.getPageData(r)}function Y(n){var t;const r=l(n);(t=i.value)==null||t.intialData(r)}function v(n){var t;const{result:r}=o?o(n):{result:{}};f&&(r[f]=n[f]),(t=i.value)==null||t.getPageData(h?{}:r),c&&c()}return{pageContentRef:i,handleSearchClick:D,handleResetClick:v,handleintial:Y}}export{A as u};
|