2 lines
1.9 KiB
Java
2 lines
1.9 KiB
Java
import{bo as w,bL as O,bR as k}from"./index-X7Y8jykP.js";import{r as P}from"./index-Crt100Db-CDbHzweT.js";import{e as S,h as x,C as c,z as i,H as d,r as v,J as j,u as y,y as m,M as N,B as q,f as B,c as C,F as z,n as E}from"./vue-vendor-DNhG1Cve.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";var F=Object.defineProperty,f=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,h=(o,e,r)=>e in o?F(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,M=(o,e)=>{for(var r in e||(e={}))J.call(e,r)&&h(o,r,e[r]);if(f)for(var r of f(e))H.call(e,r)&&h(o,r,e[r]);return o},T=(o,e,r)=>new Promise((s,l)=>{var n=a=>{try{t(r.next(a))}catch(u){l(u)}},p=a=>{try{t(r.throw(a))}catch(u){l(u)}},t=a=>a.done?s(a.value):Promise.resolve(a.value).then(n,p);t((r=r.apply(o,e)).next())});const V={key:1,style:{"margin-top":"100px"}},L=S({__name:"NodeSetting",props:{type:{type:String,required:!0},node:{type:Object,required:!0},properties:{type:Object,required:!0},isSilentMode:{type:Boolean,required:!0},setProperties:{type:Function,required:!0}},setup(o){const e=o,{prefixCls:r}=w("airag-node-setting-container");let s=null;const l=v(!0),n=v(!1);x(()=>{var t;return(t=e.node)==null?void 0:t.id},()=>T(null,null,function*(){n.value=!0,s=e.type?P.get(e.type):null,l.value=s==null,yield E(),n.value=!1}),{immediate:!0});const p=C({get:()=>{if(!e.properties)return"";const t=M({},e.properties);return delete t.width,delete t.height,JSON.stringify(t,null,2)},set:t=>{const a=JSON.parse(t);a.width=e.properties.width,a.height=e.properties.height,e.setProperties(a)}});return(t,a)=>{const u=O,g=k;return i(),c(z,null,[n.value?d("",!0):(i(),c("div",{key:0,class:j([y(r)])},[l.value?(i(),m(u,{key:0,description:"暂无配置"})):(i(),m(y(s),N(q({key:1},t.$props)),null,16))],2)),l.value?(i(),c("div",V,[B(g,{value:p.value,"onUpdate:value":a[0]||(a[0]=b=>p.value=b),style:{width:"100%",height:"30vh"}},null,8,["value"])])):d("",!0)],64)}}});export{L as default};
|