goldpankit
Version:
GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。
2 lines (1 loc) • 1.84 kB
JavaScript
import{_ as u,o as s,c as o,N as a,j as c,r as _,a as n,h as p,t as w}from"./index-2b5ed492.js";const m={name:"InnerRouterView",props:{default:{type:Boolean,default:!1},visible:{default:!1},name:{type:String},title:{type:String}},data(){return{visible:!1}},computed:{currentViewName(){return this.$parent.currentViewName}},watch:{currentViewName(e){this.visible=e===this.name}},methods:{},created(){this.visible=this.$parent.currentViewName===this.name}},f={key:0,class:"inner-router-view"};function V(e,i,l,d,r,t){return r.visible?(s(),o("div",f,[a(e.$slots,"default")])):c("",!0)}const v=u(m,[["render",V]]);const N={name:"InnerRouterViewWindow",components:{InnerRouterView:v},data(){return{currentViewName:"",views:[],histories:[]}},computed:{currentView(){return this.views.find(e=>e.props.name===this.currentViewName).props}},methods:{push(e){this.histories.push(e),this.currentViewName=e,this.views=this.$slots.default()},back(){this.histories.pop(),this.currentViewName=this.histories[this.histories.length-1]},__getDefaultView(){let e=this.views.find(i=>i.props.default);return e==null&&(e=this.views[0].props.name),e}},created(){this.views=this.$slots.default(),this.currentViewName=this.__getDefaultView(),this.histories=[this.currentViewName]}},$={class:"inner-router-view-window"},b={class:"nav"},k={class:"title"},y={key:0},g={class:"routers"};function I(e,i,l,d,r,t){const h=_("el-button");return s(),o("div",$,[n("div",b,[n("div",k,[r.histories.length>1?(s(),p(h,{key:0,class:"button-icon",icon:"ArrowLeftBold",onClick:t.back},null,8,["onClick"])):c("",!0),a(e.$slots,"title",{},()=>[t.currentView.title!=null&&t.currentView.title!==""?(s(),o("h4",y,w(t.currentView.title),1)):c("",!0)],!0)])]),n("div",g,[a(e.$slots,"default",{},void 0,!0)])])}const R=u(N,[["render",I],["__scopeId","data-v-44571a69"]]);export{R as I,v as a};