goldpankit
Version:
GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。
2 lines (1 loc) • 2.15 kB
JavaScript
import{_ as l,o as i,c as o,K as c,i as u,r as _,a,g as w,t as m,z as s}from"./index-8f73103e.js";const f={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}},V={key:0,class:"inner-router-view"};function v(e,r,d,h,n,t){return n.visible?(i(),o("div",V,[c(e.$slots,"default")])):u("",!0)}const b=l(f,[["render",v]]);const $={name:"InnerRouterViewWindow",components:{InnerRouterView:b},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(r=>r.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]}},N={class:"inner-router-view-window"},g={class:"nav"},k={class:"title"},y={key:0},I={class:"routers"};function B(e,r,d,h,n,t){const p=_("el-button");return i(),o("div",N,[a("div",g,[a("div",k,[n.histories.length>1?(i(),w(p,{key:0,class:"button-icon",icon:"ArrowLeftBold",onClick:t.back},null,8,["onClick"])):u("",!0),c(e.$slots,"title",{},()=>[t.currentView.title!=null&&t.currentView.title!==""?(i(),o("h4",y,m(t.currentView.title),1)):u("",!0)],!0)])]),a("div",I,[c(e.$slots,"default",{},void 0,!0)])])}const C=l($,[["render",B],["__scopeId","data-v-44571a69"]]);function S(e){return s.post("/database/search",e)}function x(e){return s.get(`/database/delete/${e}`)}function D(e){return s.post("/database/model/create",e)}function M(e){return s.post("/database/model/update",e)}function W(e){return s.post("/database/model/delete",e)}export{C as I,b as a,W as b,D as c,x as d,S as s,M as u};