Files
qhmes/deploy-qhmes/frontend/js/vxeUtils-DQ1rq-ie.js
2026-05-15 11:34:12 +08:00

2 lines
1.5 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var y=(e,n,t)=>new Promise((u,f)=>{var a=i=>{try{r(t.next(i))}catch(o){f(o)}},s=i=>{try{r(t.throw(i))}catch(o){f(o)}},r=i=>i.done?u(i.value):Promise.resolve(i.value).then(a,s);r((t=t.apply(e,n)).next())});import{z as v}from"./index-BI6CMai0.js";import"./vue-vendor-C7Zq48Yl.js";import"./antd-vue-vendor-BPnV8VqP.js";import"./vxe-table-vendor-B88kchpX.js";const c=Symbol();function w(e,n,t,u,f){return y(this,null,function*(){if(!(e&&typeof e=="function"))throw`validate 参数需要的是一个方法而传入的却是${typeof e}`;let a={},s=yield new Promise((i,o)=>{e().then(()=>{for(let l in n)n[l]instanceof Array&&v(u,l)==="string"&&(n[l]=n[l].join(","));i(n)}).catch(({errorFields:l})=>{o({error:c,index:0,errorFields:l})})});Object.assign(a,{formValue:s});let r=yield T(t,f);return a=Object.assign(a,{tablesValue:r}),a})}function T(e,n=!0){if(!(e instanceof Array))throw`'validateTables'函数的'cases'参数需要的是一个数组而传入的却是${typeof e}`;return new Promise((t,u)=>{let f=[],a=0;(!e||e.length===0)&&t(f),(function s(){let r=e[a];r.value.validateTable().then(i=>{if(!i)f[a]={tableData:r.value.getTableData()},++a===e.length?t(f):s();else{let o,l=p(r.value,"ATabPane");if(l&&(o=l.$.vnode.key,n)){let b=p(l,"Tabs");b&&b.setActiveKey&&b.setActiveKey(o)}u({error:c,index:a,paneKey:o,errMap:i,subIndex:a})}})})()})}function p(e,n){let t=e.$parent;if(t&&t.$options){if(t.$options.name===n)return t;{let u=p(t,n);if(u)return u}}return null}export{c as VALIDATE_FAILED,p as getVmParentByName,w as validateFormModelAndTables,T as validateTables};