1 |
- /* empty css *//* empty css *//* empty css */import{_ as e}from"./index-ed5c24f8.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import{d as l,R as a,au as t,m as s,p as o,x as i,o as r,c as d,W as u,f as p,l as n,w as m,a as c,e as f,b as _,aD as y,ao as b,F as j,y as x,t as v,a6 as h,J as V,aj as g,a2 as k,a3 as w,ab as C,ac as U,S as q,a_ as J,ai as O,ax as S,Y as L,$ as N,az as R,aA as $,_ as z}from"./index-6eb6702a.js";import A from"./generateLink-5702676c.js";/* empty css *//* empty css */import"./index-d41cd79e.js";/* empty css *//* empty css *//* empty css */import"./index-caa4f95e.js";import"./http-9017d37d.js";/* empty css */const D=e=>(R("data-v-11cf2d4f"),e=e(),$(),e),F={class:"flex items-center"},I=D((()=>f("span",null,"关键词",-1))),P=D((()=>f("br",null,null,-1))),T=D((()=>f("span",null,"关键词",-1))),W={class:"card-header"},Y={class:"flex flex-col items-start justify-start"},B={key:0},E={class:"withdraw-popup-warn"},G=D((()=>f("span",null,"需先",-1))),H=D((()=>f("span",null,",已关联的小程序可被使用在自定义菜单、模板消息和附近的小程序等场景中",-1))),K={key:1},M={class:"flex justify-end"},Q=z(l({__name:"create",props:{primary:null|Object},emits:["close"],setup(l,{emit:R}){const $=l;a(),t();const z=s(!1),D=s(!1),Q=s(!1),X=s(!1),Z=s({type:1}),ee=s(),le=o((()=>"link"==ee.value?"插入小程序链接":"插入纯文本")),ae=e=>{ee.value=e,X.value=!0,Q.value=!1},te=e=>{};return $.primary&&(Z.value=JSON.parse(JSON.stringify($.primary))),i((()=>{})),(l,a)=>{const t=V,s=g,o=k,i=w,R=C,$=U,se=q,oe=J,ie=O,re=S,de=e,ue=L,pe=N;return r(),d(j,null,[u((r(),n(ue,{model:p(Z),"label-width":"120px",ref:"form",class:"pr-4"},{default:m((()=>[c(i,{label:"关键词",prop:"is_roi",rules:[{required:!0,message:"关键词必须填写"}],"label-width":"120px"},{label:m((()=>[f("div",F,[c(s,{placement:"top"},{content:m((()=>[I,_(),P])),default:m((()=>[c(t,null,{default:m((()=>[c(p(y))])),_:1})])),_:1}),T])])),default:m((()=>[c(o,{modelValue:p(Z).key,"onUpdate:modelValue":a[0]||(a[0]=e=>p(Z).key=e),placeholder:"请输入关键词"},null,8,["modelValue"])])),_:1}),c(i,{label:"消息内容",prop:"type",rules:[{required:!0,message:"消息类型必须填写"}],"label-width":"120px"},{default:m((()=>[c($,{modelValue:p(Z).type,"onUpdate:modelValue":a[1]||(a[1]=e=>p(Z).type=e)},{default:m((()=>[c(R,{label:2},{default:m((()=>[_("文本消息")])),_:1})])),_:1},8,["modelValue"])])),_:1}),c(i,{label:"","label-width":"120px"},{default:m((()=>[c(re,{class:"box-card",style:{width:"500px"}},{header:m((()=>[f("div",W,[c(ie,{placement:"right",visible:p(Q),trigger:"click"},{reference:m((()=>[c(se,{link:"",icon:p(b),onClick:a[2]||(a[2]=e=>Q.value=!p(Q))},{default:m((()=>[_("插入内容")])),_:1},8,["icon"])])),default:m((()=>[f("div",Y,[c(oe,{underline:!1,class:"m-1",onClick:a[3]||(a[3]=e=>ae("link"))},{default:m((()=>[_("插入小程序链接")])),_:1}),c(oe,{underline:!1,class:"m-1",onClick:a[4]||(a[4]=e=>ae("text"))},{default:m((()=>[_("插入纯文本")])),_:1})])])),_:1},8,["visible"])])])),default:m((()=>[(r(),d(j,null,x(4,(e=>f("div",{key:e,class:"text item"},v("List item "+e),1))),64))])),_:1})])),_:1}),c(de,{modelValue:p(X),"onUpdate:modelValue":a[9]||(a[9]=e=>h(X)?X.value=e:null),title:p(le),"destroy-on-close":""},{default:m((()=>["link"==p(ee)?(r(),d("div",B,[f("div",E,[G,c(oe,{class:"text-lg font-bold text-blue-400 cursor-pointer",type:"primary",href:"https://element-plus.org",target:"_blank"},{default:m((()=>[_("关联小程序")])),_:1}),H]),c(i,{label:"标题",prop:"account_id",rules:[{required:!0,message:"标题必须填写"}],"label-width":"120px"},{default:m((()=>[c(o,{style:{width:"300px"},modelValue:p(Z).account_id,"onUpdate:modelValue":a[5]||(a[5]=e=>p(Z).account_id=e),"auto-complete":"off",placeholder:"请输入标题"},null,8,["modelValue"])])),_:1}),c(i,{label:"链接",prop:"account_id",rules:[{required:!0,message:"链接必须填写"}],"label-width":"120px"},{default:m((()=>[c(o,{style:{width:"300px"},modelValue:p(Z).account_id,"onUpdate:modelValue":a[6]||(a[6]=e=>p(Z).account_id=e),"auto-complete":"off",placeholder:"请输入链接"},null,8,["modelValue"]),c(se,{type:"primary",link:"",icon:p(b),onClick:a[7]||(a[7]=e=>D.value=!0),class:"mr-6"},{default:m((()=>[_("插入链接")])),_:1},8,["icon"])])),_:1})])):(r(),d("div",K,[c(i,{label:"标题",prop:"account_id",rules:[{required:!0,message:"标题必须填写"}],"label-width":"120px"},{default:m((()=>[c(o,{style:{width:"300px"},type:"textarea",modelValue:p(Z).account_id,"onUpdate:modelValue":a[8]||(a[8]=e=>p(Z).account_id=e),"auto-complete":"off",placeholder:"请输入标题"},null,8,["modelValue"])])),_:1})]))])),_:1},8,["modelValue","title"]),f("div",M,[c(se,{type:"primary",onClick:a[10]||(a[10]=e=>{var a;(a=l.form)&&(z.value=!0,a&&a.validate((e=>{z.value=!1})).then((()=>{})))})},{default:m((()=>[_(v(l.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[pe,p(z)]]),c(de,{modelValue:p(D),"onUpdate:modelValue":a[11]||(a[11]=e=>h(D)?D.value=e:null),title:"选择链接","destroy-on-close":""},{default:m((()=>[c(A,{onClose:te})])),_:1},8,["modelValue"])],64)}}}),[["__scopeId","data-v-11cf2d4f"]]);export{Q as default};
|