| 1 |
- import{u as b,_ as P}from"./useForm-19fca69f.js";import"./FormItem.vue_vue_type_script_lang-35d3ca4d.js";import{C as w}from"./index-52de4750.js";import{a as V}from"./index-b614de6b.js";import{d as F,f as a,o as M,w as S,c as B,Y as y,Z as N,_ as m,l as r,u as l,E as k,$ as A}from"./vue-8fccce23.js";import{B as D}from"./index.js";import{b4 as E}from"./antd-ecb53b14.js";import"./index-8cbf1e33.js";import"./useWindowSizeFn-8ad2dbf2.js";import"./useFormItem-d8cab136.js";import"./uuid-31b8b5a4.js";import"./useSortable-987ef813.js";import"./download-c6c2acd3.js";import"./index-22d6b33a.js";import"./copyTextToClipboard-ab85e052.js";import"./index-3eef3423.js";import"./TextEditor-284232fa.js";import"./onMountedOrActivated-cb072c10.js";const I={class:"flex mt-6"},O={class:"w-1/2 -enter-x"},R={class:"w-1/2 -enter-x"},ao=F({__name:"bak",setup(T){const c=a(null),d=a("application/json");M(()=>{console.log("1231231")});const t=a([{field:"field1",component:"Input",label:"字段1",colProps:{span:8},componentProps:{placeholder:"自定义placeholder",onChange:o=>{console.log(o)}}},{field:"field2",component:"Input",label:"字段2",colProps:{span:8},componentProps:{placeholder:"自定义placeholder222222222",onChange:o=>{console.log(o)}}}]);S(()=>t.value,(o,n)=>{console.log("🚀 ~ file: index.vue:67 ~ oldVal:",n),console.log("🚀 ~ file: index.vue:67 ~ newVal:",o)});const i=a(1),f=B(()=>i.value+1),[h,{resetSchema:v}]=b({labelWidth:120,schemas:t,actionColOptions:{span:24},showActionButtonGroup:!1}),s=a(null),g=D(o=>{const n=Math.round(Math.random()*20+5);t.value=[{field:"field1",component:"Input",label:"字段"+n,colProps:{span:n},componentProps:{placeholder:"自定义placeholder",onChange:e=>{console.log(e)}}}],v(o),console.log("🚀 ~ file: index.vue:107 ~ debounceFn ~ data:",o),console.log("🚀 ~ file: index.vue:89 ~ debounceFn ~ schemas.value:",t.value)},1e3*3);function x(o){i.value=Math.round(Math.random()*100)}function C(o){if(console.log("🚀 ~ file: index.vue:100 ~ handleChange ~ val:",o),Array.isArray(o)){const n=o.map(e=>{var p,u;return e!=null&&e.componentProps&&((p=e.componentProps)!=null&&p.api&&(e.componentProps.api=V),(u=e.componentProps)!=null&&u.onChange&&(e.componentProps.onChange=new Function("e",e.componentProps.onChange))),e});console.log("🚀 ~ file: index.vue:126 ~ arr ~ arr:",n),g(n)}s.value=JSON.stringify(o)}function _(){}return(o,n)=>(y(),N("div",I,[m("div",O,[r(l(P),{onRegister:l(h),onSubmit:_},null,8,["onRegister"])]),m("div",R,[r(l(E),{value:s.value,"onUpdate:value":n[0]||(n[0]=e=>s.value=e),rows:10,placeholder:"请输入 schemas",onChange:x,wrap:"soft"},null,8,["value"]),r(l(w),{value:c.value,"onUpdate:value":n[1]||(n[1]=e=>c.value=e),mode:d.value,onChange:C},null,8,["value","mode"]),k(" "+A(f.value),1)])]))}});export{ao as default};
|