cnhis-design-vue 3.1.42-release.4 → 3.1.42-release.5

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.
Files changed (125) hide show
  1. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  2. package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
  3. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  4. package/es/components/big-table/src/hooks/useEvent.js +1 -1
  5. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  6. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  7. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  8. package/es/components/big-table/src/utils.d.ts +11 -1
  9. package/es/components/big-table/src/utils.js +1 -1
  10. package/es/components/button-print/index.d.ts +28 -3
  11. package/es/components/button-print/src/ButtonPrint.vue.d.ts +28 -4
  12. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  13. package/es/components/form-config/index.d.ts +36 -0
  14. package/es/components/form-config/src/FormConfig.vue.d.ts +36 -0
  15. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -0
  16. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -0
  17. package/es/components/form-render/index.d.ts +13 -0
  18. package/es/components/form-render/src/FormRender.vue.d.ts +13 -0
  19. package/es/components/form-render/src/FormRender.vue.js +1 -1
  20. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -0
  21. package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
  22. package/es/components/form-render/src/components/renderer/date.js +1 -1
  23. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  24. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  25. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  26. package/es/components/form-render/src/types/fieldItem.d.ts +3 -0
  27. package/es/components/form-render/src/types/index.d.ts +1 -1
  28. package/es/components/form-render/style/index.css +1 -1
  29. package/es/components/iho-table/index.d.ts +17 -3
  30. package/es/components/iho-table/src/IhoTable.vue.d.ts +17 -3
  31. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  32. package/es/components/iho-table/src/constants/index.d.ts +3 -2
  33. package/es/components/iho-table/src/constants/index.js +1 -1
  34. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
  35. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +19 -19
  36. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
  37. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
  38. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
  39. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
  40. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  41. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  42. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
  43. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  44. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  45. package/es/components/iho-table/src/plugins/index.js +1 -1
  46. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  47. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
  48. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  49. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  50. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
  51. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -0
  52. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  53. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  54. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
  55. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
  56. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  57. package/es/components/iho-table/src/types/index.d.ts +17 -2
  58. package/es/components/iho-table/src/types/pluginType.d.ts +11 -29
  59. package/es/components/iho-table/src/utils/index.d.ts +4 -3
  60. package/es/components/iho-table/src/utils/index.js +1 -1
  61. package/es/components/iho-table/style/index.css +1 -1
  62. package/es/components/index.css +1 -1
  63. package/es/components/index.d.ts +1 -0
  64. package/es/components/info-header/index.d.ts +27 -0
  65. package/es/components/info-header/src/InfoHeader.vue.d.ts +27 -0
  66. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  67. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  68. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -0
  69. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
  70. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  71. package/es/components/info-header/style/index.css +1 -1
  72. package/es/components/scale-view/index.d.ts +9 -130
  73. package/es/components/scale-view/index.js +1 -1
  74. package/es/components/scale-view/src/ScaleView.vue.d.ts +8 -130
  75. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  76. package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
  77. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  78. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
  79. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  80. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  81. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  82. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
  83. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  84. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  85. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +4 -4
  86. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  87. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  88. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  89. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  90. package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
  91. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  92. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  93. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
  94. package/es/components/scale-view/src/hooks/use-event.js +1 -1
  95. package/es/components/scale-view/src/types/index.d.ts +7 -0
  96. package/es/components/scale-view/src/types/index.js +1 -0
  97. package/es/components/scale-view/style/index.css +1 -1
  98. package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
  99. package/es/components/search-cascader/index.d.ts +12 -1
  100. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
  101. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  102. package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
  103. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  104. package/es/components/search-cascader/src/constants/index.d.ts +1 -0
  105. package/es/components/search-cascader/src/constants/index.js +1 -1
  106. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  107. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  108. package/es/components/select-person/index.d.ts +15 -7
  109. package/es/components/select-person/src/SelectPerson.vue.d.ts +9 -5
  110. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  111. package/es/components/shortcut-setter/index.d.ts +15 -0
  112. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
  113. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  114. package/es/env.d.ts +1 -0
  115. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  116. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  117. package/es/shared/utils/anime.d.ts +1 -1
  118. package/es/shared/utils/anime.js +1 -1
  119. package/es/shared/utils/index.d.ts +3 -14
  120. package/es/shared/utils/index.js +1 -1
  121. package/es/shared/utils/vexutils.d.ts +2 -2
  122. package/es/shared/utils/vexutils.js +1 -1
  123. package/es/shared/utils/vexutilsExpand.d.ts +254 -0
  124. package/es/shared/utils/vexutilsExpand.js +1 -0
  125. package/package.json +2 -2
