moreShopAdmin/build/admin/assets/protocol.5302dd0a.js

2 lines
3.5 KiB
JavaScript

import{_ as F}from"./index.b9ee2930.js";import{m as C,s as y,r as x,d as w,bA as U,p as g,q as B,t as n,u as l,bB as A,i as D,bC as k,H as P,b2 as N,x as b,v as s,L as R,y as I,a2 as T,V as H,aW as O,aX as q,aY as z,b5 as G,ae as L}from"./.pnpm.1b0299fb.js";import{_ as M}from"./picker.0aa9b690.js";import{w as h}from"./index.689cfa31.js";import{c as S,d as W}from"./website.7e683452.js";import"./index.6c48d0ba.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.abac7546.js";import"./index.49d8d118.js";import"./index.vue_vue_type_script_setup_true_lang.b077f234.js";import"./index.05c22055.js";import"./@vueuse.72d44d91.js";import"./usePaging.00aa976d.js";import"./lodash.c3b66c05.js";import"./@vue.9d708d7c.js";const X=C({__name:"index",props:{modelValue:{default:""},mode:{default:"default"},height:{default:"100%"},width:{default:"auto"},toolbarConfig:{default:()=>({})}},emits:["update:modelValue"],setup(V,{emit:a}){const r=V,_=a,m=y(),e=y(),d=x("");let u;const p={MENU_CONF:{uploadImage:{customBrowseAndUpload(o){var t;d.value="image",(t=e.value)==null||t.showPopup(-1),u=o}},uploadVideo:{customBrowseAndUpload(o){var t;d.value="video",(t=e.value)==null||t.showPopup(-1),u=o}}}},c=w(()=>({height:h(r.height),width:h(r.width)})),i=w({get(){return r.modelValue},set(o){_("update:modelValue",o)}}),f=o=>{o.forEach(t=>{u(t)})};U(()=>{const o=m.value;o!=null&&o.destroy()});const v=o=>{m.value=o};return(o,t)=>(g(),B("div",{class:"border border-br flex flex-col",style:P(l(c))},[n(l(A),{class:"border-b border-br",editor:l(m),defaultConfig:o.toolbarConfig,mode:o.mode},null,8,["editor","defaultConfig","mode"]),n(l(k),{class:"overflow-y-auto flex-1",modelValue:l(i),"onUpdate:modelValue":t[0]||(t[0]=E=>D(i)?i.value=E:null),defaultConfig:p,mode:o.mode,onOnCreated:v},null,8,["modelValue","mode"]),n(M,{ref_key:"materialPickerRef",ref:e,type:l(d),limit:-1,"hidden-upload":"",onChange:f},null,8,["type"])],4))}});const Y={class:"xl:flex"},de=C({__name:"protocol",setup(V){const a=x({service_title:"",service_content:"",privacy_title:"",privacy_content:""}),r=async()=>{a.value=await S()},_=async()=>{await W({...a.value}),r()};return r(),(m,e)=>{const d=O,u=q,p=z,c=X,i=G,f=L,v=F,o=N("perms");return g(),B(H,null,[b("div",Y,[n(i,{class:"!border-none flex-1 xl:mr-4 mb-4",shadow:"never"},{header:s(()=>e[4]||(e[4]=[b("span",{class:"font-medium"},"\u670D\u52A1\u534F\u8BAE",-1)])),default:s(()=>[n(p,{model:l(a),"label-width":"80px"},{default:s(()=>[n(u,{label:"\u534F\u8BAE\u540D\u79F0"},{default:s(()=>[n(d,{modelValue:l(a).service_title,"onUpdate:modelValue":e[0]||(e[0]=t=>l(a).service_title=t)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),n(c,{class:"mb-10",modelValue:l(a).service_content,"onUpdate:modelValue":e[1]||(e[1]=t=>l(a).service_content=t),height:"500"},null,8,["modelValue"])]),_:1}),n(i,{class:"!border-none flex-1 mb-4",shadow:"never"},{header:s(()=>e[5]||(e[5]=[b("span",{class:"font-medium"},"\u9690\u79C1\u534F\u8BAE",-1)])),default:s(()=>[n(p,{model:l(a),"label-width":"80px"},{default:s(()=>[n(u,{label:"\u534F\u8BAE\u540D\u79F0"},{default:s(()=>[n(d,{modelValue:l(a).privacy_title,"onUpdate:modelValue":e[2]||(e[2]=t=>l(a).privacy_title=t)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),n(c,{class:"mb-10",modelValue:l(a).privacy_content,"onUpdate:modelValue":e[3]||(e[3]=t=>l(a).privacy_content=t),height:"500"},null,8,["modelValue"])]),_:1})]),R((g(),I(v,null,{default:s(()=>[n(f,{type:"primary",onClick:_},{default:s(()=>e[6]||(e[6]=[T("\u4FDD\u5B58")])),_:1})]),_:1})),[[o,["setting.web.web_setting/setAgreement"]]])],64)}}});export{de as default};