
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.hurui.me
 */
  
import{M as e,_ as t}from"./src-CLMBPGj1.js";import{B as n}from"./reactivity.esm-bundler-D9OPVc9J.js";import{D as r,E as i,_ as a,b as o,k as s,mt as c,qt as l}from"./runtime-core.esm-bundler-D-xeQwTN.js";import{t as u}from"./settings-BmQ0nZoD.js";import{t as d}from"./page-header-CflkT4MF.js";import{h as f}from"./useApi-CROJJdhE-DcPxsXnv.js";import{t as p}from"./tabbar-BYNoYlW9.js";var m={class:`space-x-2`},h={class:`space-x-2`},g=s({__name:`api`,setup(s){let g=u(),_=f(),v=p();function y(){_.push(g.settings.app.home.fullPath)}function b(){_.close(g.settings.app.home.fullPath)}function x(){v.closeById()}function S(){v.closeById(g.settings.app.home.fullPath)}function C(){v.closeOtherSide()}function w(){v.closeLeftSide()}function T(){v.closeRightSide()}return(s,u)=>{let f=d,p=e,g=t;return c(),o(`div`,null,[r(f,{title:`标签栏`,description:`类似于浏览器的标签栏，并且支持右键操作`}),r(g,{title:`打开新标签页`,"main-class":`space-y-2`},{default:l(()=>[u[1]||(u[1]=a(`p`,null,`如果目标地址已在标签栏存在，则直接切换并访问。如果目标地址在标签栏不存在，则会在当前标签页后面插入新的标签页。`,-1)),r(p,{onClick:y},{default:l(()=>[...u[0]||(u[0]=[i(` 打开主页 `,-1)])]),_:1})]),_:1}),r(g,{title:`关闭当前标签页并跳转`,"main-class":`space-y-2`},{default:l(()=>[r(p,{onClick:b},{default:l(()=>[...u[2]||(u[2]=[i(` 关闭当前标签页，并跳转到主页 `,-1)])]),_:1})]),_:1}),r(g,{title:`关闭指定标签页`,"main-class":`space-y-2`},{default:l(()=>[u[5]||(u[5]=a(`p`,null,`如果当前只有一个标签时，则无法关闭。`,-1)),u[6]||(u[6]=a(`p`,null,`如果关闭的是当前标签页，则会在关闭后跳转至紧邻的标签页。`,-1)),u[7]||(u[7]=a(`p`,null,`如果关闭的目标页面不存在，则无法关闭。`,-1)),a(`div`,m,[r(p,{onClick:x},{default:l(()=>[...u[3]||(u[3]=[i(` 关闭当前页面 `,-1)])]),_:1}),r(p,{onClick:S},{default:l(()=>[...u[4]||(u[4]=[i(` 关闭主页 `,-1)])]),_:1})])]),_:1}),r(g,{title:`关闭非当前标签页`,"main-class":`space-y-2`},{default:l(()=>[u[11]||(u[11]=a(`p`,null,`除了提供关闭非当前标签页的 API 外，还提供了校验 API 。`,-1)),a(`div`,h,[r(p,{disabled:!n(v).checkCloseOtherSide(),onClick:C},{default:l(()=>[...u[8]||(u[8]=[i(` 关闭两侧标签页 `,-1)])]),_:1},8,[`disabled`]),r(p,{disabled:!n(v).checkCloseLeftSide(),onClick:w},{default:l(()=>[...u[9]||(u[9]=[i(` 关闭左侧标签页 `,-1)])]),_:1},8,[`disabled`]),r(p,{disabled:!n(v).checkCloseRightSide(),onClick:T},{default:l(()=>[...u[10]||(u[10]=[i(` 关闭右侧标签页 `,-1)])]),_:1},8,[`disabled`])])]),_:1})])}}});export{g as default};