import"./vue.db505ee4.js";import{t as D}from"./index.b35f53c6.js";import{l as F}from"./lodash.c9cf1bdb.js";import{c as M}from"./@vueuse.952f4739.js";import{r as n,w as S,aW as d,aR as a,at as p,H as s,aV as U,ar as m,bu as B,bd as V,S as w,ai as R,u as K,c as j,as as A,n as I}from"./@vue.cb43a243.js";import"./@babel.6cd0804c.js";import"./regenerator-runtime.8e24db72.js";import"./js-md5.5179c6be.js";import"./vue-router.a08742b9.js";import"./js-cookie.31874410.js";import"./ant-design-vue.6b10f349.js";import"./@ant-design.bcfb08ae.js";import"./@ctrl.fa7cbd46.js";import"./resize-observer-polyfill.8deb1e21.js";import"./vue-types.6e6d84ba.js";import"./dom-align.f1b5d360.js";import"./lodash-es.0ea26897.js";import"./dayjs.38e390ea.js";import"./async-validator.5d25c98b.js";import"./scroll-into-view-if-needed.5191fdbf.js";import"./compute-scroll-into-view.6058b3be.js";import"./spark-md5.2cc5764b.js";import"./axios.e3200588.js";/* empty css                     */import"./sortablejs.412b554c.js";import"./clipboard.099d05c9.js";import"./markdown-it.80c3a67b.js";import"./entities.0d2c0164.js";import"./uc.micro.981ceb7b.js";import"./mdurl.ef76b4dc.js";import"./linkify-it.92c30060.js";import"./markdown-it-emoji.e3e91710.js";import"./escape-html.e5dfadb9.js";import"./prismjs.c97a8414.js";import"./diacritics.6be19c75.js";import"./markdown-it-container.512a5043.js";import"./markdown-it-anchor.c88e5394.js";import"./markdown-it-attrs.3af5ab50.js";import"./markdown-it-table-of-contents.8a4ce16f.js";import"./@kangc.86f7507c.js";import"./vue-demi.5fb18120.js";const H={name:"ExDynamicTag"},$e=Object.assign(H,{props:{value:Array,add:{type:Boolean,default:!0},edit:{type:Boolean,default:!0},del:{type:Boolean,default:!0}},emits:["update:value","change"],setup(f,{emit:y}){const k=f,u=M(k,"value",y),c=n(!1),v=n(""),_=n(),h=n([]),e=n("");function $(){e.value="",c.value=!0,I(()=>{_.value.focus()})}S(u,t=>{y("change",t)},{deep:!0});function C(t){e.value&&(u.value[t]=e.value),v.value="",e.value=""}function E(t,o){h.value[t]=o}function N(t,o){if(!k.edit)return!1;e.value=o,v.value=o,I(()=>{h.value[t].focus()})}function T(t){F.exports.pull(u.value,t)}function g(){e.value&&u.value.push(e.value),c.value=!1,e.value=""}return(t,o)=>{const b=d("a-input"),x=d("a-tag"),z=d("plus-outlined");return a(),p(s,null,[(a(!0),p(s,null,U(K(u),(l,i)=>(a(),p(s,{key:l},[v.value==l?(a(),m(b,{key:0,ref_for:!0,ref:r=>E(i,r),type:"text",size:"small",style:{width:"78px",marginRight:"7px"},value:e.value,"onUpdate:value":o[0]||(o[0]=r=>e.value=r),onBlur:r=>C(i),onKeyup:B(r=>C(i),["enter"])},null,8,["value","onBlur","onKeyup"])):(a(),m(x,{key:1,closable:f.del,onClose:r=>T(l),onClick:r=>N(i,l)},{default:V(()=>[w(R(l),1)]),_:2},1032,["closable","onClose","onClick"]))],64))),128)),f.add?(a(),p(s,{key:0},[c.value?(a(),m(b,{key:0,ref_key:"inputRef",ref:_,type:"text",size:"small",style:{width:"78px"},value:e.value,"onUpdate:value":o[1]||(o[1]=l=>e.value=l),onBlur:g,onKeyup:B(g,["enter"])},null,8,["value","onKeyup"])):(a(),m(x,{key:1,style:{background:"#fff","border-style":"dashed"},onClick:$},{default:V(()=>[j(z),w(" "+R(K(D)("FormMany.add")),1)]),_:1}))],64)):A("",!0)],64)}}});export{$e as default};
