5 lines
6.7 KiB
JavaScript
5 lines
6.7 KiB
JavaScript
/*!
|
|
Build based on gin-vue-admin
|
|
Time : 1776662816000 */
|
|
import{O as e,l,u as t,a6 as i,a as o,r as a,a1 as r,g as n,i as s,o as d,w as c,c as u,F as m,J as p,d as w,t as f,b,f as h,h as k,a2 as v,ao as y,x as B,n as g,D as C}from"./087AC4D233B64EB0index.D-00lXMX.js";import x from"./087AC4D233B64EB0index.CSXJ_YiS.js";import{t as _}from"./087AC4D233B64EB0doc.DwE8vRuh.js";import"./087AC4D233B64EB0index.B1QVlzp1.js";import"./087AC4D233B64EB0themeModeSelector.Bm-IFR_g.js";import"./087AC4D233B64EB0themeColorPicker.KBM6p9y4.js";import"./087AC4D233B64EB0_plugin-vue_export-helper.BCo6x5W8.js";import"./087AC4D233B64EB0settingItem.A4orC7Kg.js";import"./087AC4D233B64EB0index.D68tKEGJ.js";import"./087AC4D233B64EB0layoutModeCard.DQ56-Xrm.js";import"./087AC4D233B64EB0index.CaX8hytM.js";import"./087AC4D233B64EB0index.DRcePWbS.js";const j={key:0,class:"quick-title"},E=["onClick"],V={class:"dialog-footer"},D=Object.assign({name:"CommandMenu"},{__name:"index",setup(B,{expose:g}){const C=e(),x=l(),_=t(),D=t(),A=i(),M=o(!1),O=o(""),S=a([]),T=e=>{const l=[];return null==e||e.forEach(e=>{e.children&&e.children.length>0?l.push(...T(e.children)):e.meta.title&&e.meta.title.indexOf(O.value)>-1&&l.push({label:e.meta.title,func:()=>I(e)})}),l},q=()=>{var e;const l={label:"跳转",children:[]},t=T((null==(e=A.asyncRouters[0])?void 0:e.children)||[]);l.children.push(...t),S.push(l)},N=()=>{const e={label:"操作",children:[]},l=[{label:"亮色主题",func:()=>K(!1)},{label:"暗色主题",func:()=>K(!0)},{label:"退出登录",func:()=>x.LoginOut()}];e.children.push(...l.filter(e=>e.label.indexOf(O.value)>-1)),S.push(e)};q(),N();const I=e=>{var l,t;const i=e.name,o={},a={};(null==(l=A.routeMap[i])?void 0:l.parameters)&&(null==(t=A.routeMap[i])||t.parameters.forEach(e=>{"query"===e.type?o[e.key]=e.value:a[e.key]=e.value})),i!==D.name&&(e.name.indexOf("http://")>-1||e.name.indexOf("https://")>-1?window.open(e.name):_.push({name:i,query:o,params:a}),M.value=!1)},K=e=>{C.toggleTheme(e)},L=()=>{M.value=!1};return g({open:()=>{M.value=!0}}),r(O,()=>{S.length=0,q(),N()}),(e,l)=>{const t=n("el-button"),i=n("el-dialog");return d(),s(i,{modelValue:M.value,"onUpdate:modelValue":l[1]||(l[1]=e=>M.value=e),width:"30%",class:"overlay","show-close":!1},{header:c(()=>[v(b("input",{"onUpdate:modelValue":l[0]||(l[0]=e=>O.value=e),class:"quick-input",placeholder:"请输入你需要快捷到达的功能"},null,512),[[y,O.value]])]),footer:c(()=>[b("span",V,[h(t,{onClick:L},{default:c(()=>[...l[2]||(l[2]=[k("关闭",-1)])]),_:1})])]),default:c(()=>[(d(!0),u(m,null,p(S,(e,l)=>(d(),u("div",{key:l},[e.children.length?(d(),u("div",j,f(e.label),1)):w("",!0),(d(!0),u(m,null,p(e.children,(e,t)=>(d(),u("div",{key:l+"-"+t,class:"quick-item",onClick:e.func},f(e.label),9,E))),128))]))),128))]),_:1},8,["modelValue"])}}}),A={class:"flex items-center mx-4 gap-4"},M={class:"w-8 h-8 p-2 rounded-full flex items-center justify-center shadow border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"},O={class:"w-8 h-8 p-2 rounded-full flex items-center justify-center shadow border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"},S={class:"w-8 h-8 p-2 rounded-full flex items-center justify-center shadow border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"},T={class:"w-8 h-8 p-2 rounded-full flex items-center justify-center shadow border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"},q={class:"w-8 h-8 p-2 rounded-full flex items-center justify-center shadow border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"},N={__name:"tools",setup(l){const t=e(),i=o(!1),a=o(!1),r=()=>{a.value=!0,C.emit("reload"),setTimeout(()=>{a.value=!1},1e3)},w=()=>{i.value=!0},v=o(""),y=o(),j=()=>{y.value.open()};(()=>{"WIN"===window.localStorage.getItem("osType")?v.value="Ctrl":v.value="⌘";window.addEventListener("keydown",e=>{e.ctrlKey&&"k"===e.key&&(e.preventDefault(),j())})})();const E=[{title:"1.clone项目和安装依赖",link:"https://www.bilibili.com/video/BV1jx4y1s7xx"},{title:"2.初始化项目",link:"https://www.bilibili.com/video/BV1sr421K7sv"},{title:"3.开启调试工具+创建初始化包",link:"https://www.bilibili.com/video/BV1iH4y1c7Na"},{title:"4.手动使用自动化创建功能",link:"https://www.bilibili.com/video/BV1UZ421T7fV"},{title:"5.使用已有表格创建业务",link:"https://www.bilibili.com/video/BV1NE4m1977s"},{title:"6.使用AI创建业务和创建数据源模式的可选项",link:"https://www.bilibili.com/video/BV17i421a7DE"},{title:"7.创建自己的后端方法",link:"https://www.bilibili.com/video/BV1Yw4m1k7fg"},{title:"8.新增一个前端页面",link:"https://www.bilibili.com/video/BV12y411i7oE"},{title:"9.配置一个前端二级页面",link:"https://www.bilibili.com/video/BV1ZM4m1y7i3"},{title:"10.配置一个前端菜单参数",link:"https://www.bilibili.com/video/BV1WS42197DZ"},{title:"11.菜单参数实战+动态菜单标题+菜单高亮配置",link:"https://www.bilibili.com/video/BV1NE4m1979c"},{title:"12.增加菜单可控按钮",link:"https://www.bilibili.com/video/BV1Sw4m1k746"},{title:"14.新增客户角色和其相关配置教学",link:"https://www.bilibili.com/video/BV1Ki421a7X2"},{title:"15.发布项目上线",link:"https://www.bilibili.com/video/BV1Lx4y1s77D"}];return(e,l)=>{const o=n("Film"),v=n("el-icon"),C=n("el-dropdown-item"),V=n("el-dropdown-menu"),N=n("el-dropdown"),I=n("el-tooltip"),K=n("Search"),L=n("Setting"),U=n("Refresh"),R=n("Sunny"),Z=n("Moon");return d(),u("div",A,[h(I,{class:"",effect:"dark",content:"视频教程",placement:"bottom"},{default:c(()=>[h(N,{onCommand:B(_)},{dropdown:c(()=>[h(V,null,{default:c(()=>[(d(),u(m,null,p(E,e=>h(C,{key:e.link,command:e.link},{default:c(()=>[k(f(e.title),1)]),_:2},1032,["command"])),64))]),_:1})]),default:c(()=>[b("span",M,[h(v,null,{default:c(()=>[h(o)]),_:1})])]),_:1},8,["onCommand"])]),_:1}),h(I,{class:"",effect:"dark",content:"搜索",placement:"bottom"},{default:c(()=>[b("span",O,[h(v,{onClick:j},{default:c(()=>[h(K)]),_:1})])]),_:1}),h(I,{class:"",effect:"dark",content:"系统设置",placement:"bottom"},{default:c(()=>[b("span",S,[h(v,{onClick:w},{default:c(()=>[h(L)]),_:1})])]),_:1}),h(I,{class:"",effect:"dark",content:"刷新",placement:"bottom"},{default:c(()=>[b("span",T,[h(v,{class:g(a.value?"animate-spin":""),onClick:r},{default:c(()=>[h(U)]),_:1},8,["class"])])]),_:1}),h(I,{class:"",effect:"dark",content:"切换主题",placement:"bottom"},{default:c(()=>[b("span",q,[B(t).isDark?(d(),s(v,{key:0,onClick:l[0]||(l[0]=e=>B(t).toggleTheme(!1))},{default:c(()=>[h(R)]),_:1})):(d(),s(v,{key:1,onClick:l[1]||(l[1]=e=>B(t).toggleTheme(!0))},{default:c(()=>[h(Z)]),_:1}))])]),_:1}),h(x,{drawer:i.value,"onUpdate:drawer":l[2]||(l[2]=e=>i.value=e)},null,8,["drawer"]),h(D,{ref_key:"command",ref:y},null,512)])}}};export{N as default};
|