mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-22 03:23:35 +08:00
2 lines
3.1 KiB
JavaScript
2 lines
3.1 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/docs-core-utils-mMjcwppE.js","js/Card-B_oozRxS.js","js/toString-BWDzaUQG.js","js/store-BGk8Kj6h.js","js/rolldown-runtime-COiEfhsA.js","js/utils-BpsPduiK.js","js/_toKey-BqfG5Sv9.js","js/preload-helper-B5zr4nmU.js","js/Switch-B4B45bkJ.js","js/contract-CUovj2c6.js","js/schema-rQn3Oa0L.js","js/json-schema-DCJ76DWL.js","js/en-US-BhhY7Km7.js","js/zh-CN-BKp8i0Gi.js","css/store-72BFCDPD.css","js/DemoPage-CJFmBY0O.js","js/AppPageHeader-DiqPbuWz.js","css/AppPageHeader-Cmbeex-u.css","css/DemoPage-B2axJfLX.css","js/DemoResult-DB6s8vEk.js","js/docs-browser-utils-C-3qh1YE.js","js/effect-dispose-C4M3LySX.js","js/docs-storage-utils-3uLKcPJc.js"])))=>i.map(i=>d[i]);
|
|
import{a as e,i as t,n,r,t as i}from"./directives-BpDumRCc.js";import{Cn as a,cn as o,wn as s}from"./Card-B_oozRxS.js";import{s as c,x as l}from"./utils-BpsPduiK.js";import{Bt as u,Ht as d,It as f,Mt as p,Pt as m,Vt as h,X as g,a as _,h as v,i as y,jt as b,kr as x,y as S}from"./store-BGk8Kj6h.js";import{a as C,l as w}from"./contract-CUovj2c6.js";import{t as T}from"./example-focus-BDYDJaky.js";import{t as E}from"./preload-helper-B5zr4nmU.js";var D=new Set([`/dashboard`,`/form`,`/modal-demo`,`/echart`,`/flow`,`/segment`,`/iframe`,`/draggable-card`,`/svg-icons`,`/directive`,`/template-hooks`,`/web-hooks`,`/multi`,`/precision`,`/cache-demo`,`/axios`,`/qrcode`]),O=new URLSearchParams(location.search),k=O.get(`layout`)===`1`,A=[...b().filter(({path:e})=>D.has(e)),{path:`/tables/search`,name:`TableDemoSearch`,component:w(`demo/tables/search`),meta:{i18nKey:`menu.TableSearch`}},{path:`/docs-core-utils`,name:`DocsCoreUtils`,component:()=>E(()=>import(`./docs-core-utils-mMjcwppE.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:`menu.DocsCoreUtils`,order:8}},{path:`/docs-browser-utils`,name:`DocsBrowserUtils`,component:()=>E(()=>import(`./docs-browser-utils-C-3qh1YE.js`),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,21,15,16,17,18,19])),meta:{i18nKey:`menu.DocsBrowserUtils`,order:9}},{path:`/docs-storage-utils`,name:`DocsStorageUtils`,component:()=>E(()=>import(`./docs-storage-utils-3uLKcPJc.js`),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:`menu.DocsStorageUtils`,order:10}}],j=s({name:`DocumentationExample`,setup(){let{t:n}=h(),{getAppTheme:i,getLocaleLanguage:o}=_();return g({dark:()=>i.value,locale:()=>o.value,chartTheme:l.echartTheme,translate:n,iconUrl:(e,t)=>`${C[e.split(`/`)[0]]}#${t}-${e}`,reportError:e=>window.$message?.error(e)}),()=>a(e,null,{default:()=>[a(t,null,null),a(r,null,null),a(f,null,null)]})}});async function M(){c();let e=o(j);e.use(x()),await d(e),n(),i(e);let{updateLocale:t}=e.runWithContext(y),{darkTheme:r,lightTheme:a}=e.runWithContext(u);t(O.get(`lang`)===`en`?`en-US`:`zh-CN`),O.get(`theme`)===`dark`?r():a(),v.removeRoute(`RLogin`),v.removeRoute(`RLayout`),p(A);let s=m(A);if(k)v.addRoute({path:`/`,component:S,children:s});else for(let e of s)v.addRoute(e);v.addRoute({path:`/:pathMatch(.*)*`,redirect:`/dashboard`}),e.use(v),await v.isReady();let l=O.get(`focus`);l&&e.provide(T,{path:v.currentRoute.value.path,names:new Set(l.split(`,`))}),e.mount(`#app`)}M(); |