"use strict";(self.webpackChunkmy_package_ext=self.webpackChunkmy_package_ext||[]).push([[2794],{42794:function(t,e,i){i.r(e),i.d(e,{default:function(){return n}}),i(13974),e={name:"breadcrumb",props:{value:"",mode:{default:"edit"},settings:{type:Object,default:function(){}},separator:{type:String,default:"/"},isRouterMode:{type:Boolean,default:!1}},computed:{activities:function(){return this.settings.breadcrumbList},active:{get:function(){var t,e=this;return(this.value||0==this.value)&&-1<(t=this.activities&&this.activities.findIndex((function(t){return t.value==e.value})))?t+1:1},set:function(t){}},routeName:function(){var t;return console.log(this.$route,"this.$route----"),(null==(t=this.$route)||null==(t=t.meta)?void 0:t.title)||""},changeActivities:function(){return this.activities.slice(0,+this.active)}},data:function(){return{demoList:[{value:"a",label:"首页"},{value:"b",label:"活动管理"},{value:"c",label:"活动列表"},{value:"d",label:"活动详情"}],breadcrumbItems:[]}},mounted:function(){!this.value&&this.settings&&this.settings.breadcrumbList&&this.settings.breadcrumbList instanceof Array&&0<this.settings.breadcrumbList.length&&this.$emit("input",this.settings.breadcrumbList[0].value),this.isRouterMode&&this.generateBreadcrumb()},watch:{},methods:{clickItem:function(t){this.$emit("clickBreadcrumbItem",t)},generateBreadcrumb:function(){var t=this.$route.matched;this.breadcrumbItems=t&&t.map((function(t){return{title:t.meta.title||t.name,path:t.path}}))}}};var n=(0,i(51900).Z)(e,(function(){var t=this,e=t._self._c;return e("div",{staticStyle:{width:"100%"}},["edit"===t.mode?e("div",[t.isRouterMode?[e("el-breadcrumb",{attrs:{separator:t.separator}},t._l(t.breadcrumbItems,(function(i,n){return e("el-breadcrumb-item",{key:n,attrs:{to:{path:i.path}}},[t._v(t._s(i.title))])})),1)]:[t.settings&&t.settings.breadcrumbList&&t.settings.breadcrumbList instanceof Array&&0<t.settings.breadcrumbList.length?[e("el-breadcrumb",{attrs:{separator:t.separator}},t._l(t.changeActivities,(function(i,n){return e("el-breadcrumb-item",{key:n,nativeOn:{click:function(e){return t.clickItem(i)}}},[t._v(t._s(i.label))])})),1)]:[e("el-breadcrumb",{attrs:{separator:t.separator}},t._l(t.demoList,(function(i,n){return e("el-breadcrumb-item",{key:n},[t._v("\n            "+t._s(i.label)+"\n          ")])})),1)]]],2):e("div",[t._v("\n    "+t._s(t.value)+"\n  ")])])}),[],!1,null,"670e3bc4",null).exports},51900:function(t,e,i){function n(t,e,i,n,r,s,a,u){var c,o,l="function"==typeof t?t.options:t;return e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):r&&(c=u?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c&&(l.functional?(l._injectStyles=c,o=l.render,l.render=function(t,e){return c.call(e),o(t,e)}):(e=l.beforeCreate,l.beforeCreate=e?[].concat(e,c):[c])),{exports:t,options:l}}i.d(e,{Z:function(){return n}})}}]);