(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{377:function(t,e,r){"use strict";r.r(e);var a=r(18),s=Object(a.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"全局api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#全局api"}},[t._v("#")]),t._v(" 全局API")]),t._v(" "),r("p",[t._v("我们提供了一些全局Api，在日常功能开发中或许会有帮助，它们均被绑定到了页面组件或子组件实例上。"),r("br"),t._v("\n在组件内可以直接通过"),r("code",[t._v("this.$[apiName]")]),t._v("的方式调用。如下：")]),t._v(" "),r("h2",{attrs:{id:"多页签"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#多页签"}},[t._v("#")]),t._v(" 多页签")]),t._v(" "),r("h3",{attrs:{id:"closepage-closeroute-nextroute"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#closepage-closeroute-nextroute"}},[t._v("#")]),t._v(" $closePage(closeRoute, nextRoute)")]),t._v(" "),r("p",[t._v("该api用于关闭当前已打开的页签，接收两个参数：")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("closeRoute")]),r("br"),t._v("\n要关闭的页签对应的 route 对象，可简写为路由的 fullPath 字符串值。")]),t._v(" "),r("li",[r("strong",[t._v("nextRoute")]),r("br"),t._v("\n关闭页签要后跳转的 route 对象，可不传，不传则会自动选择打开页签（临近原则）。")])]),t._v(" "),r("h3",{attrs:{id:"refreshpage-route"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#refreshpage-route"}},[t._v("#")]),t._v(" $refreshPage(route)")]),t._v(" "),r("p",[t._v("该api用于刷新路由对应的页签，接收一个参数：")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("route")]),r("br"),t._v("\n要刷新的页签对应的 route 对象，可简写为路由的 fullPath 字符串值。")])]),t._v(" "),r("h3",{attrs:{id:"openpage-route-title"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#openpage-route-title"}},[t._v("#")]),t._v(" $openPage(route, title)")]),t._v(" "),r("p",[t._v("该api用于打开一个新页签，接收两个参数：")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("route")]),r("br"),t._v("\n要打开的页签对应的 route 对象，可简写为路由的 fullPath 字符串值。")]),t._v(" "),r("li",[r("strong",[t._v("title")]),r("br"),t._v("\n设置打开页签的标题，可不传。")])]),t._v(" "),r("h3",{attrs:{id:"setpagetitle-route-title"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#setpagetitle-route-title"}},[t._v("#")]),t._v(" $setPageTitle(route, title)")]),t._v(" "),r("p",[t._v("该api用于设置页签的标题，接收两个参数：")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("route")]),r("br"),t._v("\n要设置的页签对应的 route 对象，可简写为路由的 fullPath 字符串值。")]),t._v(" "),r("li",[r("strong",[t._v("title")]),r("br"),t._v("\n页签的标题。")])]),t._v(" "),r("h2",{attrs:{id:"权限"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#权限"}},[t._v("#")]),t._v(" 权限")]),t._v(" "),r("h3",{attrs:{id:"auth-check-type"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#auth-check-type"}},[t._v("#")]),t._v(" $auth(check, type)")]),t._v(" "),r("p",[t._v("该api可以用于操作权限校验，接收两个参数：")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("check")]),r("br"),t._v("\n需要要校验的操作权限")]),t._v(" "),r("li",[r("strong",[t._v("type")]),r("br"),t._v("\n操作权限校验类别，可选 "),r("code",[t._v("permission")]),t._v(" 和 "),r("code",[t._v("role")]),t._v("，即通过权限校验还是角色进行校验，可不传（不传的话，会对两种类型都进行匹配，任意一种匹配成功即校验通过）。")])])])}),[],!1,null,null,null);e.default=s.exports}}]);