← Back
Editing: index404.js
import{u as e,bg as a,K as l,G as s}from"./utils-lib.js?v=VERSION_NUMBER";import{s as t,g as o,e as n,S as u,B as m,aQ as r,c as i,p,q as d,v as c,x as v}from"./base-lib.js?v=VERSION_NUMBER";import{u as b}from"./useController5.js?v=VERSION_NUMBER";import{o as h}from"./form-item.js?v=VERSION_NUMBER";import{E as w}from"./useMethod5.js?v=VERSION_NUMBER";import{p as f}from"./validator.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./site.js?v=VERSION_NUMBER";import"./column.js?v=VERSION_NUMBER";import"./index104.js?v=VERSION_NUMBER";import"./useStore4.js?v=VERSION_NUMBER";import"./useController6.js?v=VERSION_NUMBER";const{payment:g}=e(),{localRow:x,cloneLocalForm:y,isRefreshLocalList:j}=t(b()),D={class:"p-[2rem]"},_=i({__name:"index",setup(e,{expose:i}){const{cloneLocalForm:_}=t(b()),{resetCloneLocalForm:V}=b(),{BtForm:P,submit:C}=s({data:()=>_.value,options:o((()=>{const e={type:"custom",key:"subDomain",render:()=>n(a,{label:" ",prop:"subDomain"},{default:()=>[n(u,{style:"min-width: 220px; max-width: 300px",modelValue:y.value.subDomain,"onUpdate:modelValue":e=>y.value.subDomain=e},{append:()=>n("span",null,[m("."),x.value.name])}),n(u,{style:"width: 120px",class:"ml-[1rem]",modelValue:y.value.subPath,"onUpdate:modelValue":e=>y.value.subPath=e,placeholder:"克隆路径"},{prepend:()=>n("span",null,[m("/")])}),n(r,{content:"空克隆路径意味着克隆在根目录中",placement:"top"},{default:()=>[n("span",{class:"svgtofont-el-warning !text-[2rem] ml-[1rem] !text-warning"},null)]})]}),rules:{subDomain:[{required:!0,message:"请输入子域名",trigger:"blur"}]}},l={type:"custom",render:()=>n(a,{label:" ",prop:"newDomain"},{default:()=>[n(u,{style:"width: 200px",modelValue:y.value.newDomain,"onUpdate:modelValue":e=>y.value.newDomain=e,placeholder:"新域名"},null),n(u,{style:"width: 120px",class:"ml-[1rem]",modelValue:y.value.newPath,"onUpdate:modelValue":e=>y.value.newPath=e,placeholder:"克隆路径"},{prepend:()=>n("span",null,[m("/")])}),n(r,{content:"空克隆路径意味着克隆在根目录中",placement:"top"},{default:()=>[n("span",{class:"svgtofont-el-warning !text-[2rem] ml-[1rem] !text-warning"},null)]})]}),rules:{newDomain:[{required:!0,message:"请输入新的域名",trigger:"blur"}]}};return[{type:"custom",render:()=>n(a,{label:"来源站点"},{default:()=>[n("span",null,[x.value.name])]})},{label:"目标站点",key:"method",type:"radio:button",options:[{label:"创建子域名",value:1},{label:"创建新域名",value:2}]},1===y.value.method?e:l,h("FastCGI缓存","cache_status",{attrs:{class:"!w-[100px]"}})]})),submit:async(e,a,l)=>{await a()}});return p((()=>{V()})),i({onConfirm:async e=>{await C(),(async e=>{"ltd"===g.value.authType?l({loading:"正在克隆站点...",request:w({domain:1===y.value.method?"".concat(y.value.subDomain,".").concat(x.value.name):y.value.newDomain,s_id:x.value.id,sub_path:1===y.value.method?y.value.subPath:y.value.newPath,enable_cache:y.value.cache_status?1:0}),message:!0,success:a=>{a.status&&(e(),j.value=!0)}}):f({disablePro:!0,sourceId:335})})(e)}}),(e,a)=>(d(),c("div",D,[n(v(P))]))}});export{_ as default};
Save File
Cancel