Files
qhmes/deploy-qhmes/frontend/js/VarListShow-COsoYbiJ-CX1ySaHX.js
2026-05-15 11:34:12 +08:00

2 lines
1.8 KiB
Java
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{d as T,e as j,ah as f,ar as d,as as n,F as v,aD as g,au as o,av as p,aC as w,aF as m,k as _,G as A}from"./vue-vendor-C7Zq48Yl.js";import{s as P}from"./_plugin-vue_export-helper-CHgC5LLL-lGy7RumW.js";var B=Object.defineProperty,V=Object.defineProperties,x=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,h=(r,e,a)=>e in r?B(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,N=(r,e)=>{for(var a in e||(e={}))D.call(e,a)&&h(r,a,e[a]);if(b)for(var a of b(e))F.call(e,a)&&h(r,a,e[a]);return r},S=(r,e)=>V(r,x(e));const I={style:{color:"#666666"}},L={class:"allow-change-type"},q={key:1},E=T({__name:"VarListShow",props:{vars:{type:Array,required:!0},varsConfig:{type:Object,required:!1,default:()=>({})}},emits:["changeType"],setup(r,{emit:e}){const a=r,k=e,C=j(()=>{const{varsConfig:c}=a;return[...a.vars].map(l=>{var i,y;const s=(y=(i=c[l.field])==null?void 0:i.allowType)!=null?y:[],t=Array.isArray(s)&&s.length>0;return S(N({},l),{allowedTypes:s,isAllowChangeType:t,class:t?"allow-change-type":""})})});function O(c,l){k("changeType",{varItem:c,newType:l})}return(c,l)=>{const i=f("a-menu-item"),y=f("a-menu"),s=f("a-dropdown");return n(!0),d(v,null,g(C.value,t=>(n(),d("p",I,[o("span",null,p(t.field),1),o("span",null,[l[0]||(l[0]=o("span",null," <",-1)),t.isAllowChangeType?(n(),w(s,{key:0,trigger:"click",placement:"bottomCenter"},{overlay:m(()=>[_(y,{selectedKeys:[t.type],onClick:u=>O(t,u.key)},{default:m(()=>[(n(!0),d(v,null,g(t.allowedTypes,u=>(n(),w(i,{key:u},{default:m(()=>[A(p(u),1)]),_:2},1024))),128))]),_:2},1032,["selectedKeys","onClick"])]),default:m(()=>[o("span",L,p(t.type),1)]),_:2},1024)):(n(),d("span",q,p(t.type),1)),l[1]||(l[1]=o("span",null,"> ",-1))]),o("span",null,p(t.name),1)]))),256)}}}),G=P(E,[["__scopeId","data-v-01079885"]]);export{G as default};