use-page-search.0f272301.js 772 B

1
  1. import{r as M,at as P}from"./index.4d061c66.js";function y(o,c,d){const r=M(null);let a={};function _(s){var i;const{result:f,deleteProps:n}=o?o(s):{result:{},deleteProps:[]},e={...s,...f};if(d){const{formItems:u}=d;u.forEach(Y=>{const{field:t,type_field:l,otherOptions:D={}}=Y,{startProp:m,endProp:p}=D;(m||p)&&(e[m]=e[t][0]?P(e[t][0]).format("YYYY-MM-DD hh:mm:ss"):"",e[p]=e[t][1]?P(e[t][1]).format("YYYY-MM-DD hh:mm:ss"):"",delete e[t]),l&&(e[e[l]]=e[t],delete e[t],delete e[l])})}n.forEach(u=>delete e[u]),a=e,(i=r.value)==null||i.getPageData(e)}function g(s){var n;const{result:f}=o?o(s):{result:{}};(n=r.value)==null||n.getPageData(f),c&&c(),a={}}function h(){return a}return{pageContentRef:r,handleSearchClick:_,handleResetClick:g,getMergeParams:h}}export{y as u};