You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.7 KiB

import{d as k,cd as h,m as b,ck as R,n as O,aB as v,e as M,eQ as T,u as C,cl as f,cv as B,cw as w,z as A,aT as $,aU as l,o as x,g as F,b as o,w as i,h as u,t as d,x as N}from"./index-f4658ae7.js";import{C as P}from"./CopyOutlined-ae720459.js";import{R as j}from"./RedoOutlined-3d2ca639.js";const z=k({name:"SettingFooter",components:{CopyOutlined:P,RedoOutlined:j},setup(){const e=h(),{prefixCls:p}=b("setting-footer"),{t:s}=M(),{createSuccessModal:g,createMessage:r}=A(),m=R(),c=O(),t=v();function a(){const{isSuccessRef:n}=T(JSON.stringify(C(t.getProjectConfig),null,2));C(n)&&g({title:s("layout.setting.operatingTitle"),content:s("layout.setting.operatingContent")})}function S(){try{t.setProjectConfig(f);const{colorWeak:n,grayMode:_}=f;B(n),w(_),r.success(s("layout.setting.resetSuccess"))}catch(n){r.error(n)}}function y(){localStorage.clear(),t.resetAllState(),e.resetState(),m.resetState(),c.resetState(),location.reload()}return{prefixCls:p,t:s,handleCopy:a,handleResetSetting:S,handleClearAndRedo:y}}});function D(e,p,s,g,r,m){const c=l("CopyOutlined"),t=l("a-button"),a=l("RedoOutlined");return x(),F("div",{class:N(e.prefixCls)},[o(t,{type:"primary",block:"",onClick:e.handleCopy},{default:i(()=>[o(c,{class:"mr-2"}),u(" "+d(e.t("layout.setting.copyBtn")),1)]),_:1},8,["onClick"]),o(t,{color:"warning",block:"",onClick:e.handleResetSetting,class:"my-3"},{default:i(()=>[o(a,{class:"mr-2"}),u(" "+d(e.t("common.resetText")),1)]),_:1},8,["onClick"]),o(t,{color:"error",block:"",onClick:e.handleClearAndRedo},{default:i(()=>[o(a,{class:"mr-2"}),u(" "+d(e.t("layout.setting.clearBtn")),1)]),_:1},8,["onClick"])],2)}const W=$(z,[["render",D],["__scopeId","data-v-8aef7339"]]);export{W as default};