@@ -1 +1 @@
1
- import{defineComponent as t,reactive as e,computed as r,onMounted as a,onUnmounted as i,watch as n,openBlock as s,createElementBlock as o,Fragment as l,createVNode as m,unref as p,withCtx as d,renderSlot as u,withModifiers as c,createCommentVNode as f,createTextVNode as v,toDisplayString as y,mergeProps as b}from"vue";import{isObject as g}from"@vue/shared";import{useMessage as P,NDropdown as I,NButton as h,NIcon as F}from"naive-ui";import{ChevronDown as w}from"@vicons/ionicons5";import{Print as k}from"./utils/print.js";import{isIReport as T}from"./utils/browserPrint.js";import S from"./components/IdentityVerification.vue.js";import{format as x}from"date-fns";import{savePrivateFormatApi as D,getPrivateFormatApi as j}from"./api.js";var E=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1}},emits:["success","error","clickoutside"],setup(t,{expose:E,emit:L}){const N=t,M=P();let O;const V={},Y=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),U=e([{label:N.printText,key:"printText"},{label:N.previewText,key:"previewText"},{label:N.pdfLoadText,key:"downloadPdf"},{label:N.formatEditText,key:"formatEditText"}]),B=r((()=>{if(!Y.currentFormatId)return{};let t=Y.currentFormatId;return Y.formatList.find((e=>e.id===t))})),C=r((()=>{var t;return(null==(t=B.value)?void 0:t.name)||"格式选择"})),J=r((()=>{let t=Y.formatList.find((t=>t.id===Y.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(N.directPrint){if(Y.spinning)return;return"button"===t?void await nt():rt()}return rt()},R=t=>m("span",{class:{active:t.key===Y.currentFormatId}},[t.label]),q=(t,e)=>{let r={type:e,formatId:Y.currentFormatId,templateId:J.value};L("success",t,r)},_=t=>{L("error",t),g(t)&&"notInstalledApp"===t.type&&M.error(t.message)},z=()=>{L("error",{message:"前置条件执行错误"})},H=(t=0)=>{var e;const r=(null==(e=N.printParams)?void 0:e.length)?N.printParams[t]:Y.printParams[t];return JSON.stringify({...r||{},...N.token?{token:N.token}:{}})},$=()=>{var t,e;let r={},a={};if(null==(t=Y.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(Y.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(Y.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(Y.printParams[0]).forEach((t=>{a[t]=[],Y.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(H(0)),a),JSON.stringify(r)},G=()=>{let t=Y.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t={formatId:Y.currentFormatId,templateId:J.value,printdlgshow:N.printdlgshow};if("MULTI"===N.strategy)for(let r=0;r<Y.printParams.length;r++)r>0&&(t.printdlgshow="0"),O.printDirect({...t,params:H(r)},e,_);else O.printDirect({...t,params:$()},(t=>{q(t,"print")}),_)})).finally((()=>{Y.visible=!1}))},K=async t=>{switch(t){case"printText":G();break;case"previewText":(async()=>{N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===N.strategy?H():$(),e={formatId:Y.currentFormatId,templateId:J.value,params:t,btnprint:N.btnprint};O.preview(e,(t=>{q(t,"preview")}),_)})).finally((()=>{Y.visible=!1}))})();break;case"formatEditText":N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{Y.identityVerification.visible=!0})).finally((()=>{Y.visible=!1}));break;case"downloadPdf":(async()=>{N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===N.strategy?H():$(),e={formatId:Y.currentFormatId,templateId:J.value,print:{print:"1",type:"1"},params:t};O.downloadPDF(e,(t=>q(t,"preview")),_)})).finally((()=>{Y.visible=!1}))})();break;default:{Y.currentFormatId=t,Y.visible=!1;const[e]=U,r=Y.formatList.find((e=>e.id===t));e.label=(null==r?void 0:r.name)||e.label,await D({formatForms:[{...r}],name:V.name||r.templateName,number:V.number||r.number,templateId:V.templateId||r.templateId,...V.id?{id:V.id}:{}},{token:N.token});break}}},Q=()=>{Y.visible=!1,L("clickoutside")},W=()=>(Y.isInited=!1,Y.spinning=!1,setTimeout((()=>{Y.visible=!1}),0),!1),X=(t,e,r)=>{const a={};return e.forEach((e=>{let i=((t,e)=>{let r=t.defaultValue||"",a=e;return"NUMBER"===t.type&&(a=Number(e)||0),"DATE"===t.type&&(a=e?x(e,"YYYY-MM-DD"):""),"DATETIME"===t.type&&(a=e?x(e,"YYYY-MM-DD HH:mm:ss"):""),r||a})(e,t[e[r]]);t[e[r]]&&i&&(a[e[r]]=i)})),a},Z=({customizeDataset:t=[],param:e=[]},r=[])=>r.map((r=>{let a={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;a.datasetData={[t.name]:JSON.stringify(X(r,e,"fieldName"))}})),a=Object.assign({},a,X(r,e,"key")),a})),tt=async t=>{var e;if(Y.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],Y.currentFormatId=await(async(t,e)=>{var r;if(!(null==t?void 0:t.length))return"";const{data:a}=await j({templateId:t[0].templateId},{token:N.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(V,a.map||{});const i=null==(r=null==e?void 0:e[0])?void 0:r.id;if(i&&t.map((t=>t.id)).includes(i))return i}const i=t.find((t=>1==t[e]));return(null==i?void 0:i.id)||t[0].id})(Y.formatList,"defaultFlag"),!Y.currentFormatId)return M.error("获取打印格式失败,请联系管理员!"),W();(()=>{const t=Y.formatList.map((t=>({label:t.name,key:t.id})));U.unshift({label:C.value,key:"format",children:t})})();let r=null==(e=await N.queryTemplateParams())?void 0:e.obj;if(!r||!J.value)return M.error("获取打印模板失败,请联系管理员!"),W();Y.templateParams=r,Y.printParams=Z(Y.templateParams,N.params)},et=async()=>{if(Y.isInited)return!0;Y.isInited=!0,Y.spinning=!0,(()=>{if(O)return!1;O=new k})();const t=await N.queryPrintFormatByNumber();return await tt(t),Y.spinning=!1,!0},rt=async(t=!0)=>{var e;if(await N.clickPrevFn())if(null==(e=N.params)?void 0:e.length){if(!Y.visible){if(!await et())return!1}t&&(Y.visible=!Y.visible)}else M.warning(N.noDataMsg)},at=()=>{Y.watchPrintParamsReformatFn&&Y.watchPrintParamsReformatFn(),Y.isInited?Y.printParams=Z(Y.templateParams,N.params):Y.watchPrintParamsReformatFn=()=>n((()=>Y.isInited),(t=>{if(!t)return!1;at()}))},it=t=>{if(Y.identityVerification.visible=!1,T(Y.currentFormatId))return q(null,"edit");const e={formatId:Y.currentFormatId,templateId:J.value,params:H(),token:t};O.editPrintFormat(e,(t=>{q(t,"edit")}),_)};async function nt(){await rt(!1),G()}return a((()=>{Y.isInited=!1})),i((()=>{null==O||O.destroy()})),n((()=>N.params),(t=>{if(!(null==t?void 0:t.length))return!1;at()}),{deep:!0}),E({directPrint:nt}),(e,r)=>(s(),o(l,null,[m(p(I),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:Y.visible,onClickoutside:Q,options:U,onSelect:K,"render-label":R},{default:d((()=>[u(e.$slots,"button",{handleClickPrintBtn:rt,printSpinning:Y.spinning,printbtnText:t.btnText,printVisible:Y.visible},(()=>[m(p(h),{class:"dropdown-button",onClick:r[1]||(r[1]=c((()=>A("button")),["stop"]))},{default:d((()=>[f(' <n-spin v-show="state.spinning" size="small"></n-spin> '),v(y(t.btnText)+" ",1),m(p(F),{component:p(w),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=c((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),m(S,b(e.$attrs,{modelValue:Y.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>Y.identityVerification.visible=t),formatId:Y.currentFormatId,templateId:p(J),onSuccess:it}),null,16,["modelValue","formatId","templateId"])],64))}});export{E as default};
1
+ import{defineComponent as t,reactive as e,computed as r,onMounted as a,onUnmounted as n,watch as i,openBlock as o,createElementBlock as s,Fragment as l,createVNode as m,unref as p,withCtx as d,renderSlot as u,withModifiers as c,createTextVNode as f,toDisplayString as v,mergeProps as y}from"vue";import{isObject as b}from"@vue/shared";import{useMessage as g,NDropdown as P,NButton as I,NIcon as h}from"naive-ui";import{ChevronDown as F}from"@vicons/ionicons5";import{Print as w}from"./utils/print.js";import{isIReport as k}from"./utils/browserPrint.js";import T from"./components/IdentityVerification.vue.js";import{format as x}from"date-fns";import{savePrivateFormatApi as S,getPrivateFormatApi as j}from"./api.js";var D=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})}},emits:["success","error","clickoutside"],setup(t,{expose:D,emit:O}){var E;const L=t,N=g();let M;const V={},C=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),Y=e([{label:L.printText,key:"printText"},{label:L.previewText,key:"previewText"},{label:L.pdfLoadText,key:"downloadPdf"},{label:L.formatEditText,key:"formatEditText"},...(null==(E=L.externalOptionConfig)?void 0:E.options)||[]]),U=r((()=>{if(!C.currentFormatId)return{};let t=C.currentFormatId;return C.formatList.find((e=>e.id===t))})),B=r((()=>{var t;return(null==(t=U.value)?void 0:t.name)||"格式选择"})),J=r((()=>{let t=C.formatList.find((t=>t.id===C.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(L.directPrint){if(C.spinning)return;return"button"===t?void await it():rt()}return rt()},R=t=>m("span",{class:{active:t.key===C.currentFormatId}},[t.label]),q=(t,e)=>{let r={type:e,formatId:C.currentFormatId,templateId:J.value};O("success",t,r)},_=t=>{O("error",t),b(t)&&"notInstalledApp"===t.type&&N.error(t.message)},z=()=>{O("error",{message:"前置条件执行错误"})},H=(t=0)=>{var e;const r=(null==(e=L.printParams)?void 0:e.length)?L.printParams[t]:C.printParams[t];return JSON.stringify({...r||{},...L.token?{token:L.token}:{}})},$=()=>{var t,e;let r={},a={};if(null==(t=C.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(C.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(C.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(C.printParams[0]).forEach((t=>{a[t]=[],C.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(H(0)),a),JSON.stringify(r)},G=()=>{let t=C.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t={formatId:C.currentFormatId,templateId:J.value,printdlgshow:L.printdlgshow};if("MULTI"===L.strategy)for(let r=0;r<C.printParams.length;r++)r>0&&(t.printdlgshow="0"),M.printDirect({...t,params:H(r)},e,_);else M.printDirect({...t,params:$()},(t=>{q(t,"print")}),_)})).finally((()=>{C.visible=!1}))},K=async(t,e)=>{var r,a;switch(t){case"printText":G();break;case"previewText":(async()=>{L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===L.strategy?H():$(),e={formatId:C.currentFormatId,templateId:J.value,params:t,btnprint:L.btnprint};M.preview(e,(t=>{q(t,"preview")}),_)})).finally((()=>{C.visible=!1}))})();break;case"formatEditText":L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{C.identityVerification.visible=!0})).finally((()=>{C.visible=!1}));break;case"downloadPdf":(async()=>{L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===L.strategy?H():$(),e={formatId:C.currentFormatId,templateId:J.value,print:{print:"1",type:"1"},params:t};M.downloadPDF(e,(t=>q(t,"preview")),_)})).finally((()=>{C.visible=!1}))})();break;default:{C.visible=!1;const n=C.formatList.find((e=>e.id===t))||{};if(Object.keys(n).length>0){C.currentFormatId=t;const[e]=Y;e.label=(null==n?void 0:n.name)||e.label,await S({formatForms:[{...n}],name:V.name||n.templateName,number:V.number||n.number,templateId:V.templateId||n.templateId,...V.id?{id:V.id}:{}},{token:L.token})}else null==(a=null==(r=L.externalOptionConfig)?void 0:r.onSelect)||a.call(r,t,e);break}}},Q=()=>{C.visible=!1,O("clickoutside")},W=()=>(C.isInited=!1,C.spinning=!1,setTimeout((()=>{C.visible=!1}),0),!1),X=(t,e,r)=>{const a={};return e.forEach((e=>{let n=((t,e)=>{let r=t.defaultValue||"",a=e;return"NUMBER"===t.type&&(a=Number(e)||0),"DATE"===t.type&&(a=e?x(e,"YYYY-MM-DD"):""),"DATETIME"===t.type&&(a=e?x(e,"YYYY-MM-DD HH:mm:ss"):""),r||a})(e,t[e[r]]);t[e[r]]&&n&&(a[e[r]]=n)})),a},Z=({customizeDataset:t=[],param:e=[]},r=[])=>r.map((r=>{let a={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;a.datasetData={[t.name]:JSON.stringify(X(r,e,"fieldName"))}})),a=Object.assign({},a,X(r,e,"key")),a})),tt=async t=>{var e;if(C.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],C.currentFormatId=await(async(t,e)=>{var r;if(!(null==t?void 0:t.length))return"";const{data:a}=await j({templateId:t[0].templateId},{token:L.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(V,a.map||{});const n=null==(r=null==e?void 0:e[0])?void 0:r.id;if(n&&t.map((t=>t.id)).includes(n))return n}const n=t.find((t=>1==t[e]));return(null==n?void 0:n.id)||t[0].id})(C.formatList,"defaultFlag"),!C.currentFormatId)return N.error("获取打印格式失败,请联系管理员!"),W();(()=>{const t=C.formatList.map((t=>({label:t.name,key:t.id})));Y.unshift({label:B.value,key:"format",children:t})})();let r=null==(e=await L.queryTemplateParams())?void 0:e.obj;if(!r||!J.value)return N.error("获取打印模板失败,请联系管理员!"),W();C.templateParams=r,C.printParams=Z(C.templateParams,L.params)},et=async()=>{if(C.isInited)return!0;C.isInited=!0,C.spinning=!0,(()=>{if(M)return!1;M=new w})();const t=await L.queryPrintFormatByNumber();return await tt(t),C.spinning=!1,!0},rt=async(t=!0)=>{var e;if(await L.clickPrevFn())if(null==(e=L.params)?void 0:e.length){if(!C.visible){if(!await et())return!1}t&&(C.visible=!C.visible)}else N.warning(L.noDataMsg)},at=()=>{C.watchPrintParamsReformatFn&&C.watchPrintParamsReformatFn(),C.isInited?C.printParams=Z(C.templateParams,L.params):C.watchPrintParamsReformatFn=()=>i((()=>C.isInited),(t=>{if(!t)return!1;at()}))},nt=t=>{if(C.identityVerification.visible=!1,k(C.currentFormatId))return q(null,"edit");const e={formatId:C.currentFormatId,templateId:J.value,params:H(),token:t};M.editPrintFormat(e,(t=>{q(t,"edit")}),_)};async function it(){await rt(!1),G()}return a((()=>{C.isInited=!1})),n((()=>{null==M||M.destroy()})),i((()=>L.params),(t=>{if(!(null==t?void 0:t.length))return!1;at()}),{deep:!0}),D({directPrint:it}),(e,r)=>(o(),s(l,null,[m(p(P),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:C.visible,onClickoutside:Q,options:Y,onSelect:K,"render-label":R},{default:d((()=>[u(e.$slots,"button",{handleClickPrintBtn:rt,printSpinning:C.spinning,printbtnText:t.btnText,printVisible:C.visible},(()=>[m(p(I),{class:"dropdown-button",onClick:r[1]||(r[1]=c((()=>A("button")),["stop"]))},{default:d((()=>[f(v(t.btnText)+" ",1),m(p(h),{component:p(F),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=c((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),m(T,y(e.$attrs,{modelValue:C.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>C.identityVerification.visible=t),formatId:C.currentFormatId,templateId:p(J),onSuccess:nt}),null,16,["modelValue","formatId","templateId"])],64))}});export{D as default};
@@ -79,6 +79,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
79
79
  vali_obj?: string | undefined;
80
80
  max_value?: string | number | undefined;
81
81
  min_value?: string | number | undefined;
82
+ min_date?: string | undefined;
83
+ max_date?: string | undefined;
82
84
  min_length?: string | number | undefined;
83
85
  max_length?: string | number | undefined;
84
86
  decimal_length?: string | number | undefined;
@@ -1772,6 +1774,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1772
1774
  vali_obj?: string | undefined;
1773
1775
  max_value?: string | number | undefined;
1774
1776
  min_value?: string | number | undefined;
1777
+ min_date?: string | undefined;
1778
+ max_date?: string | undefined;
1775
1779
  min_length?: string | number | undefined;
1776
1780
  max_length?: string | number | undefined;
1777
1781
  decimal_length?: string | number | undefined;
@@ -3655,6 +3659,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3655
3659
  linebarAutoHidden: {
3656
3660
  type: BooleanConstructor;
3657
3661
  };
3662
+ bordered: {
3663
+ type: BooleanConstructor;
3664
+ default: boolean;
3665
+ };
3658
3666
  }, {
3659
3667
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
3660
3668
  fieldList: {
@@ -3783,6 +3791,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3783
3791
  linebarAutoHidden: {
3784
3792
  type: BooleanConstructor;
3785
3793
  };
3794
+ bordered: {
3795
+ type: BooleanConstructor;
3796
+ default: boolean;
3797
+ };
3786
3798
  }>> & {
3787
3799
  onFormChange?: ((...args: any[]) => any) | undefined;
3788
3800
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -4226,6 +4238,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4226
4238
  linebarAutoHidden: {
4227
4239
  type: BooleanConstructor;
4228
4240
  };
4241
+ bordered: {
4242
+ type: BooleanConstructor;
4243
+ default: boolean;
4244
+ };
4229
4245
  }>> & {
4230
4246
  onFormChange?: ((...args: any[]) => any) | undefined;
4231
4247
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -4241,6 +4257,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4241
4257
  consumer: boolean;
4242
4258
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
4243
4259
  linebarAutoHidden: boolean;
4260
+ bordered: boolean;
4244
4261
  }>;
4245
4262
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
4246
4263
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -4396,6 +4413,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4396
4413
  vali_obj?: string | undefined;
4397
4414
  max_value?: string | number | undefined;
4398
4415
  min_value?: string | number | undefined;
4416
+ min_date?: string | undefined;
4417
+ max_date?: string | undefined;
4399
4418
  min_length?: string | number | undefined;
4400
4419
  max_length?: string | number | undefined;
4401
4420
  decimal_length?: string | number | undefined;
@@ -6101,6 +6120,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
6101
6120
  vali_obj?: string | undefined;
6102
6121
  max_value?: string | number | undefined;
6103
6122
  min_value?: string | number | undefined;
6123
+ min_date?: string | undefined;
6124
+ max_date?: string | undefined;
6104
6125
  min_length?: string | number | undefined;
6105
6126
  max_length?: string | number | undefined;
6106
6127
  decimal_length?: string | number | undefined;
@@ -7778,6 +7799,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7778
7799
  vali_obj?: string | undefined;
7779
7800
  max_value?: string | number | undefined;
7780
7801
  min_value?: string | number | undefined;
7802
+ min_date?: string | undefined;
7803
+ max_date?: string | undefined;
7781
7804
  min_length?: string | number | undefined;
7782
7805
  max_length?: string | number | undefined;
7783
7806
  decimal_length?: string | number | undefined;
@@ -9572,6 +9595,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9572
9595
  linebarAutoHidden: {
9573
9596
  type: BooleanConstructor;
9574
9597
  };
9598
+ bordered: {
9599
+ type: BooleanConstructor;
9600
+ default: boolean;
9601
+ };
9575
9602
  }, {
9576
9603
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9577
9604
  fieldList: {
@@ -9700,6 +9727,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9700
9727
  linebarAutoHidden: {
9701
9728
  type: BooleanConstructor;
9702
9729
  };
9730
+ bordered: {
9731
+ type: BooleanConstructor;
9732
+ default: boolean;
9733
+ };
9703
9734
  }>> & {
9704
9735
  onFormChange?: ((...args: any[]) => any) | undefined;
9705
9736
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -10143,6 +10174,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
10143
10174
  linebarAutoHidden: {
10144
10175
  type: BooleanConstructor;
10145
10176
  };
10177
+ bordered: {
10178
+ type: BooleanConstructor;
10179
+ default: boolean;
10180
+ };
10146
10181
  }>> & {
10147
10182
  onFormChange?: ((...args: any[]) => any) | undefined;
10148
10183
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -10158,6 +10193,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
10158
10193
  consumer: boolean;
10159
10194
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
10160
10195
  linebarAutoHidden: boolean;
10196
+ bordered: boolean;
10161
10197
  }>;
10162
10198
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
10163
10199
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -81,6 +81,8 @@ declare const _default: import("vue").DefineComponent<{
81
81
  vali_obj?: string | undefined;
82
82
  max_value?: string | number | undefined;
83
83
  min_value?: string | number | undefined;
84
+ min_date?: string | undefined;
85
+ max_date?: string | undefined;
84
86
  min_length?: string | number | undefined;
85
87
  max_length?: string | number | undefined;
86
88
  decimal_length?: string | number | undefined;
@@ -1774,6 +1776,8 @@ declare const _default: import("vue").DefineComponent<{
1774
1776
  vali_obj?: string | undefined;
1775
1777
  max_value?: string | number | undefined;
1776
1778
  min_value?: string | number | undefined;
1779
+ min_date?: string | undefined;
1780
+ max_date?: string | undefined;
1777
1781
  min_length?: string | number | undefined;
1778
1782
  max_length?: string | number | undefined;
1779
1783
  decimal_length?: string | number | undefined;
@@ -3657,6 +3661,10 @@ declare const _default: import("vue").DefineComponent<{
3657
3661
  linebarAutoHidden: {
3658
3662
  type: BooleanConstructor;
3659
3663
  };
3664
+ bordered: {
3665
+ type: BooleanConstructor;
3666
+ default: boolean;
3667
+ };
3660
3668
  }, {
3661
3669
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
3662
3670
  fieldList: {
@@ -3785,6 +3793,10 @@ declare const _default: import("vue").DefineComponent<{
3785
3793
  linebarAutoHidden: {
3786
3794
  type: BooleanConstructor;
3787
3795
  };
3796
+ bordered: {
3797
+ type: BooleanConstructor;
3798
+ default: boolean;
3799
+ };
3788
3800
  }>> & {
3789
3801
  onFormChange?: ((...args: any[]) => any) | undefined;
3790
3802
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -4228,6 +4240,10 @@ declare const _default: import("vue").DefineComponent<{
4228
4240
  linebarAutoHidden: {
4229
4241
  type: BooleanConstructor;
4230
4242
  };
4243
+ bordered: {
4244
+ type: BooleanConstructor;
4245
+ default: boolean;
4246
+ };
4231
4247
  }>> & {
4232
4248
  onFormChange?: ((...args: any[]) => any) | undefined;
4233
4249
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -4243,6 +4259,7 @@ declare const _default: import("vue").DefineComponent<{
4243
4259
  consumer: boolean;
4244
4260
  enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
4245
4261
  linebarAutoHidden: boolean;
4262
+ bordered: boolean;
4246
4263
  }>;
4247
4264
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
4248
4265
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -4398,6 +4415,8 @@ declare const _default: import("vue").DefineComponent<{
4398
4415
  vali_obj?: string | undefined;
4399
4416
  max_value?: string | number | undefined;
4400
4417
  min_value?: string | number | undefined;
4418
+ min_date?: string | undefined;
4419
+ max_date?: string | undefined;
4401
4420
  min_length?: string | number | undefined;
4402
4421
  max_length?: string | number | undefined;
4403
4422
  decimal_length?: string | number | undefined;
@@ -6103,6 +6122,8 @@ declare const _default: import("vue").DefineComponent<{
6103
6122
  vali_obj?: string | undefined;
6104
6123
  max_value?: string | number | undefined;
6105
6124
  min_value?: string | number | undefined;
6125
+ min_date?: string | undefined;
6126
+ max_date?: string | undefined;
6106
6127
  min_length?: string | number | undefined;
6107
6128
  max_length?: string | number | undefined;
6108
6129
  decimal_length?: string | number | undefined;
@@ -7780,6 +7801,8 @@ declare const _default: import("vue").DefineComponent<{
7780
7801
  vali_obj?: string | undefined;
7781
7802
  max_value?: string | number | undefined;
7782
7803
  min_value?: string | number | undefined;
7804
+ min_date?: string | undefined;
7805
+ max_date?: string | undefined;
7783
7806
  min_length?: string | number | undefined;
7784
7807
  max_length?: string | number | undefined;
7785
7808
  decimal_length?: string | number | undefined;
@@ -9574,6 +9597,10 @@ declare const _default: import("vue").DefineComponent<{
9574
9597
  linebarAutoHidden: {
9575
9598
  type: BooleanConstructor;
9576
9599
  };
9600
+ bordered: {
9601
+ type: BooleanConstructor;
9602
+ default: boolean;
9603
+ };
9577
9604
  }, {
9578
9605
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9579
9606
  fieldList: {
@@ -9702,6 +9729,10 @@ declare const _default: import("vue").DefineComponent<{
9702
9729
  linebarAutoHidden: {
9703
9730
  type: BooleanConstructor;
9704
9731
  };
9732
+ bordered: {
9733
+ type: BooleanConstructor;
9734
+ default: boolean;
9735
+ };
9705
9736
  }>> & {
9706
9737
  onFormChange?: ((...args: any[]) => any) | undefined;
9707
9738
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -10145,6 +10176,10 @@ declare const _default: import("vue").DefineComponent<{
10145
10176
  linebarAutoHidden: {
10146
10177
  type: BooleanConstructor;
10147
10178
  };
10179
+ bordered: {
10180
+ type: BooleanConstructor;
10181
+ default: boolean;
10182
+ };
10148
10183
  }>> & {
10149
10184
  onFormChange?: ((...args: any[]) => any) | undefined;
10150
10185
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -10160,6 +10195,7 @@ declare const _default: import("vue").DefineComponent<{
10160
10195
  consumer: boolean;
10161
10196
  enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
10162
10197
  linebarAutoHidden: boolean;
10198
+ bordered: boolean;
10163
10199
  }>;
10164
10200
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
10165
10201
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -148,6 +148,10 @@ declare const _default: import("vue").DefineComponent<{}, {
148
148
  linebarAutoHidden: {
149
149
  type: BooleanConstructor;
150
150
  };
151
+ bordered: {
152
+ type: BooleanConstructor;
153
+ default: boolean;
154
+ };
151
155
  }, {
152
156
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
153
157
  fieldList: {
@@ -276,6 +280,10 @@ declare const _default: import("vue").DefineComponent<{}, {
276
280
  linebarAutoHidden: {
277
281
  type: BooleanConstructor;
278
282
  };
283
+ bordered: {
284
+ type: BooleanConstructor;
285
+ default: boolean;
286
+ };
279
287
  }>> & {
280
288
  onFormChange?: ((...args: any[]) => any) | undefined;
281
289
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -719,6 +727,10 @@ declare const _default: import("vue").DefineComponent<{}, {
719
727
  linebarAutoHidden: {
720
728
  type: BooleanConstructor;
721
729
  };
730
+ bordered: {
731
+ type: BooleanConstructor;
732
+ default: boolean;
733
+ };
722
734
  }>> & {
723
735
  onFormChange?: ((...args: any[]) => any) | undefined;
724
736
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -734,6 +746,7 @@ declare const _default: import("vue").DefineComponent<{}, {
734
746
  consumer: boolean;
735
747
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
736
748
  linebarAutoHidden: boolean;
749
+ bordered: boolean;
737
750
  }>;
738
751
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
739
752
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -44,6 +44,8 @@ declare const _default: import("vue").DefineComponent<{
44
44
  vali_obj?: string | undefined;
45
45
  max_value?: string | number | undefined;
46
46
  min_value?: string | number | undefined;
47
+ min_date?: string | undefined;
48
+ max_date?: string | undefined;
47
49
  min_length?: string | number | undefined;
48
50
  max_length?: string | number | undefined;
49
51
  decimal_length?: string | number | undefined;
@@ -1749,6 +1751,8 @@ declare const _default: import("vue").DefineComponent<{
1749
1751
  vali_obj?: string | undefined;
1750
1752
  max_value?: string | number | undefined;
1751
1753
  min_value?: string | number | undefined;
1754
+ min_date?: string | undefined;
1755
+ max_date?: string | undefined;
1752
1756
  min_length?: string | number | undefined;
1753
1757
  max_length?: string | number | undefined;
1754
1758
  decimal_length?: string | number | undefined;
@@ -3426,6 +3430,8 @@ declare const _default: import("vue").DefineComponent<{
3426
3430
  vali_obj?: string | undefined;
3427
3431
  max_value?: string | number | undefined;
3428
3432
  min_value?: string | number | undefined;
3433
+ min_date?: string | undefined;
3434
+ max_date?: string | undefined;
3429
3435
  min_length?: string | number | undefined;
3430
3436
  max_length?: string | number | undefined;
3431
3437
  decimal_length?: string | number | undefined;
@@ -5220,6 +5226,10 @@ declare const _default: import("vue").DefineComponent<{
5220
5226
  linebarAutoHidden: {
5221
5227
  type: BooleanConstructor;
5222
5228
  };
5229
+ bordered: {
5230
+ type: BooleanConstructor;
5231
+ default: boolean;
5232
+ };
5223
5233
  }, {
5224
5234
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
5225
5235
  fieldList: {
@@ -5348,6 +5358,10 @@ declare const _default: import("vue").DefineComponent<{
5348
5358
  linebarAutoHidden: {
5349
5359
  type: BooleanConstructor;
5350
5360
  };
5361
+ bordered: {
5362
+ type: BooleanConstructor;
5363
+ default: boolean;
5364
+ };
5351
5365
  }>> & {
5352
5366
  onFormChange?: ((...args: any[]) => any) | undefined;
5353
5367
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -5791,6 +5805,10 @@ declare const _default: import("vue").DefineComponent<{
5791
5805
  linebarAutoHidden: {
5792
5806
  type: BooleanConstructor;
5793
5807
  };
5808
+ bordered: {
5809
+ type: BooleanConstructor;
5810
+ default: boolean;
5811
+ };
5794
5812
  }>> & {
5795
5813
  onFormChange?: ((...args: any[]) => any) | undefined;
5796
5814
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -5806,6 +5824,7 @@ declare const _default: import("vue").DefineComponent<{
5806
5824
  consumer: boolean;
5807
5825
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
5808
5826
  linebarAutoHidden: boolean;
5827
+ bordered: boolean;
5809
5828
  }>;
5810
5829
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
5811
5830
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -135,6 +135,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
135
135
  linebarAutoHidden: {
136
136
  type: BooleanConstructor;
137
137
  };
138
+ bordered: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
138
142
  }, {
139
143
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
140
144
  fieldList: {
@@ -263,6 +267,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
263
267
  linebarAutoHidden: {
264
268
  type: BooleanConstructor;
265
269
  };
270
+ bordered: {
271
+ type: BooleanConstructor;
272
+ default: boolean;
273
+ };
266
274
  }>> & {
267
275
  onFormChange?: ((...args: any[]) => any) | undefined;
268
276
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -706,6 +714,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
706
714
  linebarAutoHidden: {
707
715
  type: BooleanConstructor;
708
716
  };
717
+ bordered: {
718
+ type: BooleanConstructor;
719
+ default: boolean;
720
+ };
709
721
  }>> & {
710
722
  onFormChange?: ((...args: any[]) => any) | undefined;
711
723
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -721,6 +733,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
721
733
  consumer: boolean;
722
734
  enterToNextWidget: boolean | ((fieldItem: import("./src/types").FieldItem) => boolean | void);
723
735
  linebarAutoHidden: boolean;
736
+ bordered: boolean;
724
737
  }>;
725
738
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
726
739
  export default FormRender;
@@ -129,6 +129,10 @@ declare const _default: import("vue").DefineComponent<{
129
129
  linebarAutoHidden: {
130
130
  type: BooleanConstructor;
131
131
  };
132
+ bordered: {
133
+ type: BooleanConstructor;
134
+ default: boolean;
135
+ };
132
136
  }, {
133
137
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
134
138
  fieldList: {
@@ -257,6 +261,10 @@ declare const _default: import("vue").DefineComponent<{
257
261
  linebarAutoHidden: {
258
262
  type: BooleanConstructor;
259
263
  };
264
+ bordered: {
265
+ type: BooleanConstructor;
266
+ default: boolean;
267
+ };
260
268
  }>> & {
261
269
  onFormChange?: ((...args: any[]) => any) | undefined;
262
270
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -700,6 +708,10 @@ declare const _default: import("vue").DefineComponent<{
700
708
  linebarAutoHidden: {
701
709
  type: BooleanConstructor;
702
710
  };
711
+ bordered: {
712
+ type: BooleanConstructor;
713
+ default: boolean;
714
+ };
703
715
  }>> & {
704
716
  onFormChange?: ((...args: any[]) => any) | undefined;
705
717
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -715,5 +727,6 @@ declare const _default: import("vue").DefineComponent<{
715
727
  consumer: boolean;
716
728
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
717
729
  linebarAutoHidden: boolean;
730
+ bordered: boolean;
718
731
  }>;
719
732
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,openBlock as i,createBlock as l,unref as n,normalizeStyle as m,withCtx as p,createElementBlock as u,createVNode as d,isRef as c,Fragment as f,renderList as h,createCommentVNode as y,createElementVNode as j,withKeys as g,withModifiers as v,toDisplayString as b,renderSlot as k}from"vue";import{useTheme as F}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as x,cloneDeep as C}from"lodash-es";import{createForm as H,onFieldValueChange as S,onFieldMount as A,onFieldUnmount as R,onFieldReact as L,onFormMount as _}from"@formily/core";import{FormProvider as O,FormConsumer as w}from"@formily/vue";import{NForm as B,NTabs as V,NTabPane as I,NConfigProvider as N}from"naive-ui";import{InjectionFormGraph as D}from"./constants/index.js";import{useAutoHidden as q}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as U}from"./hooks/useComplexOptions.js";import{useFormDomEvent as W,useFormExposeEvent as G}from"./hooks/useFormEvent.js";import{useFormGraph as T}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as K}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeReactions as M}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as E}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as P}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as J}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as $}from"./hooks/useFormValidator.js";import{useAnchor as z}from"./hooks/useAnchor.js";import{useFormContext as Q}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import X from"../../../_virtual/plugin-vue_export-helper.js";import{createObjSchema as Y}from"./utils/schema.js";const Z={key:0,style:{height:"54px"}},ee={style:{"white-space":"pre"}};var oe=X(e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:X,emit:oe}){const te=e,re=F(),{nuiThemeOverrides:se}=E();$();const ae=o(),ie=t((()=>x(te.maxHeight)?te.maxHeight+"px":te.maxHeight)),{SchemaField:le,businessCollector:ne,formItemDepsCollector:me,changeContextCollector:pe,formUUID:ue}=Q(te,oe),{anchorBarRef:de,currentAnchor:ce,generateAnchorList:fe,updateAnchorList:he,anchorIdList:ye,onScroll:je}=z(te,oe,ae,me);K(te).callLifeCycle("onSetup");const{trigger:ge}=q(),{observeFormGraph:ve,setGraph:be,removeGraph:ke}=T();r(D,ve);const Fe=H({initialValues:te.initialData,effects(e){S("*",(o=>{const t=o.props.name.toString();ne.trigger(e,t),me.trigger(t),oe("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:pe.getContext(t,o.value)}),xe(t,o.value)})),A("*",be),R("*",ke),te.linebarAutoHidden&&(L("*",ge),_((e=>e.query("*").forEach(ge)))),te.anchor&&(L("*",he),_(fe))}}),{lowCodeReactionsHandler:xe,triggerAllReactionsHandler:Ce}=M(t((()=>te.lowCodeReactions)),Fe);s(Ce);const{schemaAdaptor:He}=P(ne);let Se=te.fieldList||[];const Ae=t((()=>te.schema?te.schema:te.fieldList?(Se=J().traverse(C(te.fieldList),te.fieldVisitor),Y(He(Se))):Y({}))),{onKeydown:Re}=W({formModel:Fe,formRenderRef:ae,props:te}),{clearSpan:Le}=U();a((()=>Le(ue)));const _e=G({formModel:Fe,formRenderRef:ae,formItemDepsCollector:me,getFieldList:()=>Se,formUUID:ue});return X({formModel:Fe,validate:(e="*")=>_e.validate(e),getFormValues:(e=!0)=>_e.getFormValues(e),setFormValues:(e,o=!0)=>_e.setFormValues(e,o),setFieldState(e,o){_e.setFieldState(e,o)},resetFields(e="*"){_e.resetFields(e)},queryWidget:async e=>_e.queryWidget(e),getFieldList:()=>Se,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(i(),l(n(B),{class:"form-render","require-mark-placement":"left",style:m(n(re))},{default:p((()=>[e.anchor?(i(),u("section",Z,[d(n(V),{value:n(ce),"onUpdate:value":t[0]||(t[0]=e=>c(ce)?ce.value=e:null),type:"line",ref_key:"anchorBarRef",ref:de},{default:p((()=>[(i(!0),u(f,null,h(n(ye),(e=>(i(),l(n(I),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):y("v-if",!0),d(n(N),{"theme-overrides":n(se)},{default:p((()=>[j("section",{class:"form-render__wrapper",style:m({"--column":e.column,"--form-height":n(ie)}),ref_key:"formRenderRef",ref:ae,onScroll:t[1]||(t[1]=(...e)=>n(je)&&n(je)(...e)),onKeydownCapture:t[2]||(t[2]=g(v(((...e)=>n(Re)&&n(Re)(...e)),["prevent"]),["enter"]))},[d(n(O),{form:n(Fe)},{default:p((()=>[d(n(le),{schema:n(Ae)},null,8,["schema"]),e.consumer?(i(),l(n(w),{key:0},{default:p((({form:e})=>[j("div",ee,b(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),k(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["style"]))}}),[["__file","FormRender.vue"]]);export{oe as default};
1
+ import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,openBlock as i,createBlock as l,unref as n,normalizeClass as m,normalizeStyle as p,withCtx as d,createElementBlock as u,createVNode as c,isRef as f,Fragment as h,renderList as y,createCommentVNode as j,createElementVNode as b,withKeys as g,withModifiers as v,toDisplayString as k,renderSlot as F}from"vue";import{useTheme as x}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as C,cloneDeep as H}from"lodash-es";import{createForm as S,onFieldValueChange as A,onFieldMount as R,onFieldUnmount as L,onFieldReact as _,onFormMount as O}from"@formily/core";import{FormProvider as B,FormConsumer as w}from"@formily/vue";import{NForm as V,NTabs as I,NTabPane as N,NConfigProvider as D}from"naive-ui";import{InjectionFormGraph as q}from"./constants/index.js";import{useAutoHidden as U}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as W}from"./hooks/useComplexOptions.js";import{useFormDomEvent as G,useFormExposeEvent as T}from"./hooks/useFormEvent.js";import{useFormGraph as K}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as M}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeReactions as E}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as P}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as J}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as $}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as z}from"./hooks/useFormValidator.js";import{useAnchor as Q}from"./hooks/useAnchor.js";import{useFormContext as X}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import Y from"../../../_virtual/plugin-vue_export-helper.js";import{createObjSchema as Z}from"./utils/schema.js";const ee={key:0,style:{height:"54px"}},oe={style:{"white-space":"pre"}};var te=Y(e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean},bordered:{type:Boolean,default:!0}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:Y,emit:te}){const re=e,se=x(),{nuiThemeOverrides:ae}=P();z();const ie=o(),le=t((()=>C(re.maxHeight)?re.maxHeight+"px":re.maxHeight)),{SchemaField:ne,businessCollector:me,formItemDepsCollector:pe,changeContextCollector:de,formUUID:ue}=X(re,te),{anchorBarRef:ce,currentAnchor:fe,generateAnchorList:he,updateAnchorList:ye,anchorIdList:je,onScroll:be}=Q(re,te,ie,pe);M(re).callLifeCycle("onSetup");const{trigger:ge}=U(),{observeFormGraph:ve,setGraph:ke,removeGraph:Fe}=K();r(q,ve);const xe=S({initialValues:re.initialData,effects(e){A("*",(o=>{const t=o.props.name.toString();me.trigger(e,t),pe.trigger(t),te("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:de.getContext(t,o.value)}),Ce(t,o.value)})),R("*",ke),L("*",Fe),re.linebarAutoHidden&&(_("*",ge),O((e=>e.query("*").forEach(ge)))),re.anchor&&(_("*",ye),O(he))}}),{lowCodeReactionsHandler:Ce,triggerAllReactionsHandler:He}=E(t((()=>re.lowCodeReactions)),xe);s(He);const{schemaAdaptor:Se}=J(me);let Ae=re.fieldList||[];const Re=t((()=>re.schema?re.schema:re.fieldList?(Ae=$().traverse(H(re.fieldList),re.fieldVisitor),Z(Se(Ae))):Z({}))),{onKeydown:Le}=G({formModel:xe,formRenderRef:ie,props:re}),{clearSpan:_e}=W();a((()=>_e(ue)));const Oe=T({formModel:xe,formRenderRef:ie,formItemDepsCollector:pe,getFieldList:()=>Ae,formUUID:ue});return Y({formModel:xe,validate:(e="*")=>Oe.validate(e),getFormValues:(e=!0)=>Oe.getFormValues(e),setFormValues:(e,o=!0)=>Oe.setFormValues(e,o),setFieldState(e,o){Oe.setFieldState(e,o)},resetFields(e="*"){Oe.resetFields(e)},queryWidget:async e=>Oe.queryWidget(e),getFieldList:()=>Ae,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(i(),l(n(V),{class:m(["form-render",{"form-render--no-border":!e.bordered}]),"require-mark-placement":"left",style:p(n(se))},{default:d((()=>[e.anchor?(i(),u("section",ee,[c(n(I),{value:n(fe),"onUpdate:value":t[0]||(t[0]=e=>f(fe)?fe.value=e:null),type:"line",ref_key:"anchorBarRef",ref:ce},{default:d((()=>[(i(!0),u(h,null,y(n(je),(e=>(i(),l(n(N),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):j("v-if",!0),c(n(D),{"theme-overrides":n(ae)},{default:d((()=>[b("section",{class:"form-render__wrapper",style:p({"--column":e.column,"--form-height":n(le)}),ref_key:"formRenderRef",ref:ie,onScroll:t[1]||(t[1]=(...e)=>n(be)&&n(be)(...e)),onKeydownCapture:t[2]||(t[2]=g(v(((...e)=>n(Le)&&n(Le)(...e)),["prevent"]),["enter"]))},[c(n(B),{form:n(xe)},{default:d((()=>[c(n(ne),{schema:n(Re)},null,8,["schema"]),e.consumer?(i(),l(n(w),{key:0},{default:d((({form:e})=>[b("div",oe,k(JSON.stringify(e.values,null,2)),1)])),_:1})):j("v-if",!0),F(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}}),[["__file","FormRender.vue"]]);export{te as default};
@@ -133,6 +133,10 @@ declare const _default: import("vue").DefineComponent<{}, {
133
133
  linebarAutoHidden: {
134
134
  type: BooleanConstructor;
135
135
  };
136
+ bordered: {
137
+ type: BooleanConstructor;
138
+ default: boolean;
139
+ };
136
140
  }, {
137
141
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
138
142
  fieldList: {
@@ -261,6 +265,10 @@ declare const _default: import("vue").DefineComponent<{}, {
261
265
  linebarAutoHidden: {
262
266
  type: BooleanConstructor;
263
267
  };
268
+ bordered: {
269
+ type: BooleanConstructor;
270
+ default: boolean;
271
+ };
264
272
  }>> & {
265
273
  onFormChange?: ((...args: any[]) => any) | undefined;
266
274
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -704,6 +712,10 @@ declare const _default: import("vue").DefineComponent<{}, {
704
712
  linebarAutoHidden: {
705
713
  type: BooleanConstructor;
706
714
  };
715
+ bordered: {
716
+ type: BooleanConstructor;
717
+ default: boolean;
718
+ };
707
719
  }>> & {
708
720
  onFormChange?: ((...args: any[]) => any) | undefined;
709
721
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -719,6 +731,7 @@ declare const _default: import("vue").DefineComponent<{}, {
719
731
  consumer: boolean;
720
732
  enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
721
733
  linebarAutoHidden: boolean;
734
+ bordered: boolean;
722
735
  }>;
723
736
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
724
737
  export default _default;
@@ -11,6 +11,8 @@ export declare const DATE: import("vue").DefineComponent<{
11
11
  vali_obj: string;
12
12
  max_value: string | number;
13
13
  min_value: string | number;
14
+ min_date: string;
15
+ max_date: string;
14
16
  min_length: string | number;
15
17
  max_length: string | number;
16
18
  decimal_length: string | number;
@@ -35,6 +37,8 @@ export declare const DATE: import("vue").DefineComponent<{
35
37
  vali_obj: string;
36
38
  max_value: string | number;
37
39
  min_value: string | number;
40
+ min_date: string;
41
+ max_date: string;
38
42
  min_length: string | number;
39
43
  max_length: string | number;
40
44
  decimal_length: string | number;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,watch as r,createVNode as n,mergeProps as a}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as o,mapProps as i}from"@formily/vue";import{isObject as l}from"@vueuse/core";import{format as s}from"date-fns";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import"../../utils/index.js";import d from"../../../../date-picker/index.js";import{assignUpdateValue as v,assignClearBindVisited as c}from"../../utils/schema.js";const f=o(e({props:{onChange:{},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"}},emits:["update:value"],setup(e,{emit:o}){const{injectValueValidate:i,injectValueBindKey:v}=m();function c(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function f(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function p(e){return c()&&e<Date.now()-864e5||f()&&e>Date.now()}function D(e){const t=new Date(e),r=new Date,n=new Date(t);return n.setHours(0),n.setMinutes(0),n.setSeconds(0),{isHourDisabled:function(e){return!i()&&(c()&&e<u()||f()&&e>u())},isMinuteDisabled:function(e){if(i())return!1;if(a()===u())return c()&&e<o()||f()&&e>o();return c()&&a()<u()||f()&&a()>u()}};function a(){return t.getHours()}function u(){return r.getHours()}function o(){return r.getMinutes()}function i(){return n>r}}i((()=>e.value));const y=t((()=>{const t={};if(l(e.validate)){const{min_date:r,max_date:n}=e.validate;(r||n)&&(t.isDateDisabled=p,t.isTimeDisabled=D)}return t})),j=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function g(t){return t?s(new Date(t),e.valueFormat):t}r((()=>e.value),(e=>{e&&g(e)!==e&&o("update:value",g(e))}));const w=t({get:()=>g(e.value),set:e=>{o("update:value",e)}}),x=v(w);return()=>n(d,a({key:x.value},y.value,j.value,{"formatted-value":w.value,"onUpdate:formatted-value":e=>w.value=e}),null)}}),i(v,c));export{f as DATE};
1
+ import{defineComponent as e,computed as t,watch as a,createVNode as r,mergeProps as n}from"vue";import{generateTimeFormat as o}from"../../../../../shared/utils/index.js";import{connect as u,mapProps as i}from"@formily/vue";import{isObject as s}from"@vueuse/core";import{format as l}from"date-fns";import m from"../../../../date-picker/index.js";import{useCommonInjection as d}from"../../hooks/useCommonInjection.js";import"../../utils/index.js";import{assignUpdateValue as v,assignClearBindVisited as c}from"../../utils/schema.js";const f=u(e({props:{onChange:{},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"}},emits:["update:value"],setup(e,{emit:u}){const{injectValueValidate:i,injectValueBindKey:v}=d();function c(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function f(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function p(e){return c()&&e<Date.now()-864e5||f()&&e>Date.now()}function D(e){const t=new Date(e),a=new Date,r=new Date(t);r.setHours(0),r.setMinutes(0),r.setSeconds(0);const n=new Date(t);n.setHours(23),n.setMinutes(59),n.setSeconds(59);const o=r>a,u=n<a,i=t.getHours(),s=a.getHours(),l=a.getMinutes();return{isHourDisabled:function(e){return c()&&!o&&e<s||f()&&!u&&e>s},isMinuteDisabled:function(e){if(i===s)return c()&&!o&&e<l||f()&&!u&&e>l;return c()&&!o&&i<s||f()&&!u&&i>s}}}i((()=>e.value));const y=t((()=>{const t={};if(s(e.validate)){const{min_date:a,max_date:r}=e.validate;(a||r)&&(t.isDateDisabled=p,t.isTimeDisabled=D)}return t})),j=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:o(e.valueFormat)}})));function g(t){return t?l(new Date(t),e.valueFormat):t}a((()=>e.value),(e=>{e&&g(e)!==e&&u("update:value",g(e))}));const w=t({get:()=>g(e.value),set:e=>{u("update:value",e)}}),x=v(w);return()=>r(m,n({key:x.value},y.value,j.value,{"formatted-value":w.value,"onUpdate:formatted-value":e=>w.value=e}),null)}}),i(v,c));export{f as DATE};