@gopowerteam/form-render 0.0.27 → 0.0.28
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/cjs/index.cjs +1 -1
- package/dist/es/index.mjs +262 -257
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),f=require("@arco-design/web-vue"),g=require("dayjs"),_=require("./resolver.cjs");const j=Symbol("ArcoConfigProvider"),D="arco",O="$arco",N=e=>{var r,l,t;const u=a.getCurrentInstance(),d=a.inject(j,void 0),c=(t=(l=d==null?void 0:d.prefixCls)!=null?l:(r=u==null?void 0:u.appContext.config.globalProperties[O])==null?void 0:r.classPrefix)!=null?t:D;return e?`${c}-${e}`:c},M=Object.prototype.toString;function w(e){return M.call(e)==="[object Number]"&&e===e}var x=(e,r)=>{for(const[l,t]of r)e[l]=t;return e};const z=a.defineComponent({name:"IconDown",props:{size:{type:[Number,String]},strokeWidth:{type:Number,default:4},strokeLinecap:{type:String,default:"butt",validator:e=>["butt","round","square"].includes(e)},strokeLinejoin:{type:String,default:"miter",validator:e=>["arcs","bevel","miter","miter-clip","round"].includes(e)},rotate:Number,spin:Boolean},emits:{click:e=>!0},setup(e,{emit:r}){const l=N("icon"),t=a.computed(()=>[l,`${l}-down`,{[`${l}-spin`]:e.spin}]),u=a.computed(()=>{const c={};return e.size&&(c.fontSize=w(e.size)?`${e.size}px`:e.size),e.rotate&&(c.transform=`rotate(${e.rotate}deg)`),c});return{cls:t,innerStyle:u,onClick:c=>{r("click",c)}}}}),T=["stroke-width","stroke-linecap","stroke-linejoin"],L=a.createElementVNode("path",{d:"M39.6 17.443 24.043 33 8.487 17.443"},null,-1),P=[L];function R(e,r,l,t,u,d){return a.openBlock(),a.createElementBlock("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:a.normalizeClass(e.cls),style:a.normalizeStyle(e.innerStyle),"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,onClick:r[0]||(r[0]=(...c)=>e.onClick&&e.onClick(...c))},P,14,T)}var S=x(z,[["render",R]]);const U=Object.assign(S,{install:(e,r)=>{var l;const t=(l=r==null?void 0:r.iconPrefix)!=null?l:"";e.component(t+S.name,S)}}),B=a.defineComponent({name:"IconUp",props:{size:{type:[Number,String]},strokeWidth:{type:Number,default:4},strokeLinecap:{type:String,default:"butt",validator:e=>["butt","round","square"].includes(e)},strokeLinejoin:{type:String,default:"miter",validator:e=>["arcs","bevel","miter","miter-clip","round"].includes(e)},rotate:Number,spin:Boolean},emits:{click:e=>!0},setup(e,{emit:r}){const l=N("icon"),t=a.computed(()=>[l,`${l}-up`,{[`${l}-spin`]:e.spin}]),u=a.computed(()=>{const c={};return e.size&&(c.fontSize=w(e.size)?`${e.size}px`:e.size),e.rotate&&(c.transform=`rotate(${e.rotate}deg)`),c});return{cls:t,innerStyle:u,onClick:c=>{r("click",c)}}}}),q=["stroke-width","stroke-linecap","stroke-linejoin"],E=a.createElementVNode("path",{d:"M39.6 30.557 24.043 15 8.487 30.557"},null,-1),A=[E];function W(e,r,l,t,u,d){return a.openBlock(),a.createElementBlock("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:a.normalizeClass(e.cls),style:a.normalizeStyle(e.innerStyle),"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,onClick:r[0]||(r[0]=(...c)=>e.onClick&&e.onClick(...c))},A,14,q)}var V=x(B,[["render",W]]);const Y=Object.assign(V,{install:(e,r)=>{var l;const t=(l=r==null?void 0:r.iconPrefix)!=null?l:"";e.component(t+V.name,V)}}),$={id:Symbol("ID"),source:Symbol("Source")};function G(e,r){const l=a.ref({});return e==null||e.forEach(u=>{let d=null;u.default&&(d=(typeof u.default=="function"?u.default():u.default)||null),r&&r[u.key]!==void 0&&(d=r[u.key]),l.value[u.key]=d}),[l,u=>{l.value=u}]}function K(e){function r(l,t){return e!=null&&e.disabledDate?e.disabledDate(l,t):!1}return(l,t)=>{switch(e==null?void 0:e.type){case"week":return a.createVNode(f.WeekPicker,{modelValue:l[t.key],"onUpdate:modelValue":u=>l[t.key]=u,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"month":return a.createVNode(f.MonthPicker,{modelValue:l[t.key],"onUpdate:modelValue":u=>l[t.key]=u,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"quarter":return a.createVNode(f.QuarterPicker,{modelValue:l[t.key],"onUpdate:modelValue":u=>l[t.key]=u,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"year":return a.createVNode(f.YearPicker,{modelValue:l[t.key],"onUpdate:modelValue":u=>l[t.key]=u,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"date":default:return a.createVNode(f.DatePicker,{modelValue:l[t.key],"onUpdate:modelValue":u=>l[t.key]=u,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null)}}}function Q(e){return(r,l)=>{switch(e==null?void 0:e.type){case"number":return a.createVNode(f.InputNumber,{modelValue:r[l.key],"onUpdate:modelValue":t=>r[l.key]=t,hideButton:!0,"read-only":e==null?void 0:e.readonly,placeholder:e==null?void 0:e.placeholder,allowClear:e==null?void 0:e.clearable},null);case"string":default:return a.createVNode(f.Input,{modelValue:r[l.key],"onUpdate:modelValue":t=>r[l.key]=t,placeholder:e==null?void 0:e.placeholder,readonly:e==null?void 0:e.readonly,allowClear:e==null?void 0:e.clearable},null)}}}function X(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const k=new WeakMap;function H(e){let r,l=!1;const t=a.ref(new Map),u=n=>t.value=n,d=()=>{if(!e.autoSumbit||!r)return;let n=r;for(;n&&n.$el.tagName!=="FORM";)n=n.$parent;n&&n.$el&&n.$el.dispatchEvent(new Event("submit"))},c=async()=>{const n=await e.options();if(e.cache===!1&&(t.value=n),e.cache!==!1&&k.has(e.options)){const s=k.get(e.options);typeof s=="function"&&s(n),k.set(e.options,n)}else t.value=n};switch(!0){case e.options instanceof Function:{const n=k.get(e.options);if(e.cache!==!1&&typeof n=="function")break;if(e.cache!==!1&&n instanceof Map){u(n);break}c(),e.cache!==!1&&k.set(e.options,s=>{t.value=s});break}default:t.value=e.options}return(n,s)=>{let o;return e.default&&!l&&(n[s.key]=e.default,l=!0),a.createVNode(f.Select,{ref:i=>r=i,multiple:e.multiple,modelValue:n[s.key],"onUpdate:modelValue":i=>n[s.key]=i,placeholder:e.placeholder,allowClear:e.clearable,allowSearch:e.searchable,maxTagCount:e.maxTagCount??2,onChange:d},X(o=Array.from(t.value.entries()).map(([i,y])=>a.createVNode(f.Option,{key:i,value:i,label:y},null)))?o:{default:()=>[o]})}}function J(e){function r(){e!=null&&e.autoSumbit}return(l,t)=>(e!=null&&e.default&&(l[t.key]=e.default),a.createVNode(f.Switch,{modelValue:l[t.key],"onUpdate:modelValue":u=>l[t.key]=u,checkedText:(e==null?void 0:e.openLabel)??"是",uncheckedText:(e==null?void 0:e.closeLabel)??"否",checkedValue:(e==null?void 0:e.openValue)??!0,uncheckedValue:(e==null?void 0:e.closeValue)??!1,onChange:r},null))}function Z(e){return(r,l)=>{let t=[];function u(n){t=n}function d(n){if(n&&n.length===2){const[s,o]=n.sort(),i=g(s).startOf("days"),y=g(o).endOf("days");r[l.key]=[i.format((e==null?void 0:e.valueFormat)||"YYYY-MM-DD"),y.format((e==null?void 0:e.valueFormat)||"YYYY-MM-DD")]}}function c(n){return e!=null&&e.disabledDate?e.disabledDate(t,n):!1}return a.createVNode("div",null,[a.createVNode(f.RangePicker,{style:{width:"300px"},modelValue:r[l.key],"onUpdate:modelValue":n=>r[l.key]=n,onSelect:u,onChange:d,mode:e==null?void 0:e.type,allowClear:e==null?void 0:e.clearable,"disabled-date":c,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null)])}}function p(e){return(r,l)=>a.createVNode(f.Textarea,{modelValue:r[l.key],"onUpdate:modelValue":t=>r[l.key]=t,placeholder:e==null?void 0:e.placeholder,autoSize:e==null?void 0:e.autosize,maxLength:e==null?void 0:e.maxLength},null)}const b=new Map;function ee(e){let r,l=!1;const t=a.ref([]),u=()=>{if(!e.autoSumbit||!r)return;let n=r;for(;n&&n.$el.tagName!=="FORM";)n=n.$parent;n&&n.$el&&n.$el.dispatchEvent(new Event("submit"))},d=async()=>{const n=await e.options();if(e.cache!==!1&&b.has(e.options)){const s=b.get(e.options);typeof s=="function"&&s(n),b.delete(e.options)}else t.value=n};switch(!0){case e.options instanceof Function:{if(e.cache!==!1&&b.has(e.options))break;d(),e.cache!==!1&&b.set(e.options,n=>{t.value=n});break}default:t.value=e.options}function c(n,s){var y;const o=((y=e.fieldNames)==null?void 0:y.title)||"title",i=s[o];return i?i.toLowerCase().includes(n.toLowerCase()):!1}return(n,s)=>(e.default&&!l&&(n[s.key]=e.default,l=!0),a.createVNode(f.TreeSelect,{ref:o=>r=o,multiple:e.multiple,modelValue:n[s.key],"onUpdate:modelValue":o=>n[s.key]=o,placeholder:e.placeholder,allowClear:e.clearable,allowSearch:e.searchable,maxTagCount:e.maxTagCount??2,onChange:u,filterTreeNode:c,data:t.value,fieldNames:e.fieldNames},null))}function te(e){return r=>e(r)}function re(){return{input:Q,textarea:p,select:H,treeSelect:ee,date:K,switch:J,dateRange:Z,render:te}}function le(e,r){r.render||(r.render=t=>t.input());const l=r.render({...re()});return{default:()=>l(e,r)}}function ae(e,r){return a.h(f.FormItem,{field:r.key,label:r.title},le(e,r))}function C(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const F=a.defineComponent({props:{form:{type:Object,required:!0},value:{type:Object,required:!1},layout:{type:String,required:!1,default:"horizontal"},columns:{type:Number,required:!1},modelValue:{type:Object,required:!1},minWidth:{type:Number,required:!1,default:320},name:{type:String,required:!1,default:"form"},submitable:{type:Boolean,required:!1,default:!1},searchable:{type:Boolean,required:!1,default:!1},footer:{type:Boolean,required:!1,default:!1}},emits:["submit","cancel","update:model-value"],expose:["formSource","updateFormField","updateFormSource","reset"],setup(e){const r=Math.random().toString(32).slice(2).toUpperCase(),l=a.ref(),[t,u]=G(e.form,e.modelValue||e.value),d=a.ref(e.columns||0),c=a.ref(!0),n=()=>c.value=!c.value;a.provide($.id,r),a.provide($.source,t);const s=a.computed(()=>{if(!d.value)return 1;const m=e.form.reduce((h,v)=>h+((v==null?void 0:v.span)||1),0);return d.value-m%d.value}),o=a.computed(()=>e.form.reduce((m,h)=>(h.rule&&(m[h.key]=h.rule),m),{}));function i(){var h;if(e.columns)return;const m=(h=l.value)==null?void 0:h.$el;m&&(d.value=Math.floor(m.offsetWidth/e.minWidth))}a.onMounted(()=>{i()});function y(m,h){t.value[m]=h,u({...t})}function I(){var m;(m=l.value)==null||m.resetFields()}return window.addEventListener("resize",i),{formId:r,formSource:t,formInstance:l,formColumns:d,formRules:o,formCollspased:c,formActiosSpan:s,toggleFormCollapsed:n,updateFormField:y,updateFormSource:u,reset:I}},render(){const e=()=>{this.$emit("submit",this.formSource),this.$emit("update:model-value",this.formSource)},r=()=>{const t=[],u=this.footer?{span:this.formColumns}:{span:this.formActiosSpan};if(this.searchable&&(t.push(a.createVNode(f.Button,{type:"primary",htmlType:"submit"},{default:()=>[a.createTextVNode("搜索")]})),t.push(a.createVNode(f.Button,{type:"secondary",onClick:()=>{var d;return(d=this.formInstance)==null?void 0:d.resetFields()}},{default:()=>[a.createTextVNode("重置")]}))),this.submitable&&(t.push(a.createVNode(f.Button,{type:"primary",htmlType:"submit"},{default:()=>[a.createTextVNode("提交")]})),t.push(a.createVNode(f.Button,{type:"secondary",onClick:()=>this.$emit("cancel")},{default:()=>[a.createTextVNode("取消")]}))),this.form.some(d=>!!d.collapsed)&&t.push(a.createVNode(f.Button,{onClick:this.toggleFormCollapsed},{default:()=>this.formCollspased?"展开":"收起",icon:()=>this.formCollspased?a.createVNode(U,null,null):a.createVNode(Y,null,null)})),this.$slots.actions&&t.push(...this.$slots.actions()),t.length)return a.createVNode(f.GridItem,u,{default:()=>[a.createVNode(f.FormItem,{hideLabel:!0,contentClass:this.footer?"form-footer":""},{default:()=>[a.createVNode(f.Space,null,C(t)?t:{default:()=>[t]})]})]})},l=this.form.filter(t=>this.formCollspased?!t.collapsed:!0).filter(t=>{switch(!0){case typeof t.visiable=="boolean":return t.visiable;case typeof t.visiable=="function":return t.visiable(this.formSource);default:return!0}});return a.createVNode("div",{class:"form-render"},[a.createVNode(f.Form,a.mergeProps({layout:this.$props.layout,rules:this.formRules,onSubmitSuccess:e},{name:this.name},{"auto-label-width":!0,ref:t=>this.formInstance=t,model:this.formSource}),{default:()=>[a.createVNode(f.Grid,{cols:this.formColumns,"col-gap":10,"rol-gap":10},{default:()=>[l.filter(()=>this.formColumns!==0).map(t=>{let u;return a.createVNode(f.GridItem,{span:t.span},C(u=ae(this.formSource,t))?u:{default:()=>[u]})}),r()]})]})])}});function ne(e){return e}function ue(e){const r=a.getCurrentInstance(),l=a.ref();function t(){var d,c;const u=(c=(d=r==null?void 0:r.proxy)==null?void 0:d.$refs)==null?void 0:c[e];u&&(l.value=u)}return a.onMounted(t),a.onUpdated(t),l}const ce={install(e,r){e.component("FormRender",F)}};exports.FormRenderResolver=_.FormRenderResolver;exports.FormRender=F;exports.default=ce;exports.defineForm=ne;exports.useForm=ue;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),s=require("@arco-design/web-vue"),$=require("dayjs"),_=require("./resolver.cjs");const O=Symbol("ArcoConfigProvider"),j="arco",D="$arco",w=e=>{var r,l,t;const n=a.getCurrentInstance(),f=a.inject(O,void 0),d=(t=(l=f==null?void 0:f.prefixCls)!=null?l:(r=n==null?void 0:n.appContext.config.globalProperties[D])==null?void 0:r.classPrefix)!=null?t:j;return e?`${d}-${e}`:d},M=Object.prototype.toString;function x(e){return M.call(e)==="[object Number]"&&e===e}var F=(e,r)=>{for(const[l,t]of r)e[l]=t;return e};const z=a.defineComponent({name:"IconDown",props:{size:{type:[Number,String]},strokeWidth:{type:Number,default:4},strokeLinecap:{type:String,default:"butt",validator:e=>["butt","round","square"].includes(e)},strokeLinejoin:{type:String,default:"miter",validator:e=>["arcs","bevel","miter","miter-clip","round"].includes(e)},rotate:Number,spin:Boolean},emits:{click:e=>!0},setup(e,{emit:r}){const l=w("icon"),t=a.computed(()=>[l,`${l}-down`,{[`${l}-spin`]:e.spin}]),n=a.computed(()=>{const d={};return e.size&&(d.fontSize=x(e.size)?`${e.size}px`:e.size),e.rotate&&(d.transform=`rotate(${e.rotate}deg)`),d});return{cls:t,innerStyle:n,onClick:d=>{r("click",d)}}}}),T=["stroke-width","stroke-linecap","stroke-linejoin"],L=a.createElementVNode("path",{d:"M39.6 17.443 24.043 33 8.487 17.443"},null,-1),P=[L];function R(e,r,l,t,n,f){return a.openBlock(),a.createElementBlock("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:a.normalizeClass(e.cls),style:a.normalizeStyle(e.innerStyle),"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,onClick:r[0]||(r[0]=(...d)=>e.onClick&&e.onClick(...d))},P,14,T)}var g=F(z,[["render",R]]);const U=Object.assign(g,{install:(e,r)=>{var l;const t=(l=r==null?void 0:r.iconPrefix)!=null?l:"";e.component(t+g.name,g)}}),B=a.defineComponent({name:"IconUp",props:{size:{type:[Number,String]},strokeWidth:{type:Number,default:4},strokeLinecap:{type:String,default:"butt",validator:e=>["butt","round","square"].includes(e)},strokeLinejoin:{type:String,default:"miter",validator:e=>["arcs","bevel","miter","miter-clip","round"].includes(e)},rotate:Number,spin:Boolean},emits:{click:e=>!0},setup(e,{emit:r}){const l=w("icon"),t=a.computed(()=>[l,`${l}-up`,{[`${l}-spin`]:e.spin}]),n=a.computed(()=>{const d={};return e.size&&(d.fontSize=x(e.size)?`${e.size}px`:e.size),e.rotate&&(d.transform=`rotate(${e.rotate}deg)`),d});return{cls:t,innerStyle:n,onClick:d=>{r("click",d)}}}}),q=["stroke-width","stroke-linecap","stroke-linejoin"],E=a.createElementVNode("path",{d:"M39.6 30.557 24.043 15 8.487 30.557"},null,-1),A=[E];function W(e,r,l,t,n,f){return a.openBlock(),a.createElementBlock("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:a.normalizeClass(e.cls),style:a.normalizeStyle(e.innerStyle),"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,onClick:r[0]||(r[0]=(...d)=>e.onClick&&e.onClick(...d))},A,14,q)}var V=F(B,[["render",W]]);const Y=Object.assign(V,{install:(e,r)=>{var l;const t=(l=r==null?void 0:r.iconPrefix)!=null?l:"";e.component(t+V.name,V)}}),C={id:Symbol("ID"),source:Symbol("Source")};function G(e,r){const l=a.ref({});return e==null||e.forEach(n=>{let f=null;n.default&&(f=(typeof n.default=="function"?n.default():n.default)||null),r&&r[n.key]!==void 0&&(f=r[n.key]),l.value[n.key]=f}),[l,n=>{l.value=n}]}function K(e){function r(l,t){return e!=null&&e.disabledDate?e.disabledDate(l,t):!1}return(l,t)=>{switch(e==null?void 0:e.type){case"week":return a.createVNode(s.WeekPicker,{modelValue:l[t.key],"onUpdate:modelValue":n=>l[t.key]=n,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"month":return a.createVNode(s.MonthPicker,{modelValue:l[t.key],"onUpdate:modelValue":n=>l[t.key]=n,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"quarter":return a.createVNode(s.QuarterPicker,{modelValue:l[t.key],"onUpdate:modelValue":n=>l[t.key]=n,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"year":return a.createVNode(s.YearPicker,{modelValue:l[t.key],"onUpdate:modelValue":n=>l[t.key]=n,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null);case"date":default:return a.createVNode(s.DatePicker,{modelValue:l[t.key],"onUpdate:modelValue":n=>l[t.key]=n,"disabled-date":r,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null)}}}function Q(e){return(r,l)=>{switch(e==null?void 0:e.type){case"number":return a.createVNode(s.InputNumber,{modelValue:r[l.key],"onUpdate:modelValue":t=>r[l.key]=t,hideButton:!0,"read-only":e==null?void 0:e.readonly,placeholder:e==null?void 0:e.placeholder,allowClear:e==null?void 0:e.clearable},null);case"string":default:return a.createVNode(s.Input,{modelValue:r[l.key],"onUpdate:modelValue":t=>r[l.key]=t,placeholder:e==null?void 0:e.placeholder,readonly:e==null?void 0:e.readonly,allowClear:e==null?void 0:e.clearable},null)}}}function X(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const k=new WeakMap;function H(e){let r,l=!1;const t=a.ref(new Map),n=c=>t.value=c,f=()=>{if(!e.autoSumbit||!r)return;let c=r;for(;c&&c.$el.tagName!=="FORM";)c=c.$parent;c&&c.$el&&c.$el.dispatchEvent(new Event("submit"))},d=async()=>{const c=await e.options();if(e.cache===!1&&(t.value=c),e.cache!==!1&&k.has(e.options)){const u=k.get(e.options);typeof u=="function"&&u(c),k.set(e.options,c)}else t.value=c};switch(!0){case e.options instanceof Function:{const c=k.get(e.options);if(e.cache!==!1&&typeof c=="function")break;if(e.cache!==!1&&c instanceof Map){n(c);break}d(),e.cache!==!1&&k.set(e.options,u=>{t.value=u});break}default:t.value=e.options}return(c,u)=>{let i;return e.default&&!l&&(c[u.key]=e.default,l=!0),a.createVNode(s.Select,{ref:o=>r=o,multiple:e.multiple,modelValue:c[u.key],"onUpdate:modelValue":o=>c[u.key]=o,placeholder:e.placeholder,allowClear:e.clearable,allowSearch:e.searchable,maxTagCount:e.maxTagCount??2,onChange:f},X(i=Array.from(t.value.entries()).map(([o,y])=>a.createVNode(s.Option,{key:o,value:o,label:y},null)))?i:{default:()=>[i]})}}function J(e){function r(){e!=null&&e.autoSumbit}return(l,t)=>(e!=null&&e.default&&(l[t.key]=e.default),a.createVNode(s.Switch,{modelValue:l[t.key],"onUpdate:modelValue":n=>l[t.key]=n,checkedText:(e==null?void 0:e.openLabel)??"是",uncheckedText:(e==null?void 0:e.closeLabel)??"否",checkedValue:(e==null?void 0:e.openValue)??!0,uncheckedValue:(e==null?void 0:e.closeValue)??!1,onChange:r},null))}function Z(e){return(r,l)=>{let t=[];function n(c){t=c}function f(c){if(c&&c.length===2){const[u,i]=c.sort(),o=$(u).startOf("days"),y=$(i).endOf("days");r[l.key]=[o.format((e==null?void 0:e.valueFormat)||"YYYY-MM-DD"),y.format((e==null?void 0:e.valueFormat)||"YYYY-MM-DD")]}}function d(c){return e!=null&&e.disabledDate?e.disabledDate(t,c):!1}return a.createVNode("div",null,[a.createVNode(s.RangePicker,{style:{width:"300px"},modelValue:r[l.key],"onUpdate:modelValue":c=>r[l.key]=c,onSelect:n,onChange:f,mode:e==null?void 0:e.type,allowClear:e==null?void 0:e.clearable,"disabled-date":d,format:e==null?void 0:e.labelFormat,"value-format":e==null?void 0:e.valueFormat},null)])}}function p(e){return(r,l)=>a.createVNode(s.Textarea,{modelValue:r[l.key],"onUpdate:modelValue":t=>r[l.key]=t,placeholder:e==null?void 0:e.placeholder,autoSize:e==null?void 0:e.autosize,maxLength:e==null?void 0:e.maxLength},null)}const b=new WeakMap;function ee(e){let r,l=!1;const t=a.ref([]),n=u=>t.value=u,f=()=>{if(!e.autoSumbit||!r)return;let u=r;for(;u&&u.$el.tagName!=="FORM";)u=u.$parent;u&&u.$el&&u.$el.dispatchEvent(new Event("submit"))},d=async()=>{const u=await e.options();if(e.cache===!1&&(t.value=u),e.cache!==!1&&b.has(e.options)){const i=b.get(e.options);typeof i=="function"&&i(u),b.set(e.options,u)}else t.value=u};switch(!0){case e.options instanceof Function:{const u=b.get(e.options);if(e.cache!==!1&&typeof u=="function")break;if(e.cache!==!1&&Array.isArray(u)){n(u);break}d(),e.cache!==!1&&b.set(e.options,i=>{t.value=i});break}default:t.value=e.options}function c(u,i){var v;const o=((v=e.fieldNames)==null?void 0:v.title)||"title",y=i[o];return y?y.toLowerCase().includes(u.toLowerCase()):!1}return(u,i)=>(e.default&&!l&&(u[i.key]=e.default,l=!0),a.createVNode(s.TreeSelect,{ref:o=>r=o,multiple:e.multiple,modelValue:u[i.key],"onUpdate:modelValue":o=>u[i.key]=o,placeholder:e.placeholder,allowClear:e.clearable,allowSearch:e.searchable,maxTagCount:e.maxTagCount??2,onChange:f,filterTreeNode:c,data:t.value,fieldNames:e.fieldNames},null))}function te(e){return r=>e(r)}function re(){return{input:Q,textarea:p,select:H,treeSelect:ee,date:K,switch:J,dateRange:Z,render:te}}function le(e,r){r.render||(r.render=t=>t.input());const l=r.render({...re()});return{default:()=>l(e,r)}}function ae(e,r){return a.h(s.FormItem,{field:r.key,label:r.title},le(e,r))}function N(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const I=a.defineComponent({props:{form:{type:Object,required:!0},value:{type:Object,required:!1},layout:{type:String,required:!1,default:"horizontal"},columns:{type:Number,required:!1},modelValue:{type:Object,required:!1},minWidth:{type:Number,required:!1,default:320},name:{type:String,required:!1,default:"form"},submitable:{type:Boolean,required:!1,default:!1},searchable:{type:Boolean,required:!1,default:!1},footer:{type:Boolean,required:!1,default:!1}},emits:["submit","cancel","update:model-value"],expose:["formSource","updateFormField","updateFormSource","reset"],setup(e){const r=Math.random().toString(32).slice(2).toUpperCase(),l=a.ref(),[t,n]=G(e.form,e.modelValue||e.value),f=a.ref(e.columns||0),d=a.ref(!0),c=()=>d.value=!d.value;a.provide(C.id,r),a.provide(C.source,t);const u=a.computed(()=>{if(!f.value)return 1;const m=e.form.reduce((h,S)=>h+((S==null?void 0:S.span)||1),0);return f.value-m%f.value}),i=a.computed(()=>e.form.reduce((m,h)=>(h.rule&&(m[h.key]=h.rule),m),{}));function o(){var h;if(e.columns)return;const m=(h=l.value)==null?void 0:h.$el;m&&(f.value=Math.floor(m.offsetWidth/e.minWidth))}a.onMounted(()=>{o()});function y(m,h){t.value[m]=h,n({...t})}function v(){var m;(m=l.value)==null||m.resetFields()}return window.addEventListener("resize",o),{formId:r,formSource:t,formInstance:l,formColumns:f,formRules:i,formCollspased:d,formActiosSpan:u,toggleFormCollapsed:c,updateFormField:y,updateFormSource:n,reset:v}},render(){const e=()=>{this.$emit("submit",this.formSource),this.$emit("update:model-value",this.formSource)},r=()=>{const t=[],n=this.footer?{span:this.formColumns}:{span:this.formActiosSpan};if(this.searchable&&(t.push(a.createVNode(s.Button,{type:"primary",htmlType:"submit"},{default:()=>[a.createTextVNode("搜索")]})),t.push(a.createVNode(s.Button,{type:"secondary",onClick:()=>{var f;return(f=this.formInstance)==null?void 0:f.resetFields()}},{default:()=>[a.createTextVNode("重置")]}))),this.submitable&&(t.push(a.createVNode(s.Button,{type:"primary",htmlType:"submit"},{default:()=>[a.createTextVNode("提交")]})),t.push(a.createVNode(s.Button,{type:"secondary",onClick:()=>this.$emit("cancel")},{default:()=>[a.createTextVNode("取消")]}))),this.form.some(f=>!!f.collapsed)&&t.push(a.createVNode(s.Button,{onClick:this.toggleFormCollapsed},{default:()=>this.formCollspased?"展开":"收起",icon:()=>this.formCollspased?a.createVNode(U,null,null):a.createVNode(Y,null,null)})),this.$slots.actions&&t.push(...this.$slots.actions()),t.length)return a.createVNode(s.GridItem,n,{default:()=>[a.createVNode(s.FormItem,{hideLabel:!0,contentClass:this.footer?"form-footer":""},{default:()=>[a.createVNode(s.Space,null,N(t)?t:{default:()=>[t]})]})]})},l=this.form.filter(t=>this.formCollspased?!t.collapsed:!0).filter(t=>{switch(!0){case typeof t.visiable=="boolean":return t.visiable;case typeof t.visiable=="function":return t.visiable(this.formSource);default:return!0}});return a.createVNode("div",{class:"form-render"},[a.createVNode(s.Form,a.mergeProps({layout:this.$props.layout,rules:this.formRules,onSubmitSuccess:e},{name:this.name},{"auto-label-width":!0,ref:t=>this.formInstance=t,model:this.formSource}),{default:()=>[a.createVNode(s.Grid,{cols:this.formColumns,"col-gap":10,"rol-gap":10},{default:()=>[l.filter(()=>this.formColumns!==0).map(t=>{let n;return a.createVNode(s.GridItem,{span:t.span},N(n=ae(this.formSource,t))?n:{default:()=>[n]})}),r()]})]})])}});function ne(e){return e}function ue(e){const r=a.getCurrentInstance(),l=a.ref();function t(){var f,d;const n=(d=(f=r==null?void 0:r.proxy)==null?void 0:f.$refs)==null?void 0:d[e];n&&(l.value=n)}return a.onMounted(t),a.onUpdated(t),l}const ce={install(e,r){e.component("FormRender",I)}};exports.FormRenderResolver=_.FormRenderResolver;exports.FormRender=I;exports.default=ce;exports.defineForm=ne;exports.useForm=ue;
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { getCurrentInstance as j, inject as A, defineComponent as
|
|
2
|
-
import { DatePicker as K, YearPicker as Q, QuarterPicker as X, MonthPicker as H, WeekPicker as J, Input as Z, InputNumber as p, Select as ee, Option as
|
|
3
|
-
import
|
|
1
|
+
import { getCurrentInstance as j, inject as A, defineComponent as F, computed as k, openBlock as N, createElementBlock as L, normalizeClass as M, normalizeStyle as U, createElementVNode as z, ref as y, createVNode as f, isVNode as P, h as W, provide as V, onMounted as R, mergeProps as Y, createTextVNode as $, onUpdated as G } from "vue";
|
|
2
|
+
import { DatePicker as K, YearPicker as Q, QuarterPicker as X, MonthPicker as H, WeekPicker as J, Input as Z, InputNumber as p, Select as ee, Option as te, Switch as le, RangePicker as re, Textarea as ae, TreeSelect as ne, FormItem as T, Form as ue, Grid as ce, GridItem as I, Button as b, Space as de } from "@arco-design/web-vue";
|
|
3
|
+
import _ from "dayjs";
|
|
4
4
|
import { FormRenderResolver as Ke } from "./resolver.mjs";
|
|
5
|
-
const fe = Symbol("ArcoConfigProvider"), se = "arco", ie = "$arco",
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
return e ? `${
|
|
5
|
+
const fe = Symbol("ArcoConfigProvider"), se = "arco", ie = "$arco", q = (e) => {
|
|
6
|
+
var l, r, t;
|
|
7
|
+
const a = j(), d = A(fe, void 0), c = (t = (r = d == null ? void 0 : d.prefixCls) != null ? r : (l = a == null ? void 0 : a.appContext.config.globalProperties[ie]) == null ? void 0 : l.classPrefix) != null ? t : se;
|
|
8
|
+
return e ? `${c}-${e}` : c;
|
|
9
9
|
}, me = Object.prototype.toString;
|
|
10
|
-
function
|
|
10
|
+
function B(e) {
|
|
11
11
|
return me.call(e) === "[object Number]" && e === e;
|
|
12
12
|
}
|
|
13
|
-
var
|
|
14
|
-
for (const [r,
|
|
15
|
-
e[r] =
|
|
13
|
+
var E = (e, l) => {
|
|
14
|
+
for (const [r, t] of l)
|
|
15
|
+
e[r] = t;
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
|
-
const oe =
|
|
18
|
+
const oe = F({
|
|
19
19
|
name: "IconDown",
|
|
20
20
|
props: {
|
|
21
21
|
size: {
|
|
@@ -42,47 +42,47 @@ const oe = x({
|
|
|
42
42
|
click: (e) => !0
|
|
43
43
|
},
|
|
44
44
|
setup(e, {
|
|
45
|
-
emit:
|
|
45
|
+
emit: l
|
|
46
46
|
}) {
|
|
47
|
-
const r =
|
|
47
|
+
const r = q("icon"), t = k(() => [r, `${r}-down`, {
|
|
48
48
|
[`${r}-spin`]: e.spin
|
|
49
|
-
}]),
|
|
50
|
-
const
|
|
51
|
-
return e.size && (
|
|
49
|
+
}]), a = k(() => {
|
|
50
|
+
const c = {};
|
|
51
|
+
return e.size && (c.fontSize = B(e.size) ? `${e.size}px` : e.size), e.rotate && (c.transform = `rotate(${e.rotate}deg)`), c;
|
|
52
52
|
});
|
|
53
53
|
return {
|
|
54
|
-
cls:
|
|
55
|
-
innerStyle:
|
|
56
|
-
onClick: (
|
|
57
|
-
|
|
54
|
+
cls: t,
|
|
55
|
+
innerStyle: a,
|
|
56
|
+
onClick: (c) => {
|
|
57
|
+
l("click", c);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}), he = ["stroke-width", "stroke-linecap", "stroke-linejoin"], ye = /* @__PURE__ */
|
|
61
|
+
}), he = ["stroke-width", "stroke-linecap", "stroke-linejoin"], ye = /* @__PURE__ */ z("path", {
|
|
62
62
|
d: "M39.6 17.443 24.043 33 8.487 17.443"
|
|
63
63
|
}, null, -1), ke = [ye];
|
|
64
|
-
function be(e,
|
|
65
|
-
return N(),
|
|
64
|
+
function be(e, l, r, t, a, d) {
|
|
65
|
+
return N(), L("svg", {
|
|
66
66
|
viewBox: "0 0 48 48",
|
|
67
67
|
fill: "none",
|
|
68
68
|
xmlns: "http://www.w3.org/2000/svg",
|
|
69
69
|
stroke: "currentColor",
|
|
70
|
-
class:
|
|
71
|
-
style:
|
|
70
|
+
class: M(e.cls),
|
|
71
|
+
style: U(e.innerStyle),
|
|
72
72
|
"stroke-width": e.strokeWidth,
|
|
73
73
|
"stroke-linecap": e.strokeLinecap,
|
|
74
74
|
"stroke-linejoin": e.strokeLinejoin,
|
|
75
|
-
onClick:
|
|
75
|
+
onClick: l[0] || (l[0] = (...c) => e.onClick && e.onClick(...c))
|
|
76
76
|
}, ke, 14, he);
|
|
77
77
|
}
|
|
78
|
-
var
|
|
79
|
-
const ve = Object.assign(
|
|
80
|
-
install: (e,
|
|
78
|
+
var w = /* @__PURE__ */ E(oe, [["render", be]]);
|
|
79
|
+
const ve = Object.assign(w, {
|
|
80
|
+
install: (e, l) => {
|
|
81
81
|
var r;
|
|
82
|
-
const
|
|
83
|
-
e.component(
|
|
82
|
+
const t = (r = l == null ? void 0 : l.iconPrefix) != null ? r : "";
|
|
83
|
+
e.component(t + w.name, w);
|
|
84
84
|
}
|
|
85
|
-
}), Se =
|
|
85
|
+
}), Se = F({
|
|
86
86
|
name: "IconUp",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -109,103 +109,103 @@ const ve = Object.assign(C, {
|
|
|
109
109
|
click: (e) => !0
|
|
110
110
|
},
|
|
111
111
|
setup(e, {
|
|
112
|
-
emit:
|
|
112
|
+
emit: l
|
|
113
113
|
}) {
|
|
114
|
-
const r =
|
|
114
|
+
const r = q("icon"), t = k(() => [r, `${r}-up`, {
|
|
115
115
|
[`${r}-spin`]: e.spin
|
|
116
|
-
}]),
|
|
117
|
-
const
|
|
118
|
-
return e.size && (
|
|
116
|
+
}]), a = k(() => {
|
|
117
|
+
const c = {};
|
|
118
|
+
return e.size && (c.fontSize = B(e.size) ? `${e.size}px` : e.size), e.rotate && (c.transform = `rotate(${e.rotate}deg)`), c;
|
|
119
119
|
});
|
|
120
120
|
return {
|
|
121
|
-
cls:
|
|
122
|
-
innerStyle:
|
|
123
|
-
onClick: (
|
|
124
|
-
|
|
121
|
+
cls: t,
|
|
122
|
+
innerStyle: a,
|
|
123
|
+
onClick: (c) => {
|
|
124
|
+
l("click", c);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
128
|
+
}), ge = ["stroke-width", "stroke-linecap", "stroke-linejoin"], $e = /* @__PURE__ */ z("path", {
|
|
129
129
|
d: "M39.6 30.557 24.043 15 8.487 30.557"
|
|
130
|
-
}, null, -1), Ce = [
|
|
131
|
-
function we(e,
|
|
132
|
-
return N(),
|
|
130
|
+
}, null, -1), Ce = [$e];
|
|
131
|
+
function we(e, l, r, t, a, d) {
|
|
132
|
+
return N(), L("svg", {
|
|
133
133
|
viewBox: "0 0 48 48",
|
|
134
134
|
fill: "none",
|
|
135
135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
136
136
|
stroke: "currentColor",
|
|
137
|
-
class:
|
|
138
|
-
style:
|
|
137
|
+
class: M(e.cls),
|
|
138
|
+
style: U(e.innerStyle),
|
|
139
139
|
"stroke-width": e.strokeWidth,
|
|
140
140
|
"stroke-linecap": e.strokeLinecap,
|
|
141
141
|
"stroke-linejoin": e.strokeLinejoin,
|
|
142
|
-
onClick:
|
|
143
|
-
}, Ce, 14,
|
|
142
|
+
onClick: l[0] || (l[0] = (...c) => e.onClick && e.onClick(...c))
|
|
143
|
+
}, Ce, 14, ge);
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
const xe = Object.assign(
|
|
147
|
-
install: (e,
|
|
145
|
+
var x = /* @__PURE__ */ E(Se, [["render", we]]);
|
|
146
|
+
const xe = Object.assign(x, {
|
|
147
|
+
install: (e, l) => {
|
|
148
148
|
var r;
|
|
149
|
-
const
|
|
150
|
-
e.component(
|
|
149
|
+
const t = (r = l == null ? void 0 : l.iconPrefix) != null ? r : "";
|
|
150
|
+
e.component(t + x.name, x);
|
|
151
151
|
}
|
|
152
|
-
}),
|
|
152
|
+
}), D = {
|
|
153
153
|
id: Symbol("ID"),
|
|
154
154
|
source: Symbol("Source")
|
|
155
155
|
};
|
|
156
|
-
function Fe(e,
|
|
156
|
+
function Fe(e, l) {
|
|
157
157
|
const r = y({});
|
|
158
|
-
return e == null || e.forEach((
|
|
159
|
-
let
|
|
160
|
-
|
|
161
|
-
}), [r, (
|
|
162
|
-
r.value =
|
|
158
|
+
return e == null || e.forEach((a) => {
|
|
159
|
+
let d = null;
|
|
160
|
+
a.default && (d = (typeof a.default == "function" ? a.default() : a.default) || null), l && l[a.key] !== void 0 && (d = l[a.key]), r.value[a.key] = d;
|
|
161
|
+
}), [r, (a) => {
|
|
162
|
+
r.value = a;
|
|
163
163
|
}];
|
|
164
164
|
}
|
|
165
165
|
function Ve(e) {
|
|
166
|
-
function
|
|
167
|
-
return e != null && e.disabledDate ? e.disabledDate(r,
|
|
166
|
+
function l(r, t) {
|
|
167
|
+
return e != null && e.disabledDate ? e.disabledDate(r, t) : !1;
|
|
168
168
|
}
|
|
169
|
-
return (r,
|
|
169
|
+
return (r, t) => {
|
|
170
170
|
switch (e == null ? void 0 : e.type) {
|
|
171
171
|
case "week":
|
|
172
|
-
return
|
|
173
|
-
modelValue: r[
|
|
174
|
-
"onUpdate:modelValue": (
|
|
175
|
-
"disabled-date":
|
|
172
|
+
return f(J, {
|
|
173
|
+
modelValue: r[t.key],
|
|
174
|
+
"onUpdate:modelValue": (a) => r[t.key] = a,
|
|
175
|
+
"disabled-date": l,
|
|
176
176
|
format: e == null ? void 0 : e.labelFormat,
|
|
177
177
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
178
178
|
}, null);
|
|
179
179
|
case "month":
|
|
180
|
-
return
|
|
181
|
-
modelValue: r[
|
|
182
|
-
"onUpdate:modelValue": (
|
|
183
|
-
"disabled-date":
|
|
180
|
+
return f(H, {
|
|
181
|
+
modelValue: r[t.key],
|
|
182
|
+
"onUpdate:modelValue": (a) => r[t.key] = a,
|
|
183
|
+
"disabled-date": l,
|
|
184
184
|
format: e == null ? void 0 : e.labelFormat,
|
|
185
185
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
186
186
|
}, null);
|
|
187
187
|
case "quarter":
|
|
188
|
-
return
|
|
189
|
-
modelValue: r[
|
|
190
|
-
"onUpdate:modelValue": (
|
|
191
|
-
"disabled-date":
|
|
188
|
+
return f(X, {
|
|
189
|
+
modelValue: r[t.key],
|
|
190
|
+
"onUpdate:modelValue": (a) => r[t.key] = a,
|
|
191
|
+
"disabled-date": l,
|
|
192
192
|
format: e == null ? void 0 : e.labelFormat,
|
|
193
193
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
194
194
|
}, null);
|
|
195
195
|
case "year":
|
|
196
|
-
return
|
|
197
|
-
modelValue: r[
|
|
198
|
-
"onUpdate:modelValue": (
|
|
199
|
-
"disabled-date":
|
|
196
|
+
return f(Q, {
|
|
197
|
+
modelValue: r[t.key],
|
|
198
|
+
"onUpdate:modelValue": (a) => r[t.key] = a,
|
|
199
|
+
"disabled-date": l,
|
|
200
200
|
format: e == null ? void 0 : e.labelFormat,
|
|
201
201
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
202
202
|
}, null);
|
|
203
203
|
case "date":
|
|
204
204
|
default:
|
|
205
|
-
return
|
|
206
|
-
modelValue: r[
|
|
207
|
-
"onUpdate:modelValue": (
|
|
208
|
-
"disabled-date":
|
|
205
|
+
return f(K, {
|
|
206
|
+
modelValue: r[t.key],
|
|
207
|
+
"onUpdate:modelValue": (a) => r[t.key] = a,
|
|
208
|
+
"disabled-date": l,
|
|
209
209
|
format: e == null ? void 0 : e.labelFormat,
|
|
210
210
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
211
211
|
}, null);
|
|
@@ -213,12 +213,12 @@ function Ve(e) {
|
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
function Ie(e) {
|
|
216
|
-
return (
|
|
216
|
+
return (l, r) => {
|
|
217
217
|
switch (e == null ? void 0 : e.type) {
|
|
218
218
|
case "number":
|
|
219
|
-
return
|
|
220
|
-
modelValue:
|
|
221
|
-
"onUpdate:modelValue": (
|
|
219
|
+
return f(p, {
|
|
220
|
+
modelValue: l[r.key],
|
|
221
|
+
"onUpdate:modelValue": (t) => l[r.key] = t,
|
|
222
222
|
hideButton: !0,
|
|
223
223
|
"read-only": e == null ? void 0 : e.readonly,
|
|
224
224
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
@@ -226,9 +226,9 @@ function Ie(e) {
|
|
|
226
226
|
}, null);
|
|
227
227
|
case "string":
|
|
228
228
|
default:
|
|
229
|
-
return
|
|
230
|
-
modelValue:
|
|
231
|
-
"onUpdate:modelValue": (
|
|
229
|
+
return f(Z, {
|
|
230
|
+
modelValue: l[r.key],
|
|
231
|
+
"onUpdate:modelValue": (t) => l[r.key] = t,
|
|
232
232
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
233
233
|
readonly: e == null ? void 0 : e.readonly,
|
|
234
234
|
allowClear: e == null ? void 0 : e.clearable
|
|
@@ -237,202 +237,207 @@ function Ie(e) {
|
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
239
|
function _e(e) {
|
|
240
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
240
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !P(e);
|
|
241
241
|
}
|
|
242
242
|
const v = /* @__PURE__ */ new WeakMap();
|
|
243
243
|
function De(e) {
|
|
244
|
-
let
|
|
245
|
-
const
|
|
246
|
-
if (!e.autoSumbit || !
|
|
244
|
+
let l, r = !1;
|
|
245
|
+
const t = y(/* @__PURE__ */ new Map()), a = (u) => t.value = u, d = () => {
|
|
246
|
+
if (!e.autoSumbit || !l)
|
|
247
247
|
return;
|
|
248
|
-
let
|
|
249
|
-
for (;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
},
|
|
253
|
-
const
|
|
254
|
-
if (e.cache === !1 && (
|
|
255
|
-
const
|
|
256
|
-
typeof
|
|
248
|
+
let u = l;
|
|
249
|
+
for (; u && u.$el.tagName !== "FORM"; )
|
|
250
|
+
u = u.$parent;
|
|
251
|
+
u && u.$el && u.$el.dispatchEvent(new Event("submit"));
|
|
252
|
+
}, c = async () => {
|
|
253
|
+
const u = await e.options();
|
|
254
|
+
if (e.cache === !1 && (t.value = u), e.cache !== !1 && v.has(e.options)) {
|
|
255
|
+
const n = v.get(e.options);
|
|
256
|
+
typeof n == "function" && n(u), v.set(e.options, u);
|
|
257
257
|
} else
|
|
258
|
-
|
|
258
|
+
t.value = u;
|
|
259
259
|
};
|
|
260
260
|
switch (!0) {
|
|
261
261
|
case e.options instanceof Function: {
|
|
262
|
-
const
|
|
263
|
-
if (e.cache !== !1 && typeof
|
|
262
|
+
const u = v.get(e.options);
|
|
263
|
+
if (e.cache !== !1 && typeof u == "function")
|
|
264
264
|
break;
|
|
265
|
-
if (e.cache !== !1 &&
|
|
266
|
-
|
|
265
|
+
if (e.cache !== !1 && u instanceof Map) {
|
|
266
|
+
a(u);
|
|
267
267
|
break;
|
|
268
268
|
}
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
c(), e.cache !== !1 && v.set(e.options, (n) => {
|
|
270
|
+
t.value = n;
|
|
271
271
|
});
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
default:
|
|
275
|
-
|
|
275
|
+
t.value = e.options;
|
|
276
276
|
}
|
|
277
|
-
return (
|
|
278
|
-
let
|
|
279
|
-
return e.default && !r && (
|
|
280
|
-
ref: (
|
|
277
|
+
return (u, n) => {
|
|
278
|
+
let s;
|
|
279
|
+
return e.default && !r && (u[n.key] = e.default, r = !0), f(ee, {
|
|
280
|
+
ref: (i) => l = i,
|
|
281
281
|
multiple: e.multiple,
|
|
282
|
-
modelValue:
|
|
283
|
-
"onUpdate:modelValue": (
|
|
282
|
+
modelValue: u[n.key],
|
|
283
|
+
"onUpdate:modelValue": (i) => u[n.key] = i,
|
|
284
284
|
placeholder: e.placeholder,
|
|
285
285
|
allowClear: e.clearable,
|
|
286
286
|
allowSearch: e.searchable,
|
|
287
287
|
maxTagCount: e.maxTagCount ?? 2,
|
|
288
|
-
onChange:
|
|
289
|
-
}, _e(
|
|
290
|
-
key:
|
|
291
|
-
value:
|
|
288
|
+
onChange: d
|
|
289
|
+
}, _e(s = Array.from(t.value.entries()).map(([i, h]) => f(te, {
|
|
290
|
+
key: i,
|
|
291
|
+
value: i,
|
|
292
292
|
label: h
|
|
293
|
-
}, null))) ?
|
|
294
|
-
default: () => [
|
|
293
|
+
}, null))) ? s : {
|
|
294
|
+
default: () => [s]
|
|
295
295
|
});
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
function
|
|
298
|
+
function Oe(e) {
|
|
299
|
+
function l() {
|
|
300
300
|
e != null && e.autoSumbit;
|
|
301
301
|
}
|
|
302
|
-
return (r,
|
|
303
|
-
modelValue: r[
|
|
304
|
-
"onUpdate:modelValue": (
|
|
302
|
+
return (r, t) => (e != null && e.default && (r[t.key] = e.default), f(le, {
|
|
303
|
+
modelValue: r[t.key],
|
|
304
|
+
"onUpdate:modelValue": (a) => r[t.key] = a,
|
|
305
305
|
checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
|
|
306
306
|
uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
|
|
307
307
|
checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
|
|
308
308
|
uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
|
|
309
|
-
onChange:
|
|
309
|
+
onChange: l
|
|
310
310
|
}, null));
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
return (
|
|
314
|
-
let
|
|
315
|
-
function
|
|
316
|
-
|
|
312
|
+
function je(e) {
|
|
313
|
+
return (l, r) => {
|
|
314
|
+
let t = [];
|
|
315
|
+
function a(u) {
|
|
316
|
+
t = u;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
if (
|
|
320
|
-
const [
|
|
321
|
-
|
|
318
|
+
function d(u) {
|
|
319
|
+
if (u && u.length === 2) {
|
|
320
|
+
const [n, s] = u.sort(), i = _(n).startOf("days"), h = _(s).endOf("days");
|
|
321
|
+
l[r.key] = [i.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), h.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function u
|
|
325
|
-
return e != null && e.disabledDate ? e.disabledDate(
|
|
324
|
+
function c(u) {
|
|
325
|
+
return e != null && e.disabledDate ? e.disabledDate(t, u) : !1;
|
|
326
326
|
}
|
|
327
|
-
return
|
|
327
|
+
return f("div", null, [f(re, {
|
|
328
328
|
style: {
|
|
329
329
|
width: "300px"
|
|
330
330
|
},
|
|
331
|
-
modelValue:
|
|
332
|
-
"onUpdate:modelValue": (
|
|
333
|
-
onSelect:
|
|
334
|
-
onChange:
|
|
331
|
+
modelValue: l[r.key],
|
|
332
|
+
"onUpdate:modelValue": (u) => l[r.key] = u,
|
|
333
|
+
onSelect: a,
|
|
334
|
+
onChange: d,
|
|
335
335
|
mode: e == null ? void 0 : e.type,
|
|
336
336
|
allowClear: e == null ? void 0 : e.clearable,
|
|
337
|
-
"disabled-date":
|
|
337
|
+
"disabled-date": c,
|
|
338
338
|
format: e == null ? void 0 : e.labelFormat,
|
|
339
339
|
"value-format": e == null ? void 0 : e.valueFormat
|
|
340
340
|
}, null)]);
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
return (
|
|
345
|
-
modelValue:
|
|
346
|
-
"onUpdate:modelValue": (
|
|
343
|
+
function Ne(e) {
|
|
344
|
+
return (l, r) => f(ae, {
|
|
345
|
+
modelValue: l[r.key],
|
|
346
|
+
"onUpdate:modelValue": (t) => l[r.key] = t,
|
|
347
347
|
placeholder: e == null ? void 0 : e.placeholder,
|
|
348
348
|
autoSize: e == null ? void 0 : e.autosize,
|
|
349
349
|
maxLength: e == null ? void 0 : e.maxLength
|
|
350
350
|
}, null);
|
|
351
351
|
}
|
|
352
|
-
const S = /* @__PURE__ */ new
|
|
352
|
+
const S = /* @__PURE__ */ new WeakMap();
|
|
353
353
|
function Le(e) {
|
|
354
|
-
let
|
|
355
|
-
const
|
|
356
|
-
if (!e.autoSumbit || !
|
|
354
|
+
let l, r = !1;
|
|
355
|
+
const t = y([]), a = (n) => t.value = n, d = () => {
|
|
356
|
+
if (!e.autoSumbit || !l)
|
|
357
357
|
return;
|
|
358
|
-
let
|
|
359
|
-
for (;
|
|
360
|
-
|
|
361
|
-
|
|
358
|
+
let n = l;
|
|
359
|
+
for (; n && n.$el.tagName !== "FORM"; )
|
|
360
|
+
n = n.$parent;
|
|
361
|
+
n && n.$el && n.$el.dispatchEvent(new Event("submit"));
|
|
362
362
|
}, c = async () => {
|
|
363
|
-
const
|
|
364
|
-
if (e.cache !== !1 && S.has(e.options)) {
|
|
365
|
-
const
|
|
366
|
-
typeof
|
|
363
|
+
const n = await e.options();
|
|
364
|
+
if (e.cache === !1 && (t.value = n), e.cache !== !1 && S.has(e.options)) {
|
|
365
|
+
const s = S.get(e.options);
|
|
366
|
+
typeof s == "function" && s(n), S.set(e.options, n);
|
|
367
367
|
} else
|
|
368
|
-
|
|
368
|
+
t.value = n;
|
|
369
369
|
};
|
|
370
370
|
switch (!0) {
|
|
371
371
|
case e.options instanceof Function: {
|
|
372
|
-
|
|
372
|
+
const n = S.get(e.options);
|
|
373
|
+
if (e.cache !== !1 && typeof n == "function")
|
|
374
|
+
break;
|
|
375
|
+
if (e.cache !== !1 && Array.isArray(n)) {
|
|
376
|
+
a(n);
|
|
373
377
|
break;
|
|
374
|
-
|
|
375
|
-
|
|
378
|
+
}
|
|
379
|
+
c(), e.cache !== !1 && S.set(e.options, (s) => {
|
|
380
|
+
t.value = s;
|
|
376
381
|
});
|
|
377
382
|
break;
|
|
378
383
|
}
|
|
379
384
|
default:
|
|
380
|
-
|
|
385
|
+
t.value = e.options;
|
|
381
386
|
}
|
|
382
|
-
function u(
|
|
383
|
-
var
|
|
384
|
-
const i = ((
|
|
385
|
-
return
|
|
387
|
+
function u(n, s) {
|
|
388
|
+
var g;
|
|
389
|
+
const i = ((g = e.fieldNames) == null ? void 0 : g.title) || "title", h = s[i];
|
|
390
|
+
return h ? h.toLowerCase().includes(n.toLowerCase()) : !1;
|
|
386
391
|
}
|
|
387
|
-
return (
|
|
388
|
-
ref: (i) =>
|
|
392
|
+
return (n, s) => (e.default && !r && (n[s.key] = e.default, r = !0), f(ne, {
|
|
393
|
+
ref: (i) => l = i,
|
|
389
394
|
multiple: e.multiple,
|
|
390
|
-
modelValue:
|
|
391
|
-
"onUpdate:modelValue": (i) =>
|
|
395
|
+
modelValue: n[s.key],
|
|
396
|
+
"onUpdate:modelValue": (i) => n[s.key] = i,
|
|
392
397
|
placeholder: e.placeholder,
|
|
393
398
|
allowClear: e.clearable,
|
|
394
399
|
allowSearch: e.searchable,
|
|
395
400
|
maxTagCount: e.maxTagCount ?? 2,
|
|
396
|
-
onChange:
|
|
401
|
+
onChange: d,
|
|
397
402
|
filterTreeNode: u,
|
|
398
|
-
data:
|
|
403
|
+
data: t.value,
|
|
399
404
|
fieldNames: e.fieldNames
|
|
400
405
|
}, null));
|
|
401
406
|
}
|
|
402
407
|
function Me(e) {
|
|
403
|
-
return (
|
|
408
|
+
return (l) => e(l);
|
|
404
409
|
}
|
|
405
410
|
function Ue() {
|
|
406
411
|
return {
|
|
407
412
|
input: Ie,
|
|
408
|
-
textarea:
|
|
413
|
+
textarea: Ne,
|
|
409
414
|
select: De,
|
|
410
415
|
treeSelect: Le,
|
|
411
416
|
date: Ve,
|
|
412
|
-
switch:
|
|
413
|
-
dateRange:
|
|
417
|
+
switch: Oe,
|
|
418
|
+
dateRange: je,
|
|
414
419
|
render: Me
|
|
415
420
|
};
|
|
416
421
|
}
|
|
417
|
-
function ze(e,
|
|
418
|
-
|
|
419
|
-
const r =
|
|
422
|
+
function ze(e, l) {
|
|
423
|
+
l.render || (l.render = (t) => t.input());
|
|
424
|
+
const r = l.render({
|
|
420
425
|
...Ue()
|
|
421
426
|
});
|
|
422
427
|
return {
|
|
423
|
-
default: () => r(e,
|
|
428
|
+
default: () => r(e, l)
|
|
424
429
|
};
|
|
425
430
|
}
|
|
426
|
-
function Pe(e,
|
|
427
|
-
return W(
|
|
428
|
-
field:
|
|
429
|
-
label:
|
|
430
|
-
}, ze(e,
|
|
431
|
+
function Pe(e, l) {
|
|
432
|
+
return W(T, {
|
|
433
|
+
field: l.key,
|
|
434
|
+
label: l.title
|
|
435
|
+
}, ze(e, l));
|
|
431
436
|
}
|
|
432
|
-
function
|
|
433
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
437
|
+
function O(e) {
|
|
438
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !P(e);
|
|
434
439
|
}
|
|
435
|
-
const Re = /* @__PURE__ */
|
|
440
|
+
const Re = /* @__PURE__ */ F({
|
|
436
441
|
props: {
|
|
437
442
|
form: {
|
|
438
443
|
type: Object,
|
|
@@ -484,108 +489,108 @@ const Re = /* @__PURE__ */ x({
|
|
|
484
489
|
emits: ["submit", "cancel", "update:model-value"],
|
|
485
490
|
expose: ["formSource", "updateFormField", "updateFormSource", "reset"],
|
|
486
491
|
setup(e) {
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
if (!
|
|
492
|
+
const l = Math.random().toString(32).slice(2).toUpperCase(), r = y(), [t, a] = Fe(e.form, e.modelValue || e.value), d = y(e.columns || 0), c = y(!0), u = () => c.value = !c.value;
|
|
493
|
+
V(D.id, l), V(D.source, t);
|
|
494
|
+
const n = k(() => {
|
|
495
|
+
if (!d.value)
|
|
491
496
|
return 1;
|
|
492
|
-
const m = e.form.reduce((o,
|
|
493
|
-
return
|
|
494
|
-
}),
|
|
495
|
-
function
|
|
497
|
+
const m = e.form.reduce((o, C) => o + ((C == null ? void 0 : C.span) || 1), 0);
|
|
498
|
+
return d.value - m % d.value;
|
|
499
|
+
}), s = k(() => e.form.reduce((m, o) => (o.rule && (m[o.key] = o.rule), m), {}));
|
|
500
|
+
function i() {
|
|
496
501
|
var o;
|
|
497
502
|
if (e.columns)
|
|
498
503
|
return;
|
|
499
504
|
const m = (o = r.value) == null ? void 0 : o.$el;
|
|
500
|
-
m && (
|
|
505
|
+
m && (d.value = Math.floor(m.offsetWidth / e.minWidth));
|
|
501
506
|
}
|
|
502
|
-
|
|
503
|
-
|
|
507
|
+
R(() => {
|
|
508
|
+
i();
|
|
504
509
|
});
|
|
505
510
|
function h(m, o) {
|
|
506
|
-
|
|
507
|
-
...
|
|
511
|
+
t.value[m] = o, a({
|
|
512
|
+
...t
|
|
508
513
|
});
|
|
509
514
|
}
|
|
510
|
-
function
|
|
515
|
+
function g() {
|
|
511
516
|
var m;
|
|
512
517
|
(m = r.value) == null || m.resetFields();
|
|
513
518
|
}
|
|
514
|
-
return window.addEventListener("resize",
|
|
515
|
-
formId:
|
|
516
|
-
formSource:
|
|
519
|
+
return window.addEventListener("resize", i), {
|
|
520
|
+
formId: l,
|
|
521
|
+
formSource: t,
|
|
517
522
|
formInstance: r,
|
|
518
|
-
formColumns:
|
|
519
|
-
formRules:
|
|
520
|
-
formCollspased:
|
|
521
|
-
formActiosSpan:
|
|
522
|
-
toggleFormCollapsed:
|
|
523
|
+
formColumns: d,
|
|
524
|
+
formRules: s,
|
|
525
|
+
formCollspased: c,
|
|
526
|
+
formActiosSpan: n,
|
|
527
|
+
toggleFormCollapsed: u,
|
|
523
528
|
updateFormField: h,
|
|
524
|
-
updateFormSource:
|
|
525
|
-
reset:
|
|
529
|
+
updateFormSource: a,
|
|
530
|
+
reset: g
|
|
526
531
|
};
|
|
527
532
|
},
|
|
528
533
|
render() {
|
|
529
534
|
const e = () => {
|
|
530
535
|
this.$emit("submit", this.formSource), this.$emit("update:model-value", this.formSource);
|
|
531
|
-
},
|
|
532
|
-
const
|
|
536
|
+
}, l = () => {
|
|
537
|
+
const t = [], a = this.footer ? {
|
|
533
538
|
span: this.formColumns
|
|
534
539
|
} : {
|
|
535
540
|
span: this.formActiosSpan
|
|
536
541
|
};
|
|
537
|
-
if (this.searchable && (
|
|
542
|
+
if (this.searchable && (t.push(f(b, {
|
|
538
543
|
type: "primary",
|
|
539
544
|
htmlType: "submit"
|
|
540
545
|
}, {
|
|
541
546
|
default: () => [$("搜索")]
|
|
542
|
-
})),
|
|
547
|
+
})), t.push(f(b, {
|
|
543
548
|
type: "secondary",
|
|
544
549
|
onClick: () => {
|
|
545
|
-
var
|
|
546
|
-
return (
|
|
550
|
+
var d;
|
|
551
|
+
return (d = this.formInstance) == null ? void 0 : d.resetFields();
|
|
547
552
|
}
|
|
548
553
|
}, {
|
|
549
554
|
default: () => [$("重置")]
|
|
550
|
-
}))), this.submitable && (
|
|
555
|
+
}))), this.submitable && (t.push(f(b, {
|
|
551
556
|
type: "primary",
|
|
552
557
|
htmlType: "submit"
|
|
553
558
|
}, {
|
|
554
559
|
default: () => [$("提交")]
|
|
555
|
-
})),
|
|
560
|
+
})), t.push(f(b, {
|
|
556
561
|
type: "secondary",
|
|
557
562
|
onClick: () => this.$emit("cancel")
|
|
558
563
|
}, {
|
|
559
564
|
default: () => [$("取消")]
|
|
560
|
-
}))), this.form.some((
|
|
565
|
+
}))), this.form.some((d) => !!d.collapsed) && t.push(f(b, {
|
|
561
566
|
onClick: this.toggleFormCollapsed
|
|
562
567
|
}, {
|
|
563
568
|
default: () => this.formCollspased ? "展开" : "收起",
|
|
564
|
-
icon: () => this.formCollspased ?
|
|
565
|
-
})), this.$slots.actions &&
|
|
566
|
-
return
|
|
567
|
-
default: () => [
|
|
569
|
+
icon: () => this.formCollspased ? f(ve, null, null) : f(xe, null, null)
|
|
570
|
+
})), this.$slots.actions && t.push(...this.$slots.actions()), t.length)
|
|
571
|
+
return f(I, a, {
|
|
572
|
+
default: () => [f(T, {
|
|
568
573
|
hideLabel: !0,
|
|
569
574
|
contentClass: this.footer ? "form-footer" : ""
|
|
570
575
|
}, {
|
|
571
|
-
default: () => [
|
|
572
|
-
default: () => [
|
|
576
|
+
default: () => [f(de, null, O(t) ? t : {
|
|
577
|
+
default: () => [t]
|
|
573
578
|
})]
|
|
574
579
|
})]
|
|
575
580
|
});
|
|
576
|
-
}, r = this.form.filter((
|
|
581
|
+
}, r = this.form.filter((t) => this.formCollspased ? !t.collapsed : !0).filter((t) => {
|
|
577
582
|
switch (!0) {
|
|
578
|
-
case typeof
|
|
579
|
-
return
|
|
580
|
-
case typeof
|
|
581
|
-
return
|
|
583
|
+
case typeof t.visiable == "boolean":
|
|
584
|
+
return t.visiable;
|
|
585
|
+
case typeof t.visiable == "function":
|
|
586
|
+
return t.visiable(this.formSource);
|
|
582
587
|
default:
|
|
583
588
|
return !0;
|
|
584
589
|
}
|
|
585
590
|
});
|
|
586
|
-
return
|
|
591
|
+
return f("div", {
|
|
587
592
|
class: "form-render"
|
|
588
|
-
}, [
|
|
593
|
+
}, [f(ue, Y({
|
|
589
594
|
layout: this.$props.layout,
|
|
590
595
|
rules: this.formRules,
|
|
591
596
|
onSubmitSuccess: e
|
|
@@ -593,22 +598,22 @@ const Re = /* @__PURE__ */ x({
|
|
|
593
598
|
name: this.name
|
|
594
599
|
}, {
|
|
595
600
|
"auto-label-width": !0,
|
|
596
|
-
ref: (
|
|
601
|
+
ref: (t) => this.formInstance = t,
|
|
597
602
|
model: this.formSource
|
|
598
603
|
}), {
|
|
599
|
-
default: () => [
|
|
604
|
+
default: () => [f(ce, {
|
|
600
605
|
cols: this.formColumns,
|
|
601
606
|
"col-gap": 10,
|
|
602
607
|
"rol-gap": 10
|
|
603
608
|
}, {
|
|
604
|
-
default: () => [r.filter(() => this.formColumns !== 0).map((
|
|
605
|
-
let
|
|
606
|
-
return
|
|
607
|
-
span:
|
|
608
|
-
},
|
|
609
|
-
default: () => [
|
|
609
|
+
default: () => [r.filter(() => this.formColumns !== 0).map((t) => {
|
|
610
|
+
let a;
|
|
611
|
+
return f(I, {
|
|
612
|
+
span: t.span
|
|
613
|
+
}, O(a = Pe(this.formSource, t)) ? a : {
|
|
614
|
+
default: () => [a]
|
|
610
615
|
});
|
|
611
|
-
}),
|
|
616
|
+
}), l()]
|
|
612
617
|
})]
|
|
613
618
|
})]);
|
|
614
619
|
}
|
|
@@ -617,16 +622,16 @@ function Ee(e) {
|
|
|
617
622
|
return e;
|
|
618
623
|
}
|
|
619
624
|
function Ae(e) {
|
|
620
|
-
const
|
|
621
|
-
function
|
|
622
|
-
var
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
+
const l = j(), r = y();
|
|
626
|
+
function t() {
|
|
627
|
+
var d, c;
|
|
628
|
+
const a = (c = (d = l == null ? void 0 : l.proxy) == null ? void 0 : d.$refs) == null ? void 0 : c[e];
|
|
629
|
+
a && (r.value = a);
|
|
625
630
|
}
|
|
626
|
-
return
|
|
631
|
+
return R(t), G(t), r;
|
|
627
632
|
}
|
|
628
633
|
const We = {
|
|
629
|
-
install(e,
|
|
634
|
+
install(e, l) {
|
|
630
635
|
e.component("FormRender", Re);
|
|
631
636
|
}
|
|
632
637
|
};
|