huangye-parking/admin/dist/assets/Agreements-DX178Fd2.js
2026-02-28 17:35:49 +08:00

2 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{y as V,z as x}from"./index-BIlGw-iH.js";import{n as w,o as h,c as C,a,w as o,r as l,i as s,p as T,q as k,b as A,f as p,E as B}from"./index-DZCMG0nr.js";const D={style:{"margin-top":"16px","text-align":"right"}},U={__name:"Agreements",setup(E){const n=s("user-agreement"),t=s(""),r=s(!1),u=s(!1),i=async()=>{r.value=!0;try{const d=await V(n.value);t.value=d.data.content}catch{t.value=""}finally{r.value=!1}},v=async()=>{u.value=!0;try{await x(n.value,{content:t.value}),B.success("保存成功")}catch{}finally{u.value=!1}};return w(i),(d,e)=>{const m=l("el-tab-pane"),_=l("el-tabs"),g=l("el-input"),f=l("el-button"),y=l("el-card"),b=T("loading");return h(),C("div",null,[a(y,null,{header:o(()=>[...e[2]||(e[2]=[p("协议内容管理",-1)])]),default:o(()=>[a(_,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=c=>n.value=c),onTabChange:i},{default:o(()=>[a(m,{label:"用户协议",name:"user-agreement"}),a(m,{label:"隐私政策",name:"privacy-policy"})]),_:1},8,["modelValue"]),k(a(g,{modelValue:t.value,"onUpdate:modelValue":e[1]||(e[1]=c=>t.value=c),type:"textarea",rows:18,placeholder:"请输入协议内容支持HTML富文本"},null,8,["modelValue"]),[[b,r.value]]),A("div",D,[a(f,{type:"primary",loading:u.value,onClick:v},{default:o(()=>[...e[3]||(e[3]=[p("保存",-1)])]),_:1},8,["loading"])])]),_:1})])}}};export{U as default};