@luzhaoqi/test 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/lib-cjs.js +503 -464
  2. package/package.json +1 -1
package/dist/lib-cjs.js CHANGED
@@ -17715,7 +17715,7 @@ var __vue_normalize__ = /*@__PURE__*/getDefaultExportFromCjs(normalizeComponent_
17715
17715
  const __vue_script__$x = script$x;
17716
17716
 
17717
17717
  /* template */
17718
- var __vue_render__$y = function () {
17718
+ var __vue_render__$z = function () {
17719
17719
  var _vm = this;
17720
17720
  var _h = _vm.$createElement;
17721
17721
  var _c = _vm._self._c || _h;
@@ -17725,17 +17725,17 @@ var __vue_render__$y = function () {
17725
17725
  _c("img", { attrs: { src: _vm.img, alt: "" } }),
17726
17726
  ])
17727
17727
  };
17728
- var __vue_staticRenderFns__$y = [];
17729
- __vue_render__$y._withStripped = true;
17728
+ var __vue_staticRenderFns__$z = [];
17729
+ __vue_render__$z._withStripped = true;
17730
17730
 
17731
17731
  /* style */
17732
- const __vue_inject_styles__$y = undefined;
17732
+ const __vue_inject_styles__$z = undefined;
17733
17733
  /* scoped */
17734
- const __vue_scope_id__$y = undefined;
17734
+ const __vue_scope_id__$z = undefined;
17735
17735
  /* module identifier */
17736
- const __vue_module_identifier__$y = undefined;
17736
+ const __vue_module_identifier__$z = undefined;
17737
17737
  /* functional template */
17738
- const __vue_is_functional_template__$y = false;
17738
+ const __vue_is_functional_template__$z = false;
17739
17739
  /* style inject */
17740
17740
 
17741
17741
  /* style inject SSR */
@@ -17744,22 +17744,22 @@ __vue_render__$y._withStripped = true;
17744
17744
 
17745
17745
 
17746
17746
 
17747
- const __vue_component__$y = /*#__PURE__*/__vue_normalize__(
17748
- { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
17749
- __vue_inject_styles__$y,
17747
+ const __vue_component__$z = /*#__PURE__*/__vue_normalize__(
17748
+ { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
17749
+ __vue_inject_styles__$z,
17750
17750
  __vue_script__$x,
17751
- __vue_scope_id__$y,
17752
- __vue_is_functional_template__$y,
17753
- __vue_module_identifier__$y,
17751
+ __vue_scope_id__$z,
17752
+ __vue_is_functional_template__$z,
17753
+ __vue_module_identifier__$z,
17754
17754
  false,
17755
17755
  undefined,
17756
17756
  undefined,
17757
17757
  undefined
17758
17758
  );
17759
17759
 
17760
- __vue_component__$y.install = function (Vue, option) {
17760
+ __vue_component__$z.install = function (Vue, option) {
17761
17761
  setGolbalData(Vue, option);
17762
- Vue.component(__vue_component__$y.name, __vue_component__$y);
17762
+ Vue.component(__vue_component__$z.name, __vue_component__$z);
17763
17763
  };
17764
17764
 
17765
17765
  var axios$3 = {exports: {}};
@@ -94391,178 +94391,6 @@ var nprogress = {exports: {}};
94391
94391
  var nprogressExports = nprogress.exports;
94392
94392
  var NProgress = /*@__PURE__*/getDefaultExportFromCjs(nprogressExports);
94393
94393
 
94394
- NProgress.configure({ showSpinner: false });
94395
-
94396
- //todo 需要优化
94397
- function chuli(arr) {
94398
- const hasChildren = (arr) => {
94399
- arr.forEach((item) => {
94400
- if (item.children) {
94401
- hasChildren(item.children);
94402
- }
94403
- if (item.component === 'Layout') {
94404
- console.log('Layout');
94405
- // item.component = Layout
94406
- }
94407
- });
94408
- };
94409
- hasChildren(arr);
94410
- }
94411
-
94412
- function createRouter(Vue) {
94413
- // 判断是否已经use过VueRouter
94414
- const VueRouterObj = Vue._installedPlugins.filter((item) => {
94415
- return item.name === 'VueRouter'
94416
- });
94417
- if (!(VueRouterObj && VueRouterObj[0])) {
94418
- Vue.use(VueRouter);
94419
- const $z = Vue.prototype.$z;
94420
- const routerOption = $z.router;
94421
- if (routerOption) {
94422
- const defaultConfig = {
94423
- mode: routerOption.mode || 'history', // 去掉url中的#
94424
- scrollBehavior: () => ({ y: 0 }),
94425
- routes: routerOption.routes || []
94426
- };
94427
- chuli(defaultConfig.routes);
94428
- const router = new VueRouter(defaultConfig);
94429
- router.beforeEach((to, from, next) => {
94430
- if (routerOption.beforeEach) {
94431
- routerOption.beforeEach(to, from, next);
94432
- } else {
94433
- NProgress.start();
94434
- const httpOption = $z.http || {};
94435
- const token = getCookie(httpOption.tokenKey || TOKENKEY);
94436
- const store = $z.store;
94437
- if (!routerOption.whiteList) {
94438
- routerOption.whiteList = ['/login', '/register'];
94439
- }
94440
- if (token) {
94441
- if (to.path === '/login') {
94442
- next({ path: '/' });
94443
- NProgress.done();
94444
- } else {
94445
- // 判断是不是第一次 需要动态加载路由
94446
- if (!router.options.isAddDynamicMenuRoutes && store) {
94447
- router.options.isAddDynamicMenuRoutes = true;
94448
- isRelogin.show = true;
94449
- store.dispatch('user/GetInfo', $z).then(() => {
94450
- isRelogin.show = false;
94451
- store.dispatch('permission/GenerateRoutes', $z).then((accessRoutes) => {
94452
- // 根据roles权限生成可访问的路由表
94453
- router.addRoutes(accessRoutes); // 动态添加可访问路由表
94454
- next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
94455
- });
94456
- });
94457
- next();
94458
- } else {
94459
- next();
94460
- }
94461
- }
94462
- } else {
94463
- // 没有token
94464
- if (routerOption.whiteList.indexOf(to.path) !== -1) {
94465
- // 在免登录白名单,直接进入
94466
- next();
94467
- } else {
94468
- next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
94469
- NProgress.done();
94470
- }
94471
- }
94472
- }
94473
- });
94474
- router.afterEach(() => {
94475
- if (routerOption.afterEach) {
94476
- routerOption.afterEach();
94477
- } else {
94478
- NProgress.done();
94479
- }
94480
- });
94481
-
94482
- Vue.prototype.$z.$router = router;
94483
- }
94484
- }
94485
- }
94486
-
94487
- const state$5 = {
94488
- token: '',
94489
- userinfo: {},
94490
- roles: [],
94491
- permissions: []
94492
- };
94493
- const mutations$5 = {
94494
- SET_TOKEN: (state, token) => {
94495
- state.token = token;
94496
- },
94497
- SET_ROLES: (state, roles) => {
94498
- state.roles = roles;
94499
- },
94500
- SET_USERINFO: (state, userinfo) => {
94501
- state.userinfo = userinfo;
94502
- },
94503
- SET_PERMISSIONS: (state, permissions) => {
94504
- state.permissions = permissions;
94505
- }
94506
- };
94507
- const actions$5 = {
94508
- // 登录 todo
94509
- Login({ commit }, userInfo) {},
94510
-
94511
- // 获取用户信息
94512
- GetInfo({ commit }, $z) {
94513
- return new Promise((resolve, reject) => {
94514
- const $http = $z.$http;
94515
- const routerOption = $z.router || {};
94516
- let api = function () {
94517
- if ($http) {
94518
- return $http.request({
94519
- url: routerOption.getUserInfo || '/getInfo',
94520
- method: 'get'
94521
- })
94522
- } else {
94523
- Promise.resolve({});
94524
- }
94525
- };
94526
- if (typeof routerOption.getUserInfo === 'function') {
94527
- api = routerOption.getUserInfo;
94528
- }
94529
- api()
94530
- .then((res) => {
94531
- commit('SET_USERINFO', res.user || {});
94532
- commit('SET_PERMISSIONS', res.permissions || '*:*:*');
94533
- if (res.roles && res.roles.length > 0) {
94534
- commit('SET_ROLES', res.roles);
94535
- } else {
94536
- commit('SET_ROLES', ['ROLE_DEFAULT']);
94537
- }
94538
- resolve(res);
94539
- })
94540
- .catch((error) => {
94541
- reject(error);
94542
- });
94543
- })
94544
- },
94545
-
94546
- // 退出系统 todo
94547
- LogOut({ commit, state }) {},
94548
-
94549
- // 前端 登出 todo
94550
- FedLogOut({ commit }) {}
94551
- };
94552
-
94553
- function registerStateModule$5(store) {
94554
- if (!store || !store.hasModule) return
94555
- if (!store.hasModule('user')) {
94556
- const statesModule = {
94557
- namespaced: true,
94558
- state: state$5,
94559
- mutations: mutations$5,
94560
- actions: actions$5
94561
- };
94562
- store.registerModule('user', statesModule);
94563
- }
94564
- }
94565
-
94566
94394
  /*!
94567
94395
  * vuex v3.6.2
94568
94396
  * (c) 2021 Evan You
@@ -95533,11 +95361,6 @@ function getModuleByNamespace (store, helper, namespace) {
95533
95361
  return module
95534
95362
  }
95535
95363
 
95536
- //
95537
- //
95538
- //
95539
- //
95540
- //
95541
95364
  //
95542
95365
  //
95543
95366
  //
@@ -95549,7 +95372,7 @@ var script$w = {
95549
95372
  props: {
95550
95373
  src: {
95551
95374
  type: String,
95552
- default: "/"
95375
+ default: '/'
95553
95376
  },
95554
95377
  iframeId: {
95555
95378
  type: String
@@ -95558,17 +95381,17 @@ var script$w = {
95558
95381
  data() {
95559
95382
  return {
95560
95383
  loading: false,
95561
- height: document.documentElement.clientHeight - 94.5 + "px;"
95562
- };
95384
+ height: document.documentElement.clientHeight - 94.5 + 'px;'
95385
+ }
95563
95386
  },
95564
95387
  mounted() {
95565
95388
  var _this = this;
95566
- const iframeId = ("#" + this.iframeId).replace(/\//g, "\\/");
95389
+ const iframeId = ('#' + this.iframeId).replace(/\//g, '\\/');
95567
95390
  const iframe = document.querySelector(iframeId);
95568
95391
  // iframe页面loading控制
95569
95392
  if (iframe.attachEvent) {
95570
95393
  this.loading = true;
95571
- iframe.attachEvent("onload", function () {
95394
+ iframe.attachEvent('onload', function () {
95572
95395
  _this.loading = false;
95573
95396
  });
95574
95397
  } else {
@@ -95584,7 +95407,7 @@ var script$w = {
95584
95407
  const __vue_script__$w = script$w;
95585
95408
 
95586
95409
  /* template */
95587
- var __vue_render__$x = function () {
95410
+ var __vue_render__$y = function () {
95588
95411
  var _vm = this;
95589
95412
  var _h = _vm.$createElement;
95590
95413
  var _c = _vm._self._c || _h;
@@ -95610,17 +95433,17 @@ var __vue_render__$x = function () {
95610
95433
  ]
95611
95434
  )
95612
95435
  };
95613
- var __vue_staticRenderFns__$x = [];
95614
- __vue_render__$x._withStripped = true;
95436
+ var __vue_staticRenderFns__$y = [];
95437
+ __vue_render__$y._withStripped = true;
95615
95438
 
95616
95439
  /* style */
95617
- const __vue_inject_styles__$x = undefined;
95440
+ const __vue_inject_styles__$y = undefined;
95618
95441
  /* scoped */
95619
- const __vue_scope_id__$x = undefined;
95442
+ const __vue_scope_id__$y = undefined;
95620
95443
  /* module identifier */
95621
- const __vue_module_identifier__$x = undefined;
95444
+ const __vue_module_identifier__$y = undefined;
95622
95445
  /* functional template */
95623
- const __vue_is_functional_template__$x = false;
95446
+ const __vue_is_functional_template__$y = false;
95624
95447
  /* style inject */
95625
95448
 
95626
95449
  /* style inject SSR */
@@ -95629,13 +95452,13 @@ __vue_render__$x._withStripped = true;
95629
95452
 
95630
95453
 
95631
95454
 
95632
- const __vue_component__$x = /*#__PURE__*/__vue_normalize__(
95633
- { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
95634
- __vue_inject_styles__$x,
95455
+ const __vue_component__$y = /*#__PURE__*/__vue_normalize__(
95456
+ { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
95457
+ __vue_inject_styles__$y,
95635
95458
  __vue_script__$w,
95636
- __vue_scope_id__$x,
95637
- __vue_is_functional_template__$x,
95638
- __vue_module_identifier__$x,
95459
+ __vue_scope_id__$y,
95460
+ __vue_is_functional_template__$y,
95461
+ __vue_module_identifier__$y,
95639
95462
  false,
95640
95463
  undefined,
95641
95464
  undefined,
@@ -95657,7 +95480,7 @@ __vue_render__$x._withStripped = true;
95657
95480
 
95658
95481
 
95659
95482
  var script$v = {
95660
- components: { InnerLink: __vue_component__$x },
95483
+ components: { InnerLink: __vue_component__$y },
95661
95484
  computed: {
95662
95485
  iframeViews() {
95663
95486
  return this.$store.state.tagsView.iframeViews
@@ -95669,7 +95492,7 @@ var script$v = {
95669
95492
  const __vue_script__$v = script$v;
95670
95493
 
95671
95494
  /* template */
95672
- var __vue_render__$w = function () {
95495
+ var __vue_render__$x = function () {
95673
95496
  var _vm = this;
95674
95497
  var _h = _vm.$createElement;
95675
95498
  var _c = _vm._self._c || _h;
@@ -95693,17 +95516,17 @@ var __vue_render__$w = function () {
95693
95516
  1
95694
95517
  )
95695
95518
  };
95696
- var __vue_staticRenderFns__$w = [];
95697
- __vue_render__$w._withStripped = true;
95519
+ var __vue_staticRenderFns__$x = [];
95520
+ __vue_render__$x._withStripped = true;
95698
95521
 
95699
95522
  /* style */
95700
- const __vue_inject_styles__$w = undefined;
95523
+ const __vue_inject_styles__$x = undefined;
95701
95524
  /* scoped */
95702
- const __vue_scope_id__$w = undefined;
95525
+ const __vue_scope_id__$x = undefined;
95703
95526
  /* module identifier */
95704
- const __vue_module_identifier__$w = undefined;
95527
+ const __vue_module_identifier__$x = undefined;
95705
95528
  /* functional template */
95706
- const __vue_is_functional_template__$w = false;
95529
+ const __vue_is_functional_template__$x = false;
95707
95530
  /* style inject */
95708
95531
 
95709
95532
  /* style inject SSR */
@@ -95712,13 +95535,13 @@ __vue_render__$w._withStripped = true;
95712
95535
 
95713
95536
 
95714
95537
 
95715
- const __vue_component__$w = /*#__PURE__*/__vue_normalize__(
95716
- { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
95717
- __vue_inject_styles__$w,
95538
+ const __vue_component__$x = /*#__PURE__*/__vue_normalize__(
95539
+ { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
95540
+ __vue_inject_styles__$x,
95718
95541
  __vue_script__$v,
95719
- __vue_scope_id__$w,
95720
- __vue_is_functional_template__$w,
95721
- __vue_module_identifier__$w,
95542
+ __vue_scope_id__$x,
95543
+ __vue_is_functional_template__$x,
95544
+ __vue_module_identifier__$x,
95722
95545
  false,
95723
95546
  undefined,
95724
95547
  undefined,
@@ -95740,7 +95563,7 @@ __vue_render__$w._withStripped = true;
95740
95563
 
95741
95564
  var script$u = {
95742
95565
  name: 'AppMain',
95743
- components: { iframeToggle: __vue_component__$w },
95566
+ components: { iframeToggle: __vue_component__$x },
95744
95567
  computed: {
95745
95568
  cachedViews() {
95746
95569
  return this.$store.state.tagsView.cachedViews
@@ -95813,7 +95636,7 @@ var __vue_create_injector__ = /*@__PURE__*/getDefaultExportFromCjs(browser);
95813
95636
  const __vue_script__$u = script$u;
95814
95637
 
95815
95638
  /* template */
95816
- var __vue_render__$v = function () {
95639
+ var __vue_render__$w = function () {
95817
95640
  var _vm = this;
95818
95641
  var _h = _vm.$createElement;
95819
95642
  var _c = _vm._self._c || _h;
@@ -95844,35 +95667,35 @@ var __vue_render__$v = function () {
95844
95667
  1
95845
95668
  )
95846
95669
  };
95847
- var __vue_staticRenderFns__$v = [];
95848
- __vue_render__$v._withStripped = true;
95670
+ var __vue_staticRenderFns__$w = [];
95671
+ __vue_render__$w._withStripped = true;
95849
95672
 
95850
95673
  /* style */
95851
- const __vue_inject_styles__$v = function (inject) {
95674
+ const __vue_inject_styles__$w = function (inject) {
95852
95675
  if (!inject) return
95853
95676
  inject("data-v-e177811c_0", { source: "/**\n$base-menu-color:hsla(0,0%,100%,.65);\n$base-menu-color-active:#fff;\n$base-menu-background:#001529;\n$base-logo-title-color: #ffffff;\n\n$base-menu-light-color:rgba(0,0,0,.70);\n$base-menu-light-background:#ffffff;\n$base-logo-light-title-color: #001529;\n\n$base-sub-menu-background:#000c17;\n$base-sub-menu-hover:#001528;\n*/\n[data-v-e177811c]:export {\n menuColor: #bfcbd9;\n menuLightColor: rgba(0, 0, 0, 0.7);\n menuColorActive: #f4f4f5;\n menuBackground: #304156;\n menuLightBackground: #ffffff;\n subMenuBackground: #1f2d3d;\n subMenuHover: #001528;\n sideBarWidth: 200px;\n logoTitleColor: #ffffff;\n logoLightTitleColor: #001529;\n}\n.app-main[data-v-e177811c] {\n /* 50= navbar 50 */\n min-height: calc(100vh - 50px);\n width: 100%;\n position: relative;\n overflow: hidden;\n padding: 20px;\n color: #30B08F;\n}\n.fixed-header + .app-main[data-v-e177811c] {\n padding-top: 50px;\n}\n.hasTagsView .app-main[data-v-e177811c] {\n /* 84 = navbar + tags-view = 50 + 34 */\n min-height: calc(100vh - 84px);\n}\n.hasTagsView .fixed-header + .app-main[data-v-e177811c] {\n padding-top: 84px;\n}\n\n/*# sourceMappingURL=AppMain.vue.map */", map: {"version":3,"sources":["AppMain.vue","D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\AppMain.vue"],"names":[],"mappings":"AAAA;;;;;;;;;;;;CAYC;AC8BD;ED5BE,kBAAkB;EC8BpB,kCAAA;EACA,wBAAA;EACA,uBAAA;EACA,4BAAA;EACA,0BAAA;ED5BE,qBAAqB;EC8BvB,mBAZA;EAaA,uBAAA;EACA,4BAAA;AD5BA;ACMA;EACA,oBAAA;EACA,8BAAA;EACA,WAAA;EACA,kBAAA;EACA,gBAAA;EACA,aAAA;EACA,cAAA;ADHA;ACMA;EACA,iBAAA;ADHA;ACOA;EACA,sCAAA;EACA,8BAAA;ADJA;ACOA;EACA,iBAAA;ADLA;;AAEA,sCAAsC","file":"AppMain.vue","sourcesContent":["/**\n$base-menu-color:hsla(0,0%,100%,.65);\n$base-menu-color-active:#fff;\n$base-menu-background:#001529;\n$base-logo-title-color: #ffffff;\n\n$base-menu-light-color:rgba(0,0,0,.70);\n$base-menu-light-background:#ffffff;\n$base-logo-light-title-color: #001529;\n\n$base-sub-menu-background:#000c17;\n$base-sub-menu-hover:#001528;\n*/\n:export {\n menuColor: #bfcbd9;\n menuLightColor: rgba(0, 0, 0, 0.7);\n menuColorActive: #f4f4f5;\n menuBackground: #304156;\n menuLightBackground: #ffffff;\n subMenuBackground: #1f2d3d;\n subMenuHover: #001528;\n sideBarWidth: 200px;\n logoTitleColor: #ffffff;\n logoLightTitleColor: #001529;\n}\n\n.app-main {\n /* 50= navbar 50 */\n min-height: calc(100vh - 50px);\n width: 100%;\n position: relative;\n overflow: hidden;\n padding: 20px;\n color: #30B08F;\n}\n\n.fixed-header + .app-main {\n padding-top: 50px;\n}\n\n.hasTagsView .app-main {\n /* 84 = navbar + tags-view = 50 + 34 */\n min-height: calc(100vh - 84px);\n}\n.hasTagsView .fixed-header + .app-main {\n padding-top: 84px;\n}\n\n/*# sourceMappingURL=AppMain.vue.map */","<template>\n <section class=\"app-main\">\n <transition name=\"fade-transform\" mode=\"out-in\">\n <keep-alive :include=\"cachedViews\">\n <router-view v-if=\"!$route.meta.link\" :key=\"key\" />\n </keep-alive>\n </transition>\n <iframe-toggle />\n </section>\n</template>\n\n<script>\nimport iframeToggle from './IframeToggle/index.vue'\n\nexport default {\n name: 'AppMain',\n components: { iframeToggle },\n computed: {\n cachedViews() {\n return this.$store.state.tagsView.cachedViews\n },\n key() {\n return this.$route.path\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../scss/variables.module.scss';\n.app-main {\n /* 50= navbar 50 */\n min-height: calc(100vh - 50px);\n width: 100%;\n position: relative;\n overflow: hidden;\n padding: 20px;\n color: $green;\n}\n\n.fixed-header + .app-main {\n padding-top: 50px;\n}\n\n.hasTagsView {\n .app-main {\n /* 84 = navbar + tags-view = 50 + 34 */\n min-height: calc(100vh - 84px);\n }\n\n .fixed-header + .app-main {\n padding-top: 84px;\n }\n}\n</style>\n\n<style lang=\"scss\">\n// fix css style bug in open el-dialog\n.el-popup-parent--hidden {\n .fixed-header {\n padding-right: 6px;\n }\n}\n\n::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n\n::-webkit-scrollbar-track {\n background-color: #f1f1f1;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #c0c0c0;\n border-radius: 3px;\n}\n</style>\n"]}, media: undefined })
95854
95677
  ,inject("data-v-e177811c_1", { source: ".el-popup-parent--hidden .fixed-header {\n padding-right: 6px;\n}\n::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n::-webkit-scrollbar-track {\n background-color: #f1f1f1;\n}\n::-webkit-scrollbar-thumb {\n background-color: #c0c0c0;\n border-radius: 3px;\n}\n\n/*# sourceMappingURL=AppMain.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\AppMain.vue","AppMain.vue"],"names":[],"mappings":"AA2DA;EACA,kBAAA;AC1DA;AD8DA;EACA,UAAA;EACA,WAAA;AC3DA;AD8DA;EACA,yBAAA;AC3DA;AD8DA;EACA,yBAAA;EACA,kBAAA;AC3DA;;AAEA,sCAAsC","file":"AppMain.vue","sourcesContent":["<template>\n <section class=\"app-main\">\n <transition name=\"fade-transform\" mode=\"out-in\">\n <keep-alive :include=\"cachedViews\">\n <router-view v-if=\"!$route.meta.link\" :key=\"key\" />\n </keep-alive>\n </transition>\n <iframe-toggle />\n </section>\n</template>\n\n<script>\nimport iframeToggle from './IframeToggle/index.vue'\n\nexport default {\n name: 'AppMain',\n components: { iframeToggle },\n computed: {\n cachedViews() {\n return this.$store.state.tagsView.cachedViews\n },\n key() {\n return this.$route.path\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../scss/variables.module.scss';\n.app-main {\n /* 50= navbar 50 */\n min-height: calc(100vh - 50px);\n width: 100%;\n position: relative;\n overflow: hidden;\n padding: 20px;\n color: $green;\n}\n\n.fixed-header + .app-main {\n padding-top: 50px;\n}\n\n.hasTagsView {\n .app-main {\n /* 84 = navbar + tags-view = 50 + 34 */\n min-height: calc(100vh - 84px);\n }\n\n .fixed-header + .app-main {\n padding-top: 84px;\n }\n}\n</style>\n\n<style lang=\"scss\">\n// fix css style bug in open el-dialog\n.el-popup-parent--hidden {\n .fixed-header {\n padding-right: 6px;\n }\n}\n\n::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n\n::-webkit-scrollbar-track {\n background-color: #f1f1f1;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #c0c0c0;\n border-radius: 3px;\n}\n</style>\n",".el-popup-parent--hidden .fixed-header {\n padding-right: 6px;\n}\n\n::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n\n::-webkit-scrollbar-track {\n background-color: #f1f1f1;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #c0c0c0;\n border-radius: 3px;\n}\n\n/*# sourceMappingURL=AppMain.vue.map */"]}, media: undefined });
95855
95678
 
95856
95679
  };
95857
95680
  /* scoped */
95858
- const __vue_scope_id__$v = "data-v-e177811c";
95681
+ const __vue_scope_id__$w = "data-v-e177811c";
95859
95682
  /* module identifier */
95860
- const __vue_module_identifier__$v = undefined;
95683
+ const __vue_module_identifier__$w = undefined;
95861
95684
  /* functional template */
95862
- const __vue_is_functional_template__$v = false;
95685
+ const __vue_is_functional_template__$w = false;
95863
95686
  /* style inject SSR */
95864
95687
 
95865
95688
  /* style inject shadow dom */
95866
95689
 
95867
95690
 
95868
95691
 
95869
- const __vue_component__$v = /*#__PURE__*/__vue_normalize__(
95870
- { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
95871
- __vue_inject_styles__$v,
95692
+ const __vue_component__$w = /*#__PURE__*/__vue_normalize__(
95693
+ { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
95694
+ __vue_inject_styles__$w,
95872
95695
  __vue_script__$u,
95873
- __vue_scope_id__$v,
95874
- __vue_is_functional_template__$v,
95875
- __vue_module_identifier__$v,
95696
+ __vue_scope_id__$w,
95697
+ __vue_is_functional_template__$w,
95698
+ __vue_module_identifier__$w,
95876
95699
  false,
95877
95700
  __vue_create_injector__,
95878
95701
  undefined,
@@ -95890,6 +95713,8 @@ __vue_render__$v._withStripped = true;
95890
95713
  //
95891
95714
  //
95892
95715
  //
95716
+ //
95717
+ //
95893
95718
 
95894
95719
  var script$t = {
95895
95720
  data() {
@@ -95910,16 +95735,22 @@ var script$t = {
95910
95735
  this.getBreadcrumb();
95911
95736
  },
95912
95737
  methods: {
95738
+ getIndexRouter() {
95739
+ const arr = this.$store.state.permission.sidebarRouters;
95740
+ const rootItem = arr.find((item) => {
95741
+ return (item.path === '' || item.path === '/') && item.redirect
95742
+ });
95743
+ return { path: '/', meta: { title: rootItem?.meta?.title || '首页' } }
95744
+ },
95913
95745
  getBreadcrumb() {
95914
95746
  // only show routes with meta.title
95915
- let matched = this.$route.matched.filter(item => item.meta && item.meta.title);
95747
+ let matched = this.$route.matched.filter((item) => item.meta && item.meta.title);
95748
+ matched = matched.filter((item) => item.path !== '' && item.path !== '/');
95916
95749
  const first = matched[0];
95917
-
95918
95750
  if (!this.isDashboard(first)) {
95919
- matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched);
95751
+ matched = [this.getIndexRouter()].concat(matched);
95920
95752
  }
95921
-
95922
- this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false);
95753
+ this.levelList = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false);
95923
95754
  },
95924
95755
  isDashboard(route) {
95925
95756
  const name = route && route.name;
@@ -95943,71 +95774,78 @@ var script$t = {
95943
95774
  const __vue_script__$t = script$t;
95944
95775
 
95945
95776
  /* template */
95946
- var __vue_render__$u = function () {
95777
+ var __vue_render__$v = function () {
95947
95778
  var _vm = this;
95948
95779
  var _h = _vm.$createElement;
95949
95780
  var _c = _vm._self._c || _h;
95950
95781
  return _c(
95951
- "el-breadcrumb",
95952
- { staticClass: "app-breadcrumb", attrs: { separator: "/" } },
95782
+ "div",
95953
95783
  [
95954
95784
  _c(
95955
- "transition-group",
95956
- { attrs: { name: "breadcrumb" } },
95957
- _vm._l(_vm.levelList, function (item, index) {
95958
- return _c("el-breadcrumb-item", { key: item.path }, [
95959
- item.redirect === "noRedirect" || index == _vm.levelList.length - 1
95960
- ? _c("span", { staticClass: "no-redirect" }, [
95961
- _vm._v(_vm._s(item.meta.title)),
95962
- ])
95963
- : _c(
95964
- "a",
95965
- {
95966
- on: {
95967
- click: function ($event) {
95968
- $event.preventDefault();
95969
- return _vm.handleLink(item)
95785
+ "el-breadcrumb",
95786
+ { staticClass: "app-breadcrumb", attrs: { separator: "/" } },
95787
+ [
95788
+ _c(
95789
+ "transition-group",
95790
+ { attrs: { name: "breadcrumb" } },
95791
+ _vm._l(_vm.levelList, function (item, index) {
95792
+ return _c("el-breadcrumb-item", { key: item.path }, [
95793
+ item.redirect === "noRedirect" ||
95794
+ index == _vm.levelList.length - 1
95795
+ ? _c("span", { staticClass: "no-redirect" }, [
95796
+ _vm._v(_vm._s(item.meta.title)),
95797
+ ])
95798
+ : _c(
95799
+ "a",
95800
+ {
95801
+ on: {
95802
+ click: function ($event) {
95803
+ $event.preventDefault();
95804
+ return _vm.handleLink(item)
95805
+ },
95806
+ },
95970
95807
  },
95971
- },
95972
- },
95973
- [_vm._v(_vm._s(item.meta.title))]
95974
- ),
95975
- ])
95976
- }),
95808
+ [_vm._v(_vm._s(item.meta.title))]
95809
+ ),
95810
+ ])
95811
+ }),
95812
+ 1
95813
+ ),
95814
+ ],
95977
95815
  1
95978
95816
  ),
95979
95817
  ],
95980
95818
  1
95981
95819
  )
95982
95820
  };
95983
- var __vue_staticRenderFns__$u = [];
95984
- __vue_render__$u._withStripped = true;
95821
+ var __vue_staticRenderFns__$v = [];
95822
+ __vue_render__$v._withStripped = true;
95985
95823
 
95986
95824
  /* style */
95987
- const __vue_inject_styles__$u = function (inject) {
95825
+ const __vue_inject_styles__$v = function (inject) {
95988
95826
  if (!inject) return
95989
- inject("data-v-1afc0a5c_0", { source: ".app-breadcrumb.el-breadcrumb[data-v-1afc0a5c] {\n display: inline-block;\n font-size: 14px;\n line-height: 50px;\n margin-left: 8px;\n}\n.app-breadcrumb.el-breadcrumb .no-redirect[data-v-1afc0a5c] {\n color: #97a8be;\n cursor: text;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\Breadcrumb\\index.vue","index.vue"],"names":[],"mappings":"AA8DA;EACA,qBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;AC7DA;AD+DA;EACA,cAAA;EACA,YAAA;AC7DA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <el-breadcrumb class=\"app-breadcrumb\" separator=\"/\">\n <transition-group name=\"breadcrumb\">\n <el-breadcrumb-item v-for=\"(item,index) in levelList\" :key=\"item.path\">\n <span v-if=\"item.redirect === 'noRedirect' || index == levelList.length - 1\" class=\"no-redirect\">{{ item.meta.title }}</span>\n <a v-else @click.prevent=\"handleLink(item)\">{{ item.meta.title }}</a>\n </el-breadcrumb-item>\n </transition-group>\n </el-breadcrumb>\n</template>\n\n<script>\nexport default {\n data() {\n return {\n levelList: null\n }\n },\n watch: {\n $route(route) {\n // if you go to the redirect page, do not update the breadcrumbs\n if (route.path.startsWith('/redirect/')) {\n return\n }\n this.getBreadcrumb()\n }\n },\n created() {\n this.getBreadcrumb()\n },\n methods: {\n getBreadcrumb() {\n // only show routes with meta.title\n let matched = this.$route.matched.filter(item => item.meta && item.meta.title)\n const first = matched[0]\n\n if (!this.isDashboard(first)) {\n matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)\n }\n\n this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)\n },\n isDashboard(route) {\n const name = route && route.name\n if (!name) {\n return false\n }\n return name.trim() === 'Index'\n },\n handleLink(item) {\n const { redirect, path } = item\n if (redirect) {\n this.$router.push(redirect)\n return\n }\n this.$router.push(path)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.app-breadcrumb.el-breadcrumb {\n display: inline-block;\n font-size: 14px;\n line-height: 50px;\n margin-left: 8px;\n\n .no-redirect {\n color: #97a8be;\n cursor: text;\n }\n}\n</style>\n",".app-breadcrumb.el-breadcrumb {\n display: inline-block;\n font-size: 14px;\n line-height: 50px;\n margin-left: 8px;\n}\n.app-breadcrumb.el-breadcrumb .no-redirect {\n color: #97a8be;\n cursor: text;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
95827
+ inject("data-v-3c331f27_0", { source: ".app-breadcrumb.el-breadcrumb[data-v-3c331f27] {\n display: inline-block;\n font-size: 14px;\n line-height: 50px;\n margin-left: 8px;\n}\n.app-breadcrumb.el-breadcrumb .no-redirect[data-v-3c331f27] {\n color: #97a8be;\n cursor: text;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\Breadcrumb\\index.vue","index.vue"],"names":[],"mappings":"AAsEA;EACA,qBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;ACrEA;ADsEA;EACA,cAAA;EACA,YAAA;ACpEA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div>\n <el-breadcrumb class=\"app-breadcrumb\" separator=\"/\">\n <transition-group name=\"breadcrumb\">\n <el-breadcrumb-item v-for=\"(item, index) in levelList\" :key=\"item.path\">\n <span v-if=\"item.redirect === 'noRedirect' || index == levelList.length - 1\" class=\"no-redirect\">{{ item.meta.title }}</span>\n <a v-else @click.prevent=\"handleLink(item)\">{{ item.meta.title }}</a>\n </el-breadcrumb-item>\n </transition-group>\n </el-breadcrumb>\n </div>\n</template>\n\n<script>\nexport default {\n data() {\n return {\n levelList: null\n }\n },\n watch: {\n $route(route) {\n // if you go to the redirect page, do not update the breadcrumbs\n if (route.path.startsWith('/redirect/')) {\n return\n }\n this.getBreadcrumb()\n }\n },\n created() {\n this.getBreadcrumb()\n },\n methods: {\n getIndexRouter() {\n const arr = this.$store.state.permission.sidebarRouters\n const rootItem = arr.find((item) => {\n return (item.path === '' || item.path === '/') && item.redirect\n })\n return { path: '/', meta: { title: rootItem?.meta?.title || '首页' } }\n },\n getBreadcrumb() {\n // only show routes with meta.title\n let matched = this.$route.matched.filter((item) => item.meta && item.meta.title)\n matched = matched.filter((item) => item.path !== '' && item.path !== '/')\n const first = matched[0]\n if (!this.isDashboard(first)) {\n matched = [this.getIndexRouter()].concat(matched)\n }\n this.levelList = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false)\n },\n isDashboard(route) {\n const name = route && route.name\n if (!name) {\n return false\n }\n return name.trim() === 'Index'\n },\n handleLink(item) {\n const { redirect, path } = item\n if (redirect) {\n this.$router.push(redirect)\n return\n }\n this.$router.push(path)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.app-breadcrumb.el-breadcrumb {\n display: inline-block;\n font-size: 14px;\n line-height: 50px;\n margin-left: 8px;\n .no-redirect {\n color: #97a8be;\n cursor: text;\n }\n}\n</style>\n",".app-breadcrumb.el-breadcrumb {\n display: inline-block;\n font-size: 14px;\n line-height: 50px;\n margin-left: 8px;\n}\n.app-breadcrumb.el-breadcrumb .no-redirect {\n color: #97a8be;\n cursor: text;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
95990
95828
 
95991
95829
  };
95992
95830
  /* scoped */
95993
- const __vue_scope_id__$u = "data-v-1afc0a5c";
95831
+ const __vue_scope_id__$v = "data-v-3c331f27";
95994
95832
  /* module identifier */
95995
- const __vue_module_identifier__$u = undefined;
95833
+ const __vue_module_identifier__$v = undefined;
95996
95834
  /* functional template */
95997
- const __vue_is_functional_template__$u = false;
95835
+ const __vue_is_functional_template__$v = false;
95998
95836
  /* style inject SSR */
95999
95837
 
96000
95838
  /* style inject shadow dom */
96001
95839
 
96002
95840
 
96003
95841
 
96004
- const __vue_component__$u = /*#__PURE__*/__vue_normalize__(
96005
- { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
96006
- __vue_inject_styles__$u,
95842
+ const __vue_component__$v = /*#__PURE__*/__vue_normalize__(
95843
+ { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
95844
+ __vue_inject_styles__$v,
96007
95845
  __vue_script__$t,
96008
- __vue_scope_id__$u,
96009
- __vue_is_functional_template__$u,
96010
- __vue_module_identifier__$u,
95846
+ __vue_scope_id__$v,
95847
+ __vue_is_functional_template__$v,
95848
+ __vue_module_identifier__$v,
96011
95849
  false,
96012
95850
  __vue_create_injector__,
96013
95851
  undefined,
@@ -96175,7 +96013,7 @@ var script$s = {
96175
96013
  const __vue_script__$s = script$s;
96176
96014
 
96177
96015
  /* template */
96178
- var __vue_render__$t = function () {
96016
+ var __vue_render__$u = function () {
96179
96017
  var _vm = this;
96180
96018
  var _h = _vm.$createElement;
96181
96019
  var _c = _vm._self._c || _h;
@@ -96228,34 +96066,34 @@ var __vue_render__$t = function () {
96228
96066
  2
96229
96067
  )
96230
96068
  };
96231
- var __vue_staticRenderFns__$t = [];
96232
- __vue_render__$t._withStripped = true;
96069
+ var __vue_staticRenderFns__$u = [];
96070
+ __vue_render__$u._withStripped = true;
96233
96071
 
96234
96072
  /* style */
96235
- const __vue_inject_styles__$t = function (inject) {
96073
+ const __vue_inject_styles__$u = function (inject) {
96236
96074
  if (!inject) return
96237
96075
  inject("data-v-58dba194_0", { source: ".topmenu-container.el-menu--horizontal > .el-menu-item {\n float: left;\n height: 50px !important;\n line-height: 50px !important;\n color: #999093 !important;\n padding: 0 5px !important;\n margin: 0 10px !important;\n}\n.topmenu-container.el-menu--horizontal > .el-menu-item.is-active,\n.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {\n border-bottom: 2px solid var(--theme) !important;\n color: #303133;\n}\n\n/* submenu item */\n.topmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {\n float: left;\n height: 50px !important;\n line-height: 50px !important;\n color: #999093 !important;\n padding: 0 5px !important;\n margin: 0 10px !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\TopNav\\index.vue","index.vue"],"names":[],"mappings":"AAgKA;EACA,WAAA;EACA,uBAAA;EACA,4BAAA;EACA,yBAAA;EACA,yBAAA;EACA,yBAAA;AC/JA;ADkKA;;EAEA,gDAAA;EACA,cAAA;AC/JA;;ADkKA,iBAAA;AACA;EACA,WAAA;EACA,uBAAA;EACA,4BAAA;EACA,yBAAA;EACA,yBAAA;EACA,yBAAA;AC/JA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <el-menu :default-active=\"activeMenu\" mode=\"horizontal\" @select=\"handleSelect\">\n <template v-for=\"(item, index) in topMenus\">\n <el-menu-item :style=\"{ '--theme': theme }\" :index=\"item.path\" :key=\"index\" v-if=\"index < visibleNumber\">\n <!-- <z-icon :icon-class=\"item.meta.icon\" />-->\n {{ item.meta.title }}</el-menu-item\n >\n </template>\n\n <!-- 顶部菜单超出数量折叠 -->\n <el-submenu :style=\"{ '--theme': theme }\" index=\"more\" v-if=\"topMenus.length > visibleNumber\">\n <template slot=\"title\">更多菜单</template>\n <template v-for=\"(item, index) in topMenus\">\n <el-menu-item :index=\"item.path\" :key=\"index\" v-if=\"index >= visibleNumber\">\n <!-- <z-icon :icon-class=\"item.meta.icon\" />-->\n {{ item.meta.title }}</el-menu-item\n >\n </template>\n </el-submenu>\n </el-menu>\n</template>\n\n<script>\nimport { constantRoutes } from '@/router'\n\n// 隐藏侧边栏路由\nconst hideList = ['/index', '/user/profile']\n\nexport default {\n data() {\n return {\n // 顶部栏初始数\n visibleNumber: 5,\n // 当前激活菜单的 index\n currentIndex: undefined\n }\n },\n computed: {\n theme() {\n return this.$store.state.settings.theme\n },\n // 顶部显示菜单\n topMenus() {\n let topMenus = []\n this.routers.map((menu) => {\n if (menu.hidden !== true) {\n // 兼容顶部栏一级菜单内部跳转\n if (menu.path === '/') {\n topMenus.push(menu.children[0])\n } else {\n topMenus.push(menu)\n }\n }\n })\n return topMenus\n },\n // 所有的路由信息\n routers() {\n return this.$store.state.permission.topbarRouters\n },\n // 设置子路由\n childrenMenus() {\n var childrenMenus = []\n this.routers.map((router) => {\n for (var item in router.children) {\n if (router.children[item].parentPath === undefined) {\n if (router.path === '/') {\n router.children[item].path = '/' + router.children[item].path\n } else {\n if (!this.ishttp(router.children[item].path)) {\n router.children[item].path = router.path + '/' + router.children[item].path\n }\n }\n router.children[item].parentPath = router.path\n }\n childrenMenus.push(router.children[item])\n }\n })\n return constantRoutes.concat(childrenMenus)\n },\n // 默认激活的菜单\n activeMenu() {\n const path = this.$route.path\n let activePath = path\n if (path !== undefined && path.lastIndexOf('/') > 0 && hideList.indexOf(path) === -1) {\n const tmpPath = path.substring(1, path.length)\n activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/'))\n if (!this.$route.meta.link) {\n this.$store.dispatch('app/toggleSideBarHide', false)\n }\n } else if (!this.$route.children) {\n activePath = path\n this.$store.dispatch('app/toggleSideBarHide', true)\n }\n this.activeRoutes(activePath)\n return activePath\n }\n },\n beforeMount() {\n window.addEventListener('resize', this.setVisibleNumber)\n },\n beforeDestroy() {\n window.removeEventListener('resize', this.setVisibleNumber)\n },\n mounted() {\n this.setVisibleNumber()\n },\n methods: {\n // 根据宽度计算设置显示栏数\n setVisibleNumber() {\n const width = document.body.getBoundingClientRect().width / 3\n this.visibleNumber = parseInt(width / 85)\n },\n // 菜单选择事件\n handleSelect(key, keyPath) {\n this.currentIndex = key\n const route = this.routers.find((item) => item.path === key)\n if (this.ishttp(key)) {\n // http(s):// 路径新窗口打开\n window.open(key, '_blank')\n } else if (!route || !route.children) {\n // 没有子路由路径内部打开\n const routeMenu = this.childrenMenus.find((item) => item.path === key)\n if (routeMenu && routeMenu.query) {\n let query = JSON.parse(routeMenu.query)\n this.$router.push({ path: key, query: query })\n } else {\n this.$router.push({ path: key })\n }\n this.$store.dispatch('app/toggleSideBarHide', true)\n } else {\n // 显示左侧联动菜单\n this.activeRoutes(key)\n this.$store.dispatch('app/toggleSideBarHide', false)\n }\n },\n // 当前激活的路由\n activeRoutes(key) {\n var routes = []\n if (this.childrenMenus && this.childrenMenus.length > 0) {\n this.childrenMenus.map((item) => {\n if (key == item.parentPath || (key == 'index' && '' == item.path)) {\n routes.push(item)\n }\n })\n }\n if (routes.length > 0) {\n this.$store.commit('SET_SIDEBAR_ROUTERS', routes)\n } else {\n this.$store.dispatch('app/toggleSideBarHide', true)\n }\n },\n ishttp(url) {\n return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1\n }\n }\n}\n</script>\n\n<style lang=\"scss\">\n.topmenu-container.el-menu--horizontal > .el-menu-item {\n float: left;\n height: 50px !important;\n line-height: 50px !important;\n color: #999093 !important;\n padding: 0 5px !important;\n margin: 0 10px !important;\n}\n\n.topmenu-container.el-menu--horizontal > .el-menu-item.is-active,\n.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {\n border-bottom: 2px solid #{'var(--theme)'} !important;\n color: #303133;\n}\n\n/* submenu item */\n.topmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {\n float: left;\n height: 50px !important;\n line-height: 50px !important;\n color: #999093 !important;\n padding: 0 5px !important;\n margin: 0 10px !important;\n}\n</style>\n",".topmenu-container.el-menu--horizontal > .el-menu-item {\n float: left;\n height: 50px !important;\n line-height: 50px !important;\n color: #999093 !important;\n padding: 0 5px !important;\n margin: 0 10px !important;\n}\n\n.topmenu-container.el-menu--horizontal > .el-menu-item.is-active,\n.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {\n border-bottom: 2px solid var(--theme) !important;\n color: #303133;\n}\n\n/* submenu item */\n.topmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {\n float: left;\n height: 50px !important;\n line-height: 50px !important;\n color: #999093 !important;\n padding: 0 5px !important;\n margin: 0 10px !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
96238
96076
 
96239
96077
  };
96240
96078
  /* scoped */
96241
- const __vue_scope_id__$t = undefined;
96079
+ const __vue_scope_id__$u = undefined;
96242
96080
  /* module identifier */
96243
- const __vue_module_identifier__$t = undefined;
96081
+ const __vue_module_identifier__$u = undefined;
96244
96082
  /* functional template */
96245
- const __vue_is_functional_template__$t = false;
96083
+ const __vue_is_functional_template__$u = false;
96246
96084
  /* style inject SSR */
96247
96085
 
96248
96086
  /* style inject shadow dom */
96249
96087
 
96250
96088
 
96251
96089
 
96252
- const __vue_component__$t = /*#__PURE__*/__vue_normalize__(
96253
- { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
96254
- __vue_inject_styles__$t,
96090
+ const __vue_component__$u = /*#__PURE__*/__vue_normalize__(
96091
+ { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
96092
+ __vue_inject_styles__$u,
96255
96093
  __vue_script__$s,
96256
- __vue_scope_id__$t,
96257
- __vue_is_functional_template__$t,
96258
- __vue_module_identifier__$t,
96094
+ __vue_scope_id__$u,
96095
+ __vue_is_functional_template__$u,
96096
+ __vue_module_identifier__$u,
96259
96097
  false,
96260
96098
  __vue_create_injector__,
96261
96099
  undefined,
@@ -96297,7 +96135,7 @@ var script$r = {
96297
96135
  const __vue_script__$r = script$r;
96298
96136
 
96299
96137
  /* template */
96300
- var __vue_render__$s = function () {
96138
+ var __vue_render__$t = function () {
96301
96139
  var _vm = this;
96302
96140
  var _h = _vm.$createElement;
96303
96141
  var _c = _vm._self._c || _h;
@@ -96328,34 +96166,34 @@ var __vue_render__$s = function () {
96328
96166
  ]
96329
96167
  )
96330
96168
  };
96331
- var __vue_staticRenderFns__$s = [];
96332
- __vue_render__$s._withStripped = true;
96169
+ var __vue_staticRenderFns__$t = [];
96170
+ __vue_render__$t._withStripped = true;
96333
96171
 
96334
96172
  /* style */
96335
- const __vue_inject_styles__$s = function (inject) {
96173
+ const __vue_inject_styles__$t = function (inject) {
96336
96174
  if (!inject) return
96337
96175
  inject("data-v-3b0f2894_0", { source: "\n.hamburger[data-v-3b0f2894] {\r\n display: inline-block;\r\n vertical-align: middle;\r\n width: 20px;\r\n height: 20px;\n}\n.hamburger.is-active[data-v-3b0f2894] {\r\n transform: rotate(180deg);\n}\r\n", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\Hamburger\\index.vue"],"names":[],"mappings":";AAiCA;EACA,qBAAA;EACA,sBAAA;EACA,WAAA;EACA,YAAA;AACA;AAEA;EACA,yBAAA;AACA","file":"index.vue","sourcesContent":["<template>\r\n <div style=\"padding: 0 15px;\" @click=\"toggleClick\">\r\n <svg\r\n :class=\"{'is-active':isActive}\"\r\n class=\"hamburger\"\r\n viewBox=\"0 0 1024 1024\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"64\"\r\n height=\"64\"\r\n >\r\n <path d=\"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z\" />\r\n </svg>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'Hamburger',\r\n props: {\r\n isActive: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n methods: {\r\n toggleClick() {\r\n this.$emit('toggleClick')\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.hamburger {\r\n display: inline-block;\r\n vertical-align: middle;\r\n width: 20px;\r\n height: 20px;\r\n}\r\n\r\n.hamburger.is-active {\r\n transform: rotate(180deg);\r\n}\r\n</style>\r\n"]}, media: undefined });
96338
96176
 
96339
96177
  };
96340
96178
  /* scoped */
96341
- const __vue_scope_id__$s = "data-v-3b0f2894";
96179
+ const __vue_scope_id__$t = "data-v-3b0f2894";
96342
96180
  /* module identifier */
96343
- const __vue_module_identifier__$s = undefined;
96181
+ const __vue_module_identifier__$t = undefined;
96344
96182
  /* functional template */
96345
- const __vue_is_functional_template__$s = false;
96183
+ const __vue_is_functional_template__$t = false;
96346
96184
  /* style inject SSR */
96347
96185
 
96348
96186
  /* style inject shadow dom */
96349
96187
 
96350
96188
 
96351
96189
 
96352
- const __vue_component__$s = /*#__PURE__*/__vue_normalize__(
96353
- { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
96354
- __vue_inject_styles__$s,
96190
+ const __vue_component__$t = /*#__PURE__*/__vue_normalize__(
96191
+ { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
96192
+ __vue_inject_styles__$t,
96355
96193
  __vue_script__$r,
96356
- __vue_scope_id__$s,
96357
- __vue_is_functional_template__$s,
96358
- __vue_module_identifier__$s,
96194
+ __vue_scope_id__$t,
96195
+ __vue_is_functional_template__$t,
96196
+ __vue_module_identifier__$t,
96359
96197
  false,
96360
96198
  __vue_create_injector__,
96361
96199
  undefined,
@@ -96365,23 +96203,23 @@ __vue_render__$s._withStripped = true;
96365
96203
  /* script */
96366
96204
 
96367
96205
  /* template */
96368
- var __vue_render__$r = function () {
96206
+ var __vue_render__$s = function () {
96369
96207
  var _vm = this;
96370
96208
  var _h = _vm.$createElement;
96371
96209
  var _c = _vm._self._c || _h;
96372
96210
  return _c("div", [_vm._v("全屏")])
96373
96211
  };
96374
- var __vue_staticRenderFns__$r = [];
96375
- __vue_render__$r._withStripped = true;
96212
+ var __vue_staticRenderFns__$s = [];
96213
+ __vue_render__$s._withStripped = true;
96376
96214
 
96377
96215
  /* style */
96378
- const __vue_inject_styles__$r = undefined;
96216
+ const __vue_inject_styles__$s = undefined;
96379
96217
  /* scoped */
96380
- const __vue_scope_id__$r = undefined;
96218
+ const __vue_scope_id__$s = undefined;
96381
96219
  /* module identifier */
96382
- const __vue_module_identifier__$r = undefined;
96220
+ const __vue_module_identifier__$s = undefined;
96383
96221
  /* functional template */
96384
- const __vue_is_functional_template__$r = false;
96222
+ const __vue_is_functional_template__$s = false;
96385
96223
  /* style inject */
96386
96224
 
96387
96225
  /* style inject SSR */
@@ -96390,13 +96228,13 @@ __vue_render__$r._withStripped = true;
96390
96228
 
96391
96229
 
96392
96230
 
96393
- const __vue_component__$r = /*#__PURE__*/__vue_normalize__(
96394
- { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
96395
- __vue_inject_styles__$r,
96231
+ const __vue_component__$s = /*#__PURE__*/__vue_normalize__(
96232
+ { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
96233
+ __vue_inject_styles__$s,
96396
96234
  {},
96397
- __vue_scope_id__$r,
96398
- __vue_is_functional_template__$r,
96399
- __vue_module_identifier__$r,
96235
+ __vue_scope_id__$s,
96236
+ __vue_is_functional_template__$s,
96237
+ __vue_module_identifier__$s,
96400
96238
  false,
96401
96239
  undefined,
96402
96240
  undefined,
@@ -96462,7 +96300,7 @@ var script$q = {
96462
96300
  const __vue_script__$q = script$q;
96463
96301
 
96464
96302
  /* template */
96465
- var __vue_render__$q = function () {
96303
+ var __vue_render__$r = function () {
96466
96304
  var _vm = this;
96467
96305
  var _h = _vm.$createElement;
96468
96306
  var _c = _vm._self._c || _h;
@@ -96491,17 +96329,17 @@ var __vue_render__$q = function () {
96491
96329
  1
96492
96330
  )
96493
96331
  };
96494
- var __vue_staticRenderFns__$q = [];
96495
- __vue_render__$q._withStripped = true;
96332
+ var __vue_staticRenderFns__$r = [];
96333
+ __vue_render__$r._withStripped = true;
96496
96334
 
96497
96335
  /* style */
96498
- const __vue_inject_styles__$q = undefined;
96336
+ const __vue_inject_styles__$r = undefined;
96499
96337
  /* scoped */
96500
- const __vue_scope_id__$q = undefined;
96338
+ const __vue_scope_id__$r = undefined;
96501
96339
  /* module identifier */
96502
- const __vue_module_identifier__$q = undefined;
96340
+ const __vue_module_identifier__$r = undefined;
96503
96341
  /* functional template */
96504
- const __vue_is_functional_template__$q = false;
96342
+ const __vue_is_functional_template__$r = false;
96505
96343
  /* style inject */
96506
96344
 
96507
96345
  /* style inject SSR */
@@ -96510,13 +96348,13 @@ __vue_render__$q._withStripped = true;
96510
96348
 
96511
96349
 
96512
96350
 
96513
- const __vue_component__$q = /*#__PURE__*/__vue_normalize__(
96514
- { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
96515
- __vue_inject_styles__$q,
96351
+ const __vue_component__$r = /*#__PURE__*/__vue_normalize__(
96352
+ { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
96353
+ __vue_inject_styles__$r,
96516
96354
  __vue_script__$q,
96517
- __vue_scope_id__$q,
96518
- __vue_is_functional_template__$q,
96519
- __vue_module_identifier__$q,
96355
+ __vue_scope_id__$r,
96356
+ __vue_is_functional_template__$r,
96357
+ __vue_module_identifier__$r,
96520
96358
  false,
96521
96359
  undefined,
96522
96360
  undefined,
@@ -96695,7 +96533,7 @@ var script$p = {
96695
96533
  const __vue_script__$p = script$p;
96696
96534
 
96697
96535
  /* template */
96698
- var __vue_render__$p = function () {
96536
+ var __vue_render__$q = function () {
96699
96537
  var _vm = this;
96700
96538
  var _h = _vm.$createElement;
96701
96539
  var _c = _vm._self._c || _h;
@@ -96736,34 +96574,34 @@ var __vue_render__$p = function () {
96736
96574
  1
96737
96575
  )
96738
96576
  };
96739
- var __vue_staticRenderFns__$p = [];
96740
- __vue_render__$p._withStripped = true;
96577
+ var __vue_staticRenderFns__$q = [];
96578
+ __vue_render__$q._withStripped = true;
96741
96579
 
96742
96580
  /* style */
96743
- const __vue_inject_styles__$p = function (inject) {
96581
+ const __vue_inject_styles__$q = function (inject) {
96744
96582
  if (!inject) return
96745
96583
  inject("data-v-37c87e35_0", { source: ".header-search[data-v-37c87e35] {\n font-size: 0 !important;\n}\n.header-search .search-icon[data-v-37c87e35] {\n cursor: pointer;\n font-size: 18px;\n vertical-align: middle;\n}\n.header-search .header-search-select[data-v-37c87e35] {\n font-size: 18px;\n transition: width 0.2s;\n width: 0;\n overflow: hidden;\n background: transparent;\n border-radius: 0;\n display: inline-block;\n vertical-align: middle;\n}\n.header-search .header-search-select[data-v-37c87e35] .el-input__inner {\n border-radius: 0;\n border: 0;\n padding-left: 0;\n padding-right: 0;\n box-shadow: none !important;\n border-bottom: 1px solid #d9d9d9;\n vertical-align: middle;\n}\n.header-search.show .header-search-select[data-v-37c87e35] {\n width: 210px;\n margin-left: 10px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\HeaderSearch\\index.vue","index.vue"],"names":[],"mappings":"AA4JA;EACA,uBAAA;AC3JA;AD4JA;EACA,eAAA;EACA,eAAA;EACA,sBAAA;AC1JA;AD4JA;EACA,eAAA;EACA,sBAAA;EACA,QAAA;EACA,gBAAA;EACA,uBAAA;EACA,gBAAA;EACA,qBAAA;EACA,sBAAA;AC1JA;AD2JA;EACA,gBAAA;EACA,SAAA;EACA,eAAA;EACA,gBAAA;EACA,2BAAA;EACA,gCAAA;EACA,sBAAA;ACzJA;AD6JA;EACA,YAAA;EACA,iBAAA;AC3JA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div :class=\"{ show: show }\" class=\"header-search\">\r\n <!-- <z-icon class-name=\"search-icon\" icon-class=\"search\" @click.stop=\"click\" />-->\r\n <el-select\r\n ref=\"headerSearchSelect\"\r\n v-model=\"search\"\r\n :remote-method=\"querySearch\"\r\n filterable\r\n default-first-option\r\n remote\r\n placeholder=\"Search\"\r\n class=\"header-search-select\"\r\n @change=\"change\"\r\n >\r\n <el-option v-for=\"option in options\" :key=\"option.item.path\" :value=\"option.item\" :label=\"option.item.title.join(' > ')\" />\r\n </el-select>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n// fuse is a lightweight fuzzy-search module\r\n// make search results more in line with expectations\r\nimport Fuse from 'fuse.js/dist/fuse.min.js'\r\nimport path from '../../../../utils/utils'\r\n\r\nexport default {\r\n name: 'HeaderSearch',\r\n data() {\r\n return {\r\n search: '',\r\n options: [],\r\n searchPool: [],\r\n show: false,\r\n fuse: undefined\r\n }\r\n },\r\n computed: {\r\n routes() {\r\n return this.$store.state.permission.routes\r\n }\r\n },\r\n watch: {\r\n routes() {\r\n // this.searchPool = this.generateRoutes(this.routes)\r\n },\r\n searchPool(list) {\r\n // this.initFuse(list)\r\n },\r\n show(value) {\r\n if (value) {\r\n document.body.addEventListener('click', this.close)\r\n } else {\r\n document.body.removeEventListener('click', this.close)\r\n }\r\n }\r\n },\r\n mounted() {\r\n // this.searchPool = this.generateRoutes(this.routes)\r\n },\r\n methods: {\r\n click() {\r\n this.show = !this.show\r\n if (this.show) {\r\n this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()\r\n }\r\n },\r\n close() {\r\n this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()\r\n this.options = []\r\n this.show = false\r\n },\r\n change(val) {\r\n const path = val.path\r\n if (this.ishttp(val.path)) {\r\n // http(s):// 路径新窗口打开\r\n const pindex = path.indexOf('http')\r\n window.open(path.substr(pindex, path.length), '_blank')\r\n } else {\r\n this.$router.push(val.path)\r\n }\r\n this.search = ''\r\n this.options = []\r\n this.$nextTick(() => {\r\n this.show = false\r\n })\r\n },\r\n initFuse(list) {\r\n this.fuse = new Fuse(list, {\r\n shouldSort: true,\r\n threshold: 0.4,\r\n location: 0,\r\n distance: 100,\r\n minMatchCharLength: 1,\r\n keys: [\r\n {\r\n name: 'title',\r\n weight: 0.7\r\n },\r\n {\r\n name: 'path',\r\n weight: 0.3\r\n }\r\n ]\r\n })\r\n },\r\n // Filter out the routes that can be displayed in the sidebar\r\n // And generate the internationalized title\r\n generateRoutes(routes, basePath = '/', prefixTitle = []) {\r\n let res = []\r\n\r\n for (const router of routes) {\r\n // skip hidden router\r\n if (router.hidden) {\r\n continue\r\n }\r\n\r\n const data = {\r\n path: !this.ishttp(router.path) ? path.resolve(basePath, router.path) : router.path,\r\n title: [...prefixTitle]\r\n }\r\n\r\n if (router.meta && router.meta.title) {\r\n data.title = [...data.title, router.meta.title]\r\n\r\n if (router.redirect !== 'noRedirect') {\r\n // only push the routes with title\r\n // special case: need to exclude parent router without redirect\r\n res.push(data)\r\n }\r\n }\r\n\r\n // recursive child routes\r\n if (router.children) {\r\n const tempRoutes = this.generateRoutes(router.children, data.path, data.title)\r\n if (tempRoutes.length >= 1) {\r\n res = [...res, ...tempRoutes]\r\n }\r\n }\r\n }\r\n return res\r\n },\r\n querySearch(query) {\r\n if (query !== '') {\r\n this.options = this.fuse.search(query)\r\n } else {\r\n this.options = []\r\n }\r\n },\r\n ishttp(url) {\r\n return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.header-search {\r\n font-size: 0 !important;\r\n .search-icon {\r\n cursor: pointer;\r\n font-size: 18px;\r\n vertical-align: middle;\r\n }\r\n .header-search-select {\r\n font-size: 18px;\r\n transition: width 0.2s;\r\n width: 0;\r\n overflow: hidden;\r\n background: transparent;\r\n border-radius: 0;\r\n display: inline-block;\r\n vertical-align: middle;\r\n ::v-deep .el-input__inner {\r\n border-radius: 0;\r\n border: 0;\r\n padding-left: 0;\r\n padding-right: 0;\r\n box-shadow: none !important;\r\n border-bottom: 1px solid #d9d9d9;\r\n vertical-align: middle;\r\n }\r\n }\r\n &.show {\r\n .header-search-select {\r\n width: 210px;\r\n margin-left: 10px;\r\n }\r\n }\r\n}\r\n</style>\r\n",".header-search {\n font-size: 0 !important;\n}\n.header-search .search-icon {\n cursor: pointer;\n font-size: 18px;\n vertical-align: middle;\n}\n.header-search .header-search-select {\n font-size: 18px;\n transition: width 0.2s;\n width: 0;\n overflow: hidden;\n background: transparent;\n border-radius: 0;\n display: inline-block;\n vertical-align: middle;\n}\n.header-search .header-search-select ::v-deep .el-input__inner {\n border-radius: 0;\n border: 0;\n padding-left: 0;\n padding-right: 0;\n box-shadow: none !important;\n border-bottom: 1px solid #d9d9d9;\n vertical-align: middle;\n}\n.header-search.show .header-search-select {\n width: 210px;\n margin-left: 10px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
96746
96584
 
96747
96585
  };
96748
96586
  /* scoped */
96749
- const __vue_scope_id__$p = "data-v-37c87e35";
96587
+ const __vue_scope_id__$q = "data-v-37c87e35";
96750
96588
  /* module identifier */
96751
- const __vue_module_identifier__$p = undefined;
96589
+ const __vue_module_identifier__$q = undefined;
96752
96590
  /* functional template */
96753
- const __vue_is_functional_template__$p = false;
96591
+ const __vue_is_functional_template__$q = false;
96754
96592
  /* style inject SSR */
96755
96593
 
96756
96594
  /* style inject shadow dom */
96757
96595
 
96758
96596
 
96759
96597
 
96760
- const __vue_component__$p = /*#__PURE__*/__vue_normalize__(
96761
- { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
96762
- __vue_inject_styles__$p,
96598
+ const __vue_component__$q = /*#__PURE__*/__vue_normalize__(
96599
+ { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
96600
+ __vue_inject_styles__$q,
96763
96601
  __vue_script__$p,
96764
- __vue_scope_id__$p,
96765
- __vue_is_functional_template__$p,
96766
- __vue_module_identifier__$p,
96602
+ __vue_scope_id__$q,
96603
+ __vue_is_functional_template__$q,
96604
+ __vue_module_identifier__$q,
96767
96605
  false,
96768
96606
  __vue_create_injector__,
96769
96607
  undefined,
@@ -96813,12 +96651,12 @@ __vue_render__$p._withStripped = true;
96813
96651
 
96814
96652
  var script$o = {
96815
96653
  components: {
96816
- Breadcrumb: __vue_component__$u,
96817
- TopNav: __vue_component__$t,
96818
- Hamburger: __vue_component__$s,
96819
- Screenfull: __vue_component__$r,
96820
- SizeSelect: __vue_component__$q,
96821
- Search: __vue_component__$p
96654
+ Breadcrumb: __vue_component__$v,
96655
+ TopNav: __vue_component__$u,
96656
+ Hamburger: __vue_component__$t,
96657
+ Screenfull: __vue_component__$s,
96658
+ SizeSelect: __vue_component__$r,
96659
+ Search: __vue_component__$q
96822
96660
  },
96823
96661
  computed: {
96824
96662
  ...mapState('app', ['sidebar', 'device']),
@@ -96864,7 +96702,7 @@ var script$o = {
96864
96702
  const __vue_script__$o = script$o;
96865
96703
 
96866
96704
  /* template */
96867
- var __vue_render__$o = function () {
96705
+ var __vue_render__$p = function () {
96868
96706
  var _vm = this;
96869
96707
  var _h = _vm.$createElement;
96870
96708
  var _c = _vm._self._c || _h;
@@ -96934,34 +96772,34 @@ var __vue_render__$o = function () {
96934
96772
  1
96935
96773
  )
96936
96774
  };
96937
- var __vue_staticRenderFns__$o = [];
96938
- __vue_render__$o._withStripped = true;
96775
+ var __vue_staticRenderFns__$p = [];
96776
+ __vue_render__$p._withStripped = true;
96939
96777
 
96940
96778
  /* style */
96941
- const __vue_inject_styles__$o = function (inject) {
96779
+ const __vue_inject_styles__$p = function (inject) {
96942
96780
  if (!inject) return
96943
96781
  inject("data-v-8fbc56cc_0", { source: ".navbar[data-v-8fbc56cc] {\n height: 50px;\n overflow: hidden;\n position: relative;\n background: #fff;\n box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);\n}\n.navbar .hamburger-container[data-v-8fbc56cc] {\n line-height: 46px;\n height: 100%;\n float: left;\n cursor: pointer;\n transition: background 0.3s;\n -webkit-tap-highlight-color: transparent;\n}\n.navbar .hamburger-container[data-v-8fbc56cc]:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.navbar .breadcrumb-container[data-v-8fbc56cc] {\n float: left;\n}\n.navbar .topmenu-container[data-v-8fbc56cc] {\n position: absolute;\n left: 50px;\n}\n.navbar .errLog-container[data-v-8fbc56cc] {\n display: inline-block;\n vertical-align: top;\n}\n.navbar .right-menu[data-v-8fbc56cc] {\n float: right;\n height: 100%;\n line-height: 50px;\n}\n.navbar .right-menu[data-v-8fbc56cc]:focus {\n outline: none;\n}\n.navbar .right-menu .right-menu-item[data-v-8fbc56cc] {\n display: inline-block;\n padding: 0 8px;\n height: 100%;\n font-size: 18px;\n color: #5a5e66;\n vertical-align: text-bottom;\n}\n.navbar .right-menu .right-menu-item.hover-effect[data-v-8fbc56cc] {\n cursor: pointer;\n transition: background 0.3s;\n}\n.navbar .right-menu .right-menu-item.hover-effect[data-v-8fbc56cc]:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.navbar .right-menu .avatar-container[data-v-8fbc56cc] {\n margin-right: 30px;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper[data-v-8fbc56cc] {\n margin-top: 5px;\n position: relative;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper .user-avatar[data-v-8fbc56cc] {\n cursor: pointer;\n width: 40px;\n height: 40px;\n border-radius: 10px;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper .el-icon-caret-bottom[data-v-8fbc56cc] {\n cursor: pointer;\n position: absolute;\n right: -20px;\n top: 25px;\n font-size: 12px;\n}\n\n/*# sourceMappingURL=Navbar.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\Navbar.vue","Navbar.vue"],"names":[],"mappings":"AAmGA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,gBAAA;EACA,2CAAA;AClGA;ADmGA;EACA,iBAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;EACA,2BAAA;EACA,wCAAA;ACjGA;ADkGA;EACA,gCAAA;AChGA;ADmGA;EACA,WAAA;ACjGA;ADmGA;EACA,kBAAA;EACA,UAAA;ACjGA;ADmGA;EACA,qBAAA;EACA,mBAAA;ACjGA;ADmGA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;ACjGA;ADkGA;EACA,aAAA;AChGA;ADkGA;EACA,qBAAA;EACA,cAAA;EACA,YAAA;EACA,eAAA;EACA,cAAA;EACA,2BAAA;AChGA;ADiGA;EACA,eAAA;EACA,2BAAA;AC/FA;ADgGA;EACA,gCAAA;AC9FA;ADkGA;EACA,kBAAA;AChGA;ADiGA;EACA,eAAA;EACA,kBAAA;AC/FA;ADgGA;EACA,eAAA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;AC9FA;ADgGA;EACA,eAAA;EACA,kBAAA;EACA,YAAA;EACA,SAAA;EACA,eAAA;AC9FA;;AAEA,qCAAqC","file":"Navbar.vue","sourcesContent":["<template>\r\n <div class=\"navbar\">\r\n <hamburger id=\"hamburger-container\" :is-active=\"sidebar.opened\" class=\"hamburger-container\" @toggleClick=\"toggleSideBar\" />\r\n\r\n <breadcrumb id=\"breadcrumb-container\" class=\"breadcrumb-container\" v-if=\"!topNav\" />\r\n <top-nav id=\"topmenu-container\" class=\"topmenu-container\" v-if=\"topNav\" />\r\n\r\n <div class=\"right-menu\">\r\n <template v-if=\"device !== 'mobile'\">\r\n <search id=\"header-search\" class=\"right-menu-item\" />\r\n\r\n <screenfull id=\"screenfull\" class=\"right-menu-item hover-effect\" />\r\n\r\n <el-tooltip content=\"布局大小\" effect=\"dark\" placement=\"bottom\">\r\n <size-select id=\"size-select\" class=\"right-menu-item hover-effect\" />\r\n </el-tooltip>\r\n </template>\r\n\r\n <!-- <el-dropdown class=\"avatar-container right-menu-item hover-effect\" trigger=\"click\">-->\r\n <!-- <div class=\"avatar-wrapper\">-->\r\n <!-- <img :src=\"avatar\" class=\"user-avatar\" />-->\r\n <!-- <i class=\"el-icon-caret-bottom\" />-->\r\n <!-- </div>-->\r\n <!-- <el-dropdown-menu slot=\"dropdown\">-->\r\n <!-- <router-link to=\"/user/profile\">-->\r\n <!-- <el-dropdown-item>个人中心</el-dropdown-item>-->\r\n <!-- </router-link>-->\r\n <!-- <el-dropdown-item @click.native=\"setting = true\">-->\r\n <!-- <span>布局设置</span>-->\r\n <!-- </el-dropdown-item>-->\r\n <!-- <el-dropdown-item divided @click.native=\"logout\">-->\r\n <!-- <span>退出登录</span>-->\r\n <!-- </el-dropdown-item>-->\r\n <!-- </el-dropdown-menu>-->\r\n <!-- </el-dropdown>-->\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapState } from 'vuex'\r\nimport Breadcrumb from './Breadcrumb/index.vue'\r\nimport TopNav from './TopNav/index.vue'\r\nimport Hamburger from './Hamburger/index.vue'\r\nimport Screenfull from './Screenfull/index.vue'\r\nimport SizeSelect from './SizeSelect/index.vue'\r\nimport Search from './HeaderSearch/index.vue'\r\n\r\nexport default {\r\n components: {\r\n Breadcrumb,\r\n TopNav,\r\n Hamburger,\r\n Screenfull,\r\n SizeSelect,\r\n Search\r\n },\r\n computed: {\r\n ...mapState('app', ['sidebar', 'device']),\r\n ...mapState('user', ['avatar']),\r\n setting: {\r\n get() {\r\n return this.$store.state.settings.showSettings\r\n },\r\n set(val) {\r\n this.$store.dispatch('settings/changeSetting', {\r\n key: 'showSettings',\r\n value: val\r\n })\r\n }\r\n },\r\n topNav: {\r\n get() {\r\n return this.$store.state.settings.topNav\r\n }\r\n }\r\n },\r\n methods: {\r\n toggleSideBar() {\r\n this.$store.dispatch('app/toggleSideBar')\r\n },\r\n async logout() {\r\n this.$confirm('确定注销并退出系统吗?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n this.$store.dispatch('LogOut').then(() => {\r\n location.href = '/index'\r\n })\r\n })\r\n .catch(() => {})\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.navbar {\r\n height: 50px;\r\n overflow: hidden;\r\n position: relative;\r\n background: #fff;\r\n box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);\r\n .hamburger-container {\r\n line-height: 46px;\r\n height: 100%;\r\n float: left;\r\n cursor: pointer;\r\n transition: background 0.3s;\r\n -webkit-tap-highlight-color: transparent;\r\n &:hover {\r\n background: rgba(0, 0, 0, 0.025);\r\n }\r\n }\r\n .breadcrumb-container {\r\n float: left;\r\n }\r\n .topmenu-container {\r\n position: absolute;\r\n left: 50px;\r\n }\r\n .errLog-container {\r\n display: inline-block;\r\n vertical-align: top;\r\n }\r\n .right-menu {\r\n float: right;\r\n height: 100%;\r\n line-height: 50px;\r\n &:focus {\r\n outline: none;\r\n }\r\n .right-menu-item {\r\n display: inline-block;\r\n padding: 0 8px;\r\n height: 100%;\r\n font-size: 18px;\r\n color: #5a5e66;\r\n vertical-align: text-bottom;\r\n &.hover-effect {\r\n cursor: pointer;\r\n transition: background 0.3s;\r\n &:hover {\r\n background: rgba(0, 0, 0, 0.025);\r\n }\r\n }\r\n }\r\n .avatar-container {\r\n margin-right: 30px;\r\n .avatar-wrapper {\r\n margin-top: 5px;\r\n position: relative;\r\n .user-avatar {\r\n cursor: pointer;\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 10px;\r\n }\r\n .el-icon-caret-bottom {\r\n cursor: pointer;\r\n position: absolute;\r\n right: -20px;\r\n top: 25px;\r\n font-size: 12px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n",".navbar {\n height: 50px;\n overflow: hidden;\n position: relative;\n background: #fff;\n box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);\n}\n.navbar .hamburger-container {\n line-height: 46px;\n height: 100%;\n float: left;\n cursor: pointer;\n transition: background 0.3s;\n -webkit-tap-highlight-color: transparent;\n}\n.navbar .hamburger-container:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.navbar .breadcrumb-container {\n float: left;\n}\n.navbar .topmenu-container {\n position: absolute;\n left: 50px;\n}\n.navbar .errLog-container {\n display: inline-block;\n vertical-align: top;\n}\n.navbar .right-menu {\n float: right;\n height: 100%;\n line-height: 50px;\n}\n.navbar .right-menu:focus {\n outline: none;\n}\n.navbar .right-menu .right-menu-item {\n display: inline-block;\n padding: 0 8px;\n height: 100%;\n font-size: 18px;\n color: #5a5e66;\n vertical-align: text-bottom;\n}\n.navbar .right-menu .right-menu-item.hover-effect {\n cursor: pointer;\n transition: background 0.3s;\n}\n.navbar .right-menu .right-menu-item.hover-effect:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.navbar .right-menu .avatar-container {\n margin-right: 30px;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper {\n margin-top: 5px;\n position: relative;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper .user-avatar {\n cursor: pointer;\n width: 40px;\n height: 40px;\n border-radius: 10px;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper .el-icon-caret-bottom {\n cursor: pointer;\n position: absolute;\n right: -20px;\n top: 25px;\n font-size: 12px;\n}\n\n/*# sourceMappingURL=Navbar.vue.map */"]}, media: undefined });
96944
96782
 
96945
96783
  };
96946
96784
  /* scoped */
96947
- const __vue_scope_id__$o = "data-v-8fbc56cc";
96785
+ const __vue_scope_id__$p = "data-v-8fbc56cc";
96948
96786
  /* module identifier */
96949
- const __vue_module_identifier__$o = undefined;
96787
+ const __vue_module_identifier__$p = undefined;
96950
96788
  /* functional template */
96951
- const __vue_is_functional_template__$o = false;
96789
+ const __vue_is_functional_template__$p = false;
96952
96790
  /* style inject SSR */
96953
96791
 
96954
96792
  /* style inject shadow dom */
96955
96793
 
96956
96794
 
96957
96795
 
96958
- const __vue_component__$o = /*#__PURE__*/__vue_normalize__(
96959
- { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
96960
- __vue_inject_styles__$o,
96796
+ const __vue_component__$p = /*#__PURE__*/__vue_normalize__(
96797
+ { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
96798
+ __vue_inject_styles__$p,
96961
96799
  __vue_script__$o,
96962
- __vue_scope_id__$o,
96963
- __vue_is_functional_template__$o,
96964
- __vue_module_identifier__$o,
96800
+ __vue_scope_id__$p,
96801
+ __vue_is_functional_template__$p,
96802
+ __vue_module_identifier__$p,
96965
96803
  false,
96966
96804
  __vue_create_injector__,
96967
96805
  undefined,
@@ -97026,7 +96864,7 @@ var script$n = {
97026
96864
  const __vue_script__$n = script$n;
97027
96865
 
97028
96866
  /* template */
97029
- var __vue_render__$n = function () {
96867
+ var __vue_render__$o = function () {
97030
96868
  var _vm = this;
97031
96869
  var _h = _vm.$createElement;
97032
96870
  var _c = _vm._self._c || _h;
@@ -97117,34 +96955,34 @@ var __vue_render__$n = function () {
97117
96955
  1
97118
96956
  )
97119
96957
  };
97120
- var __vue_staticRenderFns__$n = [];
97121
- __vue_render__$n._withStripped = true;
96958
+ var __vue_staticRenderFns__$o = [];
96959
+ __vue_render__$o._withStripped = true;
97122
96960
 
97123
96961
  /* style */
97124
- const __vue_inject_styles__$n = function (inject) {
96962
+ const __vue_inject_styles__$o = function (inject) {
97125
96963
  if (!inject) return
97126
96964
  inject("data-v-4d10e2a6_0", { source: ".sidebarLogoFade-enter-active[data-v-4d10e2a6] {\n transition: opacity 1.5s;\n}\n.sidebarLogoFade-enter[data-v-4d10e2a6],\n.sidebarLogoFade-leave-to[data-v-4d10e2a6] {\n opacity: 0;\n}\n.sidebar-logo-container[data-v-4d10e2a6] {\n position: relative;\n width: 100%;\n height: 50px;\n line-height: 50px;\n background: #2b2f3a;\n text-align: center;\n overflow: hidden;\n}\n.sidebar-logo-container .sidebar-logo-link[data-v-4d10e2a6] {\n height: 100%;\n width: 100%;\n}\n.sidebar-logo-container .sidebar-logo-link .sidebar-logo[data-v-4d10e2a6] {\n width: 32px;\n height: 32px;\n vertical-align: middle;\n margin-right: 12px;\n}\n.sidebar-logo-container .sidebar-logo-link .sidebar-title[data-v-4d10e2a6] {\n display: inline-block;\n margin: 0;\n color: #fff;\n font-weight: 600;\n line-height: 50px;\n font-size: 14px;\n font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;\n vertical-align: middle;\n}\n.sidebar-logo-container.collapse .sidebar-logo[data-v-4d10e2a6] {\n margin-right: 0px;\n}\n\n/*# sourceMappingURL=Logo.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\Sidebar\\Logo.vue","Logo.vue"],"names":[],"mappings":"AAwDA;EACA,wBAAA;ACvDA;AD0DA;;EAEA,UAAA;ACvDA;AD0DA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,iBAAA;EACA,mBAAA;EACA,kBAAA;EACA,gBAAA;ACvDA;ADyDA;EACA,YAAA;EACA,WAAA;ACvDA;ADyDA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;EACA,kBAAA;ACvDA;AD0DA;EACA,qBAAA;EACA,SAAA;EACA,WAAA;EACA,gBAAA;EACA,iBAAA;EACA,eAAA;EACA,iEAAA;EACA,sBAAA;ACxDA;AD6DA;EACA,iBAAA;AC3DA;;AAEA,mCAAmC","file":"Logo.vue","sourcesContent":["<template>\r\n <div\r\n class=\"sidebar-logo-container\"\r\n :class=\"{ collapse: collapse }\"\r\n :style=\"{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }\"\r\n >\r\n <transition name=\"sidebarLogoFade\">\r\n <router-link v-if=\"collapse\" key=\"collapse\" class=\"sidebar-logo-link\" to=\"/\">\r\n <img v-if=\"logo\" :src=\"logo\" class=\"sidebar-logo\" />\r\n <h1 v-else class=\"sidebar-title\" :style=\"{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }\">\r\n {{ $z.title }}\r\n </h1>\r\n </router-link>\r\n <router-link v-else key=\"expand\" class=\"sidebar-logo-link\" to=\"/\">\r\n <img v-if=\"logo\" :src=\"logo\" class=\"sidebar-logo\" />\r\n <h1 class=\"sidebar-title\" :style=\"{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }\">\r\n {{ $z.title }}\r\n </h1>\r\n </router-link>\r\n </transition>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport logoImg from '../../logo/logo.png'\r\nimport variables from '../../scss/variables.module.scss'\r\n\r\nexport default {\r\n name: 'SidebarLogo',\r\n props: {\r\n collapse: {\r\n type: Boolean,\r\n required: true\r\n }\r\n },\r\n computed: {\r\n variables() {\r\n return variables\r\n },\r\n sideTheme() {\r\n return this.$store.state.settings.sideTheme\r\n }\r\n },\r\n data() {\r\n return {\r\n // title: process.env.VUE_APP_TITLE,\r\n logo: logoImg\r\n }\r\n },\r\n mounted() {\r\n // console.log(process.env.VUE_APP_TITLE)\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.sidebarLogoFade-enter-active {\r\n transition: opacity 1.5s;\r\n}\r\n\r\n.sidebarLogoFade-enter,\r\n.sidebarLogoFade-leave-to {\r\n opacity: 0;\r\n}\r\n\r\n.sidebar-logo-container {\r\n position: relative;\r\n width: 100%;\r\n height: 50px;\r\n line-height: 50px;\r\n background: #2b2f3a;\r\n text-align: center;\r\n overflow: hidden;\r\n\r\n & .sidebar-logo-link {\r\n height: 100%;\r\n width: 100%;\r\n\r\n & .sidebar-logo {\r\n width: 32px;\r\n height: 32px;\r\n vertical-align: middle;\r\n margin-right: 12px;\r\n }\r\n\r\n & .sidebar-title {\r\n display: inline-block;\r\n margin: 0;\r\n color: #fff;\r\n font-weight: 600;\r\n line-height: 50px;\r\n font-size: 14px;\r\n font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;\r\n vertical-align: middle;\r\n }\r\n }\r\n\r\n &.collapse {\r\n .sidebar-logo {\r\n margin-right: 0px;\r\n }\r\n }\r\n}\r\n</style>\r\n",".sidebarLogoFade-enter-active {\n transition: opacity 1.5s;\n}\n\n.sidebarLogoFade-enter,\n.sidebarLogoFade-leave-to {\n opacity: 0;\n}\n\n.sidebar-logo-container {\n position: relative;\n width: 100%;\n height: 50px;\n line-height: 50px;\n background: #2b2f3a;\n text-align: center;\n overflow: hidden;\n}\n.sidebar-logo-container .sidebar-logo-link {\n height: 100%;\n width: 100%;\n}\n.sidebar-logo-container .sidebar-logo-link .sidebar-logo {\n width: 32px;\n height: 32px;\n vertical-align: middle;\n margin-right: 12px;\n}\n.sidebar-logo-container .sidebar-logo-link .sidebar-title {\n display: inline-block;\n margin: 0;\n color: #fff;\n font-weight: 600;\n line-height: 50px;\n font-size: 14px;\n font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;\n vertical-align: middle;\n}\n.sidebar-logo-container.collapse .sidebar-logo {\n margin-right: 0px;\n}\n\n/*# sourceMappingURL=Logo.vue.map */"]}, media: undefined });
97127
96965
 
97128
96966
  };
97129
96967
  /* scoped */
97130
- const __vue_scope_id__$n = "data-v-4d10e2a6";
96968
+ const __vue_scope_id__$o = "data-v-4d10e2a6";
97131
96969
  /* module identifier */
97132
- const __vue_module_identifier__$n = undefined;
96970
+ const __vue_module_identifier__$o = undefined;
97133
96971
  /* functional template */
97134
- const __vue_is_functional_template__$n = false;
96972
+ const __vue_is_functional_template__$o = false;
97135
96973
  /* style inject SSR */
97136
96974
 
97137
96975
  /* style inject shadow dom */
97138
96976
 
97139
96977
 
97140
96978
 
97141
- const __vue_component__$n = /*#__PURE__*/__vue_normalize__(
97142
- { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
97143
- __vue_inject_styles__$n,
96979
+ const __vue_component__$o = /*#__PURE__*/__vue_normalize__(
96980
+ { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
96981
+ __vue_inject_styles__$o,
97144
96982
  __vue_script__$n,
97145
- __vue_scope_id__$n,
97146
- __vue_is_functional_template__$n,
97147
- __vue_module_identifier__$n,
96983
+ __vue_scope_id__$o,
96984
+ __vue_is_functional_template__$o,
96985
+ __vue_module_identifier__$o,
97148
96986
  false,
97149
96987
  __vue_create_injector__,
97150
96988
  undefined,
@@ -97176,7 +97014,7 @@ var script$m = {
97176
97014
  const __vue_script__$m = script$m;
97177
97015
 
97178
97016
  /* template */
97179
- var __vue_render__$m = function () {
97017
+ var __vue_render__$n = function () {
97180
97018
  var _vm = this;
97181
97019
  var _h = _vm.$createElement;
97182
97020
  var _c = _vm._self._c || _h;
@@ -97186,17 +97024,17 @@ var __vue_render__$m = function () {
97186
97024
  ]),
97187
97025
  ])
97188
97026
  };
97189
- var __vue_staticRenderFns__$m = [];
97190
- __vue_render__$m._withStripped = true;
97027
+ var __vue_staticRenderFns__$n = [];
97028
+ __vue_render__$n._withStripped = true;
97191
97029
 
97192
97030
  /* style */
97193
- const __vue_inject_styles__$m = undefined;
97031
+ const __vue_inject_styles__$n = undefined;
97194
97032
  /* scoped */
97195
- const __vue_scope_id__$m = undefined;
97033
+ const __vue_scope_id__$n = undefined;
97196
97034
  /* module identifier */
97197
- const __vue_module_identifier__$m = undefined;
97035
+ const __vue_module_identifier__$n = undefined;
97198
97036
  /* functional template */
97199
- const __vue_is_functional_template__$m = false;
97037
+ const __vue_is_functional_template__$n = false;
97200
97038
  /* style inject */
97201
97039
 
97202
97040
  /* style inject SSR */
@@ -97205,13 +97043,13 @@ __vue_render__$m._withStripped = true;
97205
97043
 
97206
97044
 
97207
97045
 
97208
- const __vue_component__$m = /*#__PURE__*/__vue_normalize__(
97209
- { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
97210
- __vue_inject_styles__$m,
97046
+ const __vue_component__$n = /*#__PURE__*/__vue_normalize__(
97047
+ { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
97048
+ __vue_inject_styles__$n,
97211
97049
  __vue_script__$m,
97212
- __vue_scope_id__$m,
97213
- __vue_is_functional_template__$m,
97214
- __vue_module_identifier__$m,
97050
+ __vue_scope_id__$n,
97051
+ __vue_is_functional_template__$n,
97052
+ __vue_module_identifier__$n,
97215
97053
  false,
97216
97054
  undefined,
97217
97055
  undefined,
@@ -97264,7 +97102,7 @@ var script$l = {
97264
97102
  const __vue_script__$l = script$l;
97265
97103
 
97266
97104
  /* template */
97267
- var __vue_render__$l = function () {
97105
+ var __vue_render__$m = function () {
97268
97106
  var _vm = this;
97269
97107
  var _h = _vm.$createElement;
97270
97108
  var _c = _vm._self._c || _h;
@@ -97275,17 +97113,17 @@ var __vue_render__$l = function () {
97275
97113
  2
97276
97114
  )
97277
97115
  };
97278
- var __vue_staticRenderFns__$l = [];
97279
- __vue_render__$l._withStripped = true;
97116
+ var __vue_staticRenderFns__$m = [];
97117
+ __vue_render__$m._withStripped = true;
97280
97118
 
97281
97119
  /* style */
97282
- const __vue_inject_styles__$l = undefined;
97120
+ const __vue_inject_styles__$m = undefined;
97283
97121
  /* scoped */
97284
- const __vue_scope_id__$l = undefined;
97122
+ const __vue_scope_id__$m = undefined;
97285
97123
  /* module identifier */
97286
- const __vue_module_identifier__$l = undefined;
97124
+ const __vue_module_identifier__$m = undefined;
97287
97125
  /* functional template */
97288
- const __vue_is_functional_template__$l = false;
97126
+ const __vue_is_functional_template__$m = false;
97289
97127
  /* style inject */
97290
97128
 
97291
97129
  /* style inject SSR */
@@ -97294,13 +97132,13 @@ __vue_render__$l._withStripped = true;
97294
97132
 
97295
97133
 
97296
97134
 
97297
- const __vue_component__$l = /*#__PURE__*/__vue_normalize__(
97298
- { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
97299
- __vue_inject_styles__$l,
97135
+ const __vue_component__$m = /*#__PURE__*/__vue_normalize__(
97136
+ { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
97137
+ __vue_inject_styles__$m,
97300
97138
  __vue_script__$l,
97301
- __vue_scope_id__$l,
97302
- __vue_is_functional_template__$l,
97303
- __vue_module_identifier__$l,
97139
+ __vue_scope_id__$m,
97140
+ __vue_is_functional_template__$m,
97141
+ __vue_module_identifier__$m,
97304
97142
  false,
97305
97143
  undefined,
97306
97144
  undefined,
@@ -97363,7 +97201,7 @@ var FixiOSBug = {
97363
97201
 
97364
97202
  var script$k = {
97365
97203
  name: 'SidebarItem',
97366
- components: { Item: __vue_component__$m, AppLink: __vue_component__$l },
97204
+ components: { Item: __vue_component__$n, AppLink: __vue_component__$m },
97367
97205
  mixins: [FixiOSBug],
97368
97206
  props: {
97369
97207
  // route object
@@ -97432,7 +97270,7 @@ var script$k = {
97432
97270
  const __vue_script__$k = script$k;
97433
97271
 
97434
97272
  /* template */
97435
- var __vue_render__$k = function () {
97273
+ var __vue_render__$l = function () {
97436
97274
  var _vm = this;
97437
97275
  var _h = _vm.$createElement;
97438
97276
  var _c = _vm._self._c || _h;
@@ -97526,17 +97364,17 @@ var __vue_render__$k = function () {
97526
97364
  )
97527
97365
  : _vm._e()
97528
97366
  };
97529
- var __vue_staticRenderFns__$k = [];
97530
- __vue_render__$k._withStripped = true;
97367
+ var __vue_staticRenderFns__$l = [];
97368
+ __vue_render__$l._withStripped = true;
97531
97369
 
97532
97370
  /* style */
97533
- const __vue_inject_styles__$k = undefined;
97371
+ const __vue_inject_styles__$l = undefined;
97534
97372
  /* scoped */
97535
- const __vue_scope_id__$k = undefined;
97373
+ const __vue_scope_id__$l = undefined;
97536
97374
  /* module identifier */
97537
- const __vue_module_identifier__$k = undefined;
97375
+ const __vue_module_identifier__$l = undefined;
97538
97376
  /* functional template */
97539
- const __vue_is_functional_template__$k = false;
97377
+ const __vue_is_functional_template__$l = false;
97540
97378
  /* style inject */
97541
97379
 
97542
97380
  /* style inject SSR */
@@ -97545,13 +97383,13 @@ __vue_render__$k._withStripped = true;
97545
97383
 
97546
97384
 
97547
97385
 
97548
- const __vue_component__$k = /*#__PURE__*/__vue_normalize__(
97549
- { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
97550
- __vue_inject_styles__$k,
97386
+ const __vue_component__$l = /*#__PURE__*/__vue_normalize__(
97387
+ { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
97388
+ __vue_inject_styles__$l,
97551
97389
  __vue_script__$k,
97552
- __vue_scope_id__$k,
97553
- __vue_is_functional_template__$k,
97554
- __vue_module_identifier__$k,
97390
+ __vue_scope_id__$l,
97391
+ __vue_is_functional_template__$l,
97392
+ __vue_module_identifier__$l,
97555
97393
  false,
97556
97394
  undefined,
97557
97395
  undefined,
@@ -97584,7 +97422,7 @@ __vue_render__$k._withStripped = true;
97584
97422
 
97585
97423
 
97586
97424
  var script$j = {
97587
- components: { SidebarItem: __vue_component__$k, Logo: __vue_component__$n },
97425
+ components: { SidebarItem: __vue_component__$l, Logo: __vue_component__$o },
97588
97426
  computed: {
97589
97427
  ...mapState(['settings']),
97590
97428
  ...mapState('app', ['sidebar']),
@@ -97615,7 +97453,7 @@ var script$j = {
97615
97453
  const __vue_script__$j = script$j;
97616
97454
 
97617
97455
  /* template */
97618
- var __vue_render__$j = function () {
97456
+ var __vue_render__$k = function () {
97619
97457
  var _vm = this;
97620
97458
  var _h = _vm.$createElement;
97621
97459
  var _c = _vm._self._c || _h;
@@ -97677,17 +97515,17 @@ var __vue_render__$j = function () {
97677
97515
  1
97678
97516
  )
97679
97517
  };
97680
- var __vue_staticRenderFns__$j = [];
97681
- __vue_render__$j._withStripped = true;
97518
+ var __vue_staticRenderFns__$k = [];
97519
+ __vue_render__$k._withStripped = true;
97682
97520
 
97683
97521
  /* style */
97684
- const __vue_inject_styles__$j = undefined;
97522
+ const __vue_inject_styles__$k = undefined;
97685
97523
  /* scoped */
97686
- const __vue_scope_id__$j = undefined;
97524
+ const __vue_scope_id__$k = undefined;
97687
97525
  /* module identifier */
97688
- const __vue_module_identifier__$j = undefined;
97526
+ const __vue_module_identifier__$k = undefined;
97689
97527
  /* functional template */
97690
- const __vue_is_functional_template__$j = false;
97528
+ const __vue_is_functional_template__$k = false;
97691
97529
  /* style inject */
97692
97530
 
97693
97531
  /* style inject SSR */
@@ -97696,13 +97534,13 @@ __vue_render__$j._withStripped = true;
97696
97534
 
97697
97535
 
97698
97536
 
97699
- const __vue_component__$j = /*#__PURE__*/__vue_normalize__(
97700
- { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
97701
- __vue_inject_styles__$j,
97537
+ const __vue_component__$k = /*#__PURE__*/__vue_normalize__(
97538
+ { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
97539
+ __vue_inject_styles__$k,
97702
97540
  __vue_script__$j,
97703
- __vue_scope_id__$j,
97704
- __vue_is_functional_template__$j,
97705
- __vue_module_identifier__$j,
97541
+ __vue_scope_id__$k,
97542
+ __vue_is_functional_template__$k,
97543
+ __vue_module_identifier__$k,
97706
97544
  false,
97707
97545
  undefined,
97708
97546
  undefined,
@@ -97728,9 +97566,9 @@ __vue_render__$j._withStripped = true;
97728
97566
  var script$i = {
97729
97567
  name: 'z-layout',
97730
97568
  components: {
97731
- AppMain: __vue_component__$v,
97732
- Navbar: __vue_component__$o,
97733
- Sidebar: __vue_component__$j
97569
+ AppMain: __vue_component__$w,
97570
+ Navbar: __vue_component__$p,
97571
+ Sidebar: __vue_component__$k
97734
97572
  },
97735
97573
  computed: {
97736
97574
  ...mapState({
@@ -97764,7 +97602,7 @@ var script$i = {
97764
97602
  const __vue_script__$i = script$i;
97765
97603
 
97766
97604
  /* template */
97767
- var __vue_render__$i = function () {
97605
+ var __vue_render__$j = function () {
97768
97606
  var _vm = this;
97769
97607
  var _h = _vm.$createElement;
97770
97608
  var _c = _vm._self._c || _h;
@@ -97812,21 +97650,62 @@ var __vue_render__$i = function () {
97812
97650
  1
97813
97651
  )
97814
97652
  };
97815
- var __vue_staticRenderFns__$i = [];
97816
- __vue_render__$i._withStripped = true;
97653
+ var __vue_staticRenderFns__$j = [];
97654
+ __vue_render__$j._withStripped = true;
97817
97655
 
97818
97656
  /* style */
97819
- const __vue_inject_styles__$i = function (inject) {
97657
+ const __vue_inject_styles__$j = function (inject) {
97820
97658
  if (!inject) return
97821
97659
  inject("data-v-2785cad2_0", { source: "/**\n$base-menu-color:hsla(0,0%,100%,.65);\n$base-menu-color-active:#fff;\n$base-menu-background:#001529;\n$base-logo-title-color: #ffffff;\n\n$base-menu-light-color:rgba(0,0,0,.70);\n$base-menu-light-background:#ffffff;\n$base-logo-light-title-color: #001529;\n\n$base-sub-menu-background:#000c17;\n$base-sub-menu-hover:#001528;\n*/\n[data-v-2785cad2]:export {\n menuColor: #bfcbd9;\n menuLightColor: rgba(0, 0, 0, 0.7);\n menuColorActive: #f4f4f5;\n menuBackground: #304156;\n menuLightBackground: #ffffff;\n subMenuBackground: #1f2d3d;\n subMenuHover: #001528;\n sideBarWidth: 200px;\n logoTitleColor: #ffffff;\n logoLightTitleColor: #001529;\n}\n.app-wrapper[data-v-2785cad2] {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.app-wrapper[data-v-2785cad2]:after {\n content: \"\";\n display: table;\n clear: both;\n}\n.app-wrapper.mobile.openSidebar[data-v-2785cad2] {\n position: fixed;\n top: 0;\n}\n.drawer-bg[data-v-2785cad2] {\n background: #000;\n opacity: 0.3;\n width: 100%;\n top: 0;\n height: 100%;\n position: absolute;\n z-index: 999;\n}\n.fixed-header[data-v-2785cad2] {\n position: fixed;\n top: 0;\n right: 0;\n z-index: 9;\n width: calc(100% - 200px);\n transition: width 0.28s;\n}\n.hideSidebar .fixed-header[data-v-2785cad2] {\n width: calc(100% - 54px);\n}\n.sidebarHide .fixed-header[data-v-2785cad2] {\n width: 100%;\n}\n.mobile .fixed-header[data-v-2785cad2] {\n width: 100%;\n}\n\n/*# sourceMappingURL=layout.vue.map */", map: {"version":3,"sources":["layout.vue","D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\layout.vue"],"names":[],"mappings":"AAAA;;;;;;;;;;;;CAYC;AACD;EACE,kBAAkB;EAClB,kCAAkC;EAClC,wBAAwB;EACxB,uBAAuB;EACvB,4BAA4B;EAC5B,0BAA0B;EAC1B,qBAAqB;EACrB,mBAAmB;EACnB,uBAAuB;EACvB,4BAA4B;AAC9B;ACoCA;EAEA,kBAAA;EACA,YAAA;EACA,WAAA;ADlCA;AACA;EACE,WAAW;EACX,cAAc;EACd,WAAW;AACb;AC8BA;EACA,eAAA;EACA,MAAA;AD5BA;AC+BA;EACA,gBAAA;EACA,YAAA;EACA,WAAA;EACA,MAAA;EACA,YAAA;EACA,kBAAA;EACA,YAAA;AD5BA;AC8BA;EACA,eAAA;EACA,MAAA;EACA,QAAA;EACA,UAAA;EACA,yBAAA;EACA,uBAAA;AD3BA;AC6BA;EACA,wBAAA;AD1BA;AC4BA;EACA,WAAA;ADzBA;AC2BA;EACA,WAAA;ADxBA;;AAEA,qCAAqC","file":"layout.vue","sourcesContent":["/**\n$base-menu-color:hsla(0,0%,100%,.65);\n$base-menu-color-active:#fff;\n$base-menu-background:#001529;\n$base-logo-title-color: #ffffff;\n\n$base-menu-light-color:rgba(0,0,0,.70);\n$base-menu-light-background:#ffffff;\n$base-logo-light-title-color: #001529;\n\n$base-sub-menu-background:#000c17;\n$base-sub-menu-hover:#001528;\n*/\n:export {\n menuColor: #bfcbd9;\n menuLightColor: rgba(0, 0, 0, 0.7);\n menuColorActive: #f4f4f5;\n menuBackground: #304156;\n menuLightBackground: #ffffff;\n subMenuBackground: #1f2d3d;\n subMenuHover: #001528;\n sideBarWidth: 200px;\n logoTitleColor: #ffffff;\n logoLightTitleColor: #001529;\n}\n\n.app-wrapper {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.app-wrapper:after {\n content: \"\";\n display: table;\n clear: both;\n}\n.app-wrapper.mobile.openSidebar {\n position: fixed;\n top: 0;\n}\n\n.drawer-bg {\n background: #000;\n opacity: 0.3;\n width: 100%;\n top: 0;\n height: 100%;\n position: absolute;\n z-index: 999;\n}\n\n.fixed-header {\n position: fixed;\n top: 0;\n right: 0;\n z-index: 9;\n width: calc(100% - 200px);\n transition: width 0.28s;\n}\n\n.hideSidebar .fixed-header {\n width: calc(100% - 54px);\n}\n\n.sidebarHide .fixed-header {\n width: 100%;\n}\n\n.mobile .fixed-header {\n width: 100%;\n}\n\n/*# sourceMappingURL=layout.vue.map */","<template>\r\n <div :class=\"classObj\" class=\"app-wrapper\" :style=\"{ '--current-color': theme }\">\r\n <div v-if=\"device === 'mobile' && sidebar.opened\" class=\"drawer-bg\" @click=\"handleClickOutside\" />\r\n <Sidebar v-if=\"!sidebar.hide\" class=\"sidebar-container\" />\r\n <div :class=\"{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }\" class=\"main-container\">\r\n <div :class=\"{ 'fixed-header': fixedHeader }\">\r\n <Navbar />\r\n <div></div>\r\n </div>\r\n <AppMain></AppMain>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapState } from 'vuex'\r\nimport variables from './scss/variables.module.scss'\r\nimport AppMain from './components/AppMain.vue'\r\nimport Navbar from './components/Navbar.vue'\r\nimport Sidebar from './components/Sidebar/index.vue'\r\n\r\nexport default {\r\n name: 'z-layout',\r\n components: {\r\n AppMain,\r\n Navbar,\r\n Sidebar\r\n },\r\n computed: {\r\n ...mapState({\r\n theme: (state) => state.settings.theme,\r\n sideTheme: (state) => state.settings.sideTheme,\r\n sidebar: (state) => state.app.sidebar,\r\n device: (state) => state.app.device,\r\n needTagsView: (state) => state.settings.tagsView,\r\n fixedHeader: (state) => state.settings.fixedHeader\r\n }),\r\n classObj() {\r\n return {\r\n hideSidebar: !this.sidebar.opened,\r\n openSidebar: this.sidebar.opened,\r\n withoutAnimation: this.sidebar.withoutAnimation,\r\n mobile: this.device === 'mobile'\r\n }\r\n },\r\n variables() {\r\n return variables\r\n }\r\n },\r\n methods: {\r\n handleClickOutside() {\r\n this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n@import './scss/mixin.scss';\r\n@import './scss/variables.module.scss';\r\n.app-wrapper {\r\n @include clearfix;\r\n position: relative;\r\n height: 100%;\r\n width: 100%;\r\n &.mobile.openSidebar {\r\n position: fixed;\r\n top: 0;\r\n }\r\n}\r\n.drawer-bg {\r\n background: #000;\r\n opacity: 0.3;\r\n width: 100%;\r\n top: 0;\r\n height: 100%;\r\n position: absolute;\r\n z-index: 999;\r\n}\r\n.fixed-header {\r\n position: fixed;\r\n top: 0;\r\n right: 0;\r\n z-index: 9;\r\n width: calc(100% - #{$base-sidebar-width});\r\n transition: width 0.28s;\r\n}\r\n.hideSidebar .fixed-header {\r\n width: calc(100% - 54px);\r\n}\r\n.sidebarHide .fixed-header {\r\n width: 100%;\r\n}\r\n.mobile .fixed-header {\r\n width: 100%;\r\n}\r\n</style>\r\n"]}, media: undefined });
97822
97660
 
97823
97661
  };
97824
97662
  /* scoped */
97825
- const __vue_scope_id__$i = "data-v-2785cad2";
97663
+ const __vue_scope_id__$j = "data-v-2785cad2";
97664
+ /* module identifier */
97665
+ const __vue_module_identifier__$j = undefined;
97666
+ /* functional template */
97667
+ const __vue_is_functional_template__$j = false;
97668
+ /* style inject SSR */
97669
+
97670
+ /* style inject shadow dom */
97671
+
97672
+
97673
+
97674
+ const __vue_component__$j = /*#__PURE__*/__vue_normalize__(
97675
+ { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
97676
+ __vue_inject_styles__$j,
97677
+ __vue_script__$i,
97678
+ __vue_scope_id__$j,
97679
+ __vue_is_functional_template__$j,
97680
+ __vue_module_identifier__$j,
97681
+ false,
97682
+ __vue_create_injector__,
97683
+ undefined,
97684
+ undefined
97685
+ );
97686
+
97687
+ /* script */
97688
+
97689
+ /* template */
97690
+ var __vue_render__$i = function () {
97691
+ var _vm = this;
97692
+ var _h = _vm.$createElement;
97693
+ var _c = _vm._self._c || _h;
97694
+ return _c("router-view")
97695
+ };
97696
+ var __vue_staticRenderFns__$i = [];
97697
+ __vue_render__$i._withStripped = true;
97698
+
97699
+ /* style */
97700
+ const __vue_inject_styles__$i = undefined;
97701
+ /* scoped */
97702
+ const __vue_scope_id__$i = undefined;
97826
97703
  /* module identifier */
97827
97704
  const __vue_module_identifier__$i = undefined;
97828
97705
  /* functional template */
97829
97706
  const __vue_is_functional_template__$i = false;
97707
+ /* style inject */
97708
+
97830
97709
  /* style inject SSR */
97831
97710
 
97832
97711
  /* style inject shadow dom */
@@ -97836,26 +97715,28 @@ __vue_render__$i._withStripped = true;
97836
97715
  const __vue_component__$i = /*#__PURE__*/__vue_normalize__(
97837
97716
  { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
97838
97717
  __vue_inject_styles__$i,
97839
- __vue_script__$i,
97718
+ {},
97840
97719
  __vue_scope_id__$i,
97841
97720
  __vue_is_functional_template__$i,
97842
97721
  __vue_module_identifier__$i,
97843
97722
  false,
97844
- __vue_create_injector__,
97723
+ undefined,
97845
97724
  undefined,
97846
97725
  undefined
97847
97726
  );
97848
97727
 
97849
- const state$4 = {
97728
+ const state$5 = {
97850
97729
  routes: [],
97851
97730
  addRoutes: [],
97852
97731
  defaultRoutes: [],
97853
97732
  topbarRouters: [],
97854
97733
  sidebarRouters: []
97855
97734
  };
97856
- const mutations$4 = {
97857
- SET_ROUTES: (state, routes) => {
97735
+ const mutations$5 = {
97736
+ SET_ADD_ROUTES: (state, routes) => {
97858
97737
  state.addRoutes = routes;
97738
+ },
97739
+ SET_ROUTES: (state, routes) => {
97859
97740
  state.routes = routes;
97860
97741
  },
97861
97742
  SET_DEFAULT_ROUTES: (state, routes) => {
@@ -97868,7 +97749,7 @@ const mutations$4 = {
97868
97749
  state.sidebarRouters = routes;
97869
97750
  }
97870
97751
  };
97871
- const actions$4 = {
97752
+ const actions$5 = {
97872
97753
  // 生成路由
97873
97754
  GenerateRoutes({ commit }, $z) {
97874
97755
  return new Promise((resolve) => {
@@ -97893,8 +97774,11 @@ const actions$4 = {
97893
97774
  const sidebarRoutes = filterAsyncRouter(sdata);
97894
97775
  const rewriteRoutes = filterAsyncRouter(rdata, false, true);
97895
97776
  rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true });
97896
- commit('SET_ROUTES', rewriteRoutes);
97897
- commit('SET_SIDEBAR_ROUTERS', sidebarRoutes);
97777
+ const constantRoutes = $z.router.routes || [];
97778
+
97779
+ commit('SET_ADD_ROUTES', rewriteRoutes);
97780
+ commit('SET_ROUTES', constantRoutes.concat(rewriteRoutes));
97781
+ commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes));
97898
97782
  commit('SET_DEFAULT_ROUTES', sidebarRoutes);
97899
97783
  commit('SET_TOPBAR_ROUTES', sidebarRoutes);
97900
97784
  resolve(rewriteRoutes);
@@ -97909,16 +97793,13 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
97909
97793
  if (type && route.children) {
97910
97794
  route.children = filterChildren(route.children);
97911
97795
  }
97912
- if (route.component) {
97913
- // Layout ParentView 组件特殊处理
97796
+ if (route.component && typeof route.component === 'string') {
97914
97797
  if (route.component === 'Layout') {
97915
- route.component = __vue_component__$i;
97798
+ route.component = __vue_component__$j;
97916
97799
  } else if (route.component === 'ParentView') {
97917
97800
  route.component = __vue_component__$i;
97918
- // route.component = ParentView
97919
97801
  } else if (route.component === 'InnerLink') {
97920
- route.component = __vue_component__$i;
97921
- // route.component = InnerLink
97802
+ route.component = __vue_component__$y;
97922
97803
  } else {
97923
97804
  route.component = loadView(route.component);
97924
97805
  }
@@ -97927,7 +97808,9 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
97927
97808
  route.children = filterAsyncRouter(route.children, route, type);
97928
97809
  } else {
97929
97810
  delete route['children'];
97930
- delete route['redirect'];
97811
+ if (route.path !== '' && route.path !== '/') {
97812
+ delete route['redirect'];
97813
+ }
97931
97814
  }
97932
97815
  return true
97933
97816
  })
@@ -97962,27 +97845,183 @@ const loadView = (view) => {
97962
97845
  // 使用 import 实现生产环境的路由懒加载
97963
97846
  return () => import(`@/views/${view}.vue`)
97964
97847
  }
97965
- // return () => import(`@/views/${view}.vue`)
97966
97848
  };
97967
97849
 
97968
- function registerStateModule$4(store) {
97850
+ function registerStateModule$5(store) {
97969
97851
  if (!store || !store.hasModule) return
97970
97852
  if (!store.hasModule('permission')) {
97853
+ const statesModule = {
97854
+ namespaced: true,
97855
+ state: state$5,
97856
+ mutations: mutations$5,
97857
+ actions: actions$5
97858
+ };
97859
+ store.registerModule('permission', statesModule);
97860
+ }
97861
+ }
97862
+
97863
+ NProgress.configure({ showSpinner: false });
97864
+
97865
+ function createRouter(Vue) {
97866
+ // 判断是否已经use过VueRouter
97867
+ const VueRouterObj = Vue._installedPlugins.filter((item) => {
97868
+ return item.name === 'VueRouter'
97869
+ });
97870
+ if (!(VueRouterObj && VueRouterObj[0])) {
97871
+ Vue.use(VueRouter);
97872
+ const $z = Vue.prototype.$z;
97873
+ const routerOption = $z.router;
97874
+ if (routerOption) {
97875
+ const defaultConfig = {
97876
+ mode: routerOption.mode || 'history', // 去掉url中的#
97877
+ scrollBehavior: () => ({ y: 0 }),
97878
+ routes: routerOption.routes || []
97879
+ };
97880
+ filterAsyncRouter(defaultConfig.routes);
97881
+ const router = new VueRouter(defaultConfig);
97882
+ router.beforeEach((to, from, next) => {
97883
+ if (routerOption.beforeEach) {
97884
+ routerOption.beforeEach(to, from, next);
97885
+ } else {
97886
+ NProgress.start();
97887
+ const httpOption = $z.http || {};
97888
+ const token = getCookie(httpOption.tokenKey || TOKENKEY);
97889
+ const store = $z.store;
97890
+ if (!routerOption.whiteList) {
97891
+ routerOption.whiteList = ['/login', '/register'];
97892
+ }
97893
+ if (token) {
97894
+ if (to.path === '/login') {
97895
+ next({ path: '/' });
97896
+ NProgress.done();
97897
+ } else {
97898
+ // 判断是不是第一次 需要动态加载路由
97899
+ if (!router.options.isAddDynamicMenuRoutes && store) {
97900
+ router.options.isAddDynamicMenuRoutes = true;
97901
+ isRelogin.show = true;
97902
+ store.dispatch('user/GetInfo', $z).then(() => {
97903
+ isRelogin.show = false;
97904
+ store.dispatch('permission/GenerateRoutes', $z).then((accessRoutes) => {
97905
+ // 根据roles权限生成可访问的路由表
97906
+ router.addRoutes(accessRoutes); // 动态添加可访问路由表
97907
+ router.options.routes = Object.assign(router.options.routes, accessRoutes);
97908
+ next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
97909
+ });
97910
+ });
97911
+ next();
97912
+ } else {
97913
+ next();
97914
+ }
97915
+ }
97916
+ } else {
97917
+ // 没有token
97918
+ if (routerOption.whiteList.indexOf(to.path) !== -1) {
97919
+ // 在免登录白名单,直接进入
97920
+ next();
97921
+ } else {
97922
+ next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
97923
+ NProgress.done();
97924
+ }
97925
+ }
97926
+ }
97927
+ });
97928
+ router.afterEach(() => {
97929
+ if (routerOption.afterEach) {
97930
+ routerOption.afterEach();
97931
+ } else {
97932
+ NProgress.done();
97933
+ }
97934
+ });
97935
+
97936
+ Vue.prototype.$z.$router = router;
97937
+ }
97938
+ }
97939
+ }
97940
+
97941
+ const state$4 = {
97942
+ token: '',
97943
+ userinfo: {},
97944
+ roles: [],
97945
+ permissions: []
97946
+ };
97947
+ const mutations$4 = {
97948
+ SET_TOKEN: (state, token) => {
97949
+ state.token = token;
97950
+ },
97951
+ SET_ROLES: (state, roles) => {
97952
+ state.roles = roles;
97953
+ },
97954
+ SET_USERINFO: (state, userinfo) => {
97955
+ state.userinfo = userinfo;
97956
+ },
97957
+ SET_PERMISSIONS: (state, permissions) => {
97958
+ state.permissions = permissions;
97959
+ }
97960
+ };
97961
+ const actions$4 = {
97962
+ // 登录 todo
97963
+ Login({ commit }, userInfo) {},
97964
+
97965
+ // 获取用户信息
97966
+ GetInfo({ commit }, $z) {
97967
+ return new Promise((resolve, reject) => {
97968
+ const $http = $z.$http;
97969
+ const routerOption = $z.router || {};
97970
+ let api = function () {
97971
+ if ($http) {
97972
+ return $http.request({
97973
+ url: routerOption.getUserInfo || '/getInfo',
97974
+ method: 'get'
97975
+ })
97976
+ } else {
97977
+ Promise.resolve({});
97978
+ }
97979
+ };
97980
+ if (typeof routerOption.getUserInfo === 'function') {
97981
+ api = routerOption.getUserInfo;
97982
+ }
97983
+ api()
97984
+ .then((res) => {
97985
+ commit('SET_USERINFO', res.user || {});
97986
+ commit('SET_PERMISSIONS', res.permissions || '*:*:*');
97987
+ if (res.roles && res.roles.length > 0) {
97988
+ commit('SET_ROLES', res.roles);
97989
+ } else {
97990
+ commit('SET_ROLES', ['ROLE_DEFAULT']);
97991
+ }
97992
+ resolve(res);
97993
+ })
97994
+ .catch((error) => {
97995
+ reject(error);
97996
+ });
97997
+ })
97998
+ },
97999
+
98000
+ // 退出系统 todo
98001
+ LogOut({ commit, state }) {},
98002
+
98003
+ // 前端 登出 todo
98004
+ FedLogOut({ commit }) {}
98005
+ };
98006
+
98007
+ function registerStateModule$4(store) {
98008
+ if (!store || !store.hasModule) return
98009
+ if (!store.hasModule('user')) {
97971
98010
  const statesModule = {
97972
98011
  namespaced: true,
97973
98012
  state: state$4,
97974
98013
  mutations: mutations$4,
97975
98014
  actions: actions$4
97976
98015
  };
97977
- store.registerModule('permission', statesModule);
98016
+ store.registerModule('user', statesModule);
97978
98017
  }
97979
98018
  }
97980
98019
 
97981
98020
  function install$2(Vue, option = {}) {
97982
98021
  const z = Vue.prototype.$z;
97983
98022
  const store = z.store;
97984
- registerStateModule$5(store);
97985
98023
  registerStateModule$4(store);
98024
+ registerStateModule$5(store);
97986
98025
  setGolbalData(Vue, option);
97987
98026
  createRouter(Vue);
97988
98027
  }
@@ -99761,9 +99800,9 @@ function registerStateModule(store) {
99761
99800
  }
99762
99801
  }
99763
99802
 
99764
- __vue_component__$i.install = function (Vue, option = {}) {
99803
+ __vue_component__$j.install = function (Vue, option = {}) {
99765
99804
  setGolbalData(Vue, option);
99766
- Vue.component(__vue_component__$i.name, __vue_component__$i);
99805
+ Vue.component(__vue_component__$j.name, __vue_component__$j);
99767
99806
  const z = Vue.prototype.$z;
99768
99807
  const store = z.store;
99769
99808
  registerStateModule$2(store);
@@ -100767,7 +100806,7 @@ if (typeof window !== 'undefined' && window.Vue) {
100767
100806
  install(window.Vue);
100768
100807
  }
100769
100808
  const components = [
100770
- __vue_component__$y,
100809
+ __vue_component__$z,
100771
100810
  __vue_component__,
100772
100811
  RequestZ,
100773
100812
  RouterZ,
@@ -100789,7 +100828,7 @@ const components = [
100789
100828
  __vue_component__$3,
100790
100829
  __vue_component__$2,
100791
100830
  __vue_component__$1,
100792
- __vue_component__$i
100831
+ __vue_component__$j
100793
100832
  ];
100794
100833
  const install = (Vue, option = {}) => {
100795
100834
  setGolbalData(Vue, option);
@@ -100812,9 +100851,9 @@ exports.DictZ = DictZ;
100812
100851
  exports.FooterZ = __vue_component__$8;
100813
100852
  exports.HeaderZ = __vue_component__$7;
100814
100853
  exports.Icon2Z = __vue_component__;
100815
- exports.IconZ = __vue_component__$y;
100854
+ exports.IconZ = __vue_component__$z;
100816
100855
  exports.InputZ = __vue_component__$6;
100817
- exports.LayoutZ = __vue_component__$i;
100856
+ exports.LayoutZ = __vue_component__$j;
100818
100857
  exports.ListZ = __vue_component__$g;
100819
100858
  exports.MainZ = __vue_component__$5;
100820
100859
  exports.OptionZ = __vue_component__$4;