Emperor_Shun_Reading/public/dist/assets/Index-e0a4b6f3.js

2 lines
1.7 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{i as e}from"./main-ce25b28f.js";import{i as t}from"./ipcRenderer-5e19eaee.js";import{_ as a,r as s,o,b as n,g as l,a as r,w as d,t as m,e as u,p as h,f as i}from"./index-265ac112.js";const c={data:()=>({currentThemeMode:"",themeList:["system","light","dark"]}),mounted(){},methods:{setTheme(a){this.currentThemeMode=a.target.value,console.log("setTheme currentThemeMode:",this.currentThemeMode),t.invoke(e.setTheme,this.currentThemeMode).then((e=>{console.log("result:",e),this.currentThemeMode=e}))},getTheme(){t.invoke(e.getTheme).then((e=>{console.log("result:",e),this.currentThemeMode=e}))}}},v=e=>(h("data-v-5a0f8a17"),e=e(),i(),e),T={id:"app-base-screen"},f=v((()=>l("div",{class:"one-block-1"},[l("span",null," 1. 系统主题模式 ")],-1))),p={class:"one-block-2"},g=v((()=>l("div",{class:"one-block-1"}," 2. 设置主题模式请自行实现前端UI效果 ",-1))),M={class:"one-block-2"};const _=a(c,[["render",function(e,t,a,h,i,c){const v=s("a-button"),_=s("a-space"),k=s("a-radio"),b=s("a-radio-group");return o(),n("div",T,[f,l("div",p,[r(_,null,{default:d((()=>[r(v,{onClick:t[0]||(t[0]=e=>c.getTheme())},{default:d((()=>[u("获取模式")])),_:1})])),_:1}),l("span",null," 结果:"+m(i.currentThemeMode),1)]),g,l("div",M,[r(b,{modelValue:i.currentThemeMode,"onUpdate:modelValue":t[1]||(t[1]=e=>i.currentThemeMode=e),onChange:c.setTheme},{default:d((()=>[r(k,{value:i.themeList[0]},{default:d((()=>[u(m(i.themeList[0]),1)])),_:1},8,["value"]),r(k,{value:i.themeList[1]},{default:d((()=>[u(m(i.themeList[1]),1)])),_:1},8,["value"]),r(k,{value:i.themeList[2]},{default:d((()=>[u(m(i.themeList[2]),1)])),_:1},8,["value"])])),_:1},8,["modelValue","onChange"])])])}],["__scopeId","data-v-5a0f8a17"]]);export{_ as default};