@luzhaoqi/test 0.0.21 → 0.0.23

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.
package/dist/lib-cjs.js CHANGED
@@ -17576,8 +17576,6 @@ var path$1 = {
17576
17576
  query
17577
17577
  };
17578
17578
 
17579
- const TOKENKEY = 'Admin-Token';
17580
-
17581
17579
  const setGolbalData = (Vue, option) => {
17582
17580
  if (!Vue.prototype.$z) {
17583
17581
  Vue.prototype.$z = option || {};
@@ -17603,7 +17601,7 @@ var variables = {"menuColor":"#bfcbd9","menuLightColor":"rgba(0, 0, 0, 0.7)","me
17603
17601
 
17604
17602
  // import Item from './Item.vue'
17605
17603
 
17606
- var script$x = {
17604
+ var script$z = {
17607
17605
  name: 'k-icon',
17608
17606
  data() {
17609
17607
  return {
@@ -17712,10 +17710,10 @@ var normalizeComponent_1 = normalizeComponent;
17712
17710
  var __vue_normalize__ = /*@__PURE__*/getDefaultExportFromCjs(normalizeComponent_1);
17713
17711
 
17714
17712
  /* script */
17715
- const __vue_script__$x = script$x;
17713
+ const __vue_script__$z = script$z;
17716
17714
 
17717
17715
  /* template */
17718
- var __vue_render__$z = function () {
17716
+ var __vue_render__$B = function () {
17719
17717
  var _vm = this;
17720
17718
  var _h = _vm.$createElement;
17721
17719
  var _c = _vm._self._c || _h;
@@ -17725,17 +17723,17 @@ var __vue_render__$z = function () {
17725
17723
  _c("img", { attrs: { src: _vm.img, alt: "" } }),
17726
17724
  ])
17727
17725
  };
17728
- var __vue_staticRenderFns__$z = [];
17729
- __vue_render__$z._withStripped = true;
17726
+ var __vue_staticRenderFns__$B = [];
17727
+ __vue_render__$B._withStripped = true;
17730
17728
 
17731
17729
  /* style */
17732
- const __vue_inject_styles__$z = undefined;
17730
+ const __vue_inject_styles__$B = undefined;
17733
17731
  /* scoped */
17734
- const __vue_scope_id__$z = undefined;
17732
+ const __vue_scope_id__$B = undefined;
17735
17733
  /* module identifier */
17736
- const __vue_module_identifier__$z = undefined;
17734
+ const __vue_module_identifier__$B = undefined;
17737
17735
  /* functional template */
17738
- const __vue_is_functional_template__$z = false;
17736
+ const __vue_is_functional_template__$B = false;
17739
17737
  /* style inject */
17740
17738
 
17741
17739
  /* style inject SSR */
@@ -17744,22 +17742,22 @@ __vue_render__$z._withStripped = true;
17744
17742
 
17745
17743
 
17746
17744
 
17747
- const __vue_component__$z = /*#__PURE__*/__vue_normalize__(
17748
- { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
17749
- __vue_inject_styles__$z,
17750
- __vue_script__$x,
17751
- __vue_scope_id__$z,
17752
- __vue_is_functional_template__$z,
17753
- __vue_module_identifier__$z,
17745
+ const __vue_component__$B = /*#__PURE__*/__vue_normalize__(
17746
+ { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
17747
+ __vue_inject_styles__$B,
17748
+ __vue_script__$z,
17749
+ __vue_scope_id__$B,
17750
+ __vue_is_functional_template__$B,
17751
+ __vue_module_identifier__$B,
17754
17752
  false,
17755
17753
  undefined,
17756
17754
  undefined,
17757
17755
  undefined
17758
17756
  );
17759
17757
 
17760
- __vue_component__$z.install = function (Vue, option) {
17758
+ __vue_component__$B.install = function (Vue, option) {
17761
17759
  setGolbalData(Vue, option);
17762
- Vue.component(__vue_component__$z.name, __vue_component__$z);
17760
+ Vue.component(__vue_component__$B.name, __vue_component__$B);
17763
17761
  };
17764
17762
 
17765
17763
  var axios$3 = {exports: {}};
@@ -93730,6 +93728,8 @@ var errorCode = {
93730
93728
  default: '系统未知错误,请反馈给管理员'
93731
93729
  };
93732
93730
 
93731
+ const TOKENKEY = 'Admin-Token';
93732
+
93733
93733
  // 是否显示重新登录
93734
93734
  let isRelogin = { show: false };
93735
93735
 
@@ -95368,7 +95368,7 @@ function getModuleByNamespace (store, helper, namespace) {
95368
95368
  //
95369
95369
  //
95370
95370
 
95371
- var script$w = {
95371
+ var script$y = {
95372
95372
  props: {
95373
95373
  src: {
95374
95374
  type: String,
@@ -95404,10 +95404,10 @@ var script$w = {
95404
95404
  };
95405
95405
 
95406
95406
  /* script */
95407
- const __vue_script__$w = script$w;
95407
+ const __vue_script__$y = script$y;
95408
95408
 
95409
95409
  /* template */
95410
- var __vue_render__$y = function () {
95410
+ var __vue_render__$A = function () {
95411
95411
  var _vm = this;
95412
95412
  var _h = _vm.$createElement;
95413
95413
  var _c = _vm._self._c || _h;
@@ -95433,17 +95433,17 @@ var __vue_render__$y = function () {
95433
95433
  ]
95434
95434
  )
95435
95435
  };
95436
- var __vue_staticRenderFns__$y = [];
95437
- __vue_render__$y._withStripped = true;
95436
+ var __vue_staticRenderFns__$A = [];
95437
+ __vue_render__$A._withStripped = true;
95438
95438
 
95439
95439
  /* style */
95440
- const __vue_inject_styles__$y = undefined;
95440
+ const __vue_inject_styles__$A = undefined;
95441
95441
  /* scoped */
95442
- const __vue_scope_id__$y = undefined;
95442
+ const __vue_scope_id__$A = undefined;
95443
95443
  /* module identifier */
95444
- const __vue_module_identifier__$y = undefined;
95444
+ const __vue_module_identifier__$A = undefined;
95445
95445
  /* functional template */
95446
- const __vue_is_functional_template__$y = false;
95446
+ const __vue_is_functional_template__$A = false;
95447
95447
  /* style inject */
95448
95448
 
95449
95449
  /* style inject SSR */
@@ -95452,13 +95452,13 @@ __vue_render__$y._withStripped = true;
95452
95452
 
95453
95453
 
95454
95454
 
95455
- const __vue_component__$y = /*#__PURE__*/__vue_normalize__(
95456
- { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
95457
- __vue_inject_styles__$y,
95458
- __vue_script__$w,
95459
- __vue_scope_id__$y,
95460
- __vue_is_functional_template__$y,
95461
- __vue_module_identifier__$y,
95455
+ const __vue_component__$A = /*#__PURE__*/__vue_normalize__(
95456
+ { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
95457
+ __vue_inject_styles__$A,
95458
+ __vue_script__$y,
95459
+ __vue_scope_id__$A,
95460
+ __vue_is_functional_template__$A,
95461
+ __vue_module_identifier__$A,
95462
95462
  false,
95463
95463
  undefined,
95464
95464
  undefined,
@@ -95479,20 +95479,20 @@ __vue_render__$y._withStripped = true;
95479
95479
  //
95480
95480
 
95481
95481
 
95482
- var script$v = {
95483
- components: { InnerLink: __vue_component__$y },
95482
+ var script$x = {
95483
+ components: { InnerLink: __vue_component__$A },
95484
95484
  computed: {
95485
95485
  iframeViews() {
95486
- return this.$store.state.tagsView.iframeViews
95486
+ return this.$store.state['z-tagsView'].iframeViews
95487
95487
  }
95488
95488
  }
95489
95489
  };
95490
95490
 
95491
95491
  /* script */
95492
- const __vue_script__$v = script$v;
95492
+ const __vue_script__$x = script$x;
95493
95493
 
95494
95494
  /* template */
95495
- var __vue_render__$x = function () {
95495
+ var __vue_render__$z = function () {
95496
95496
  var _vm = this;
95497
95497
  var _h = _vm.$createElement;
95498
95498
  var _c = _vm._self._c || _h;
@@ -95516,17 +95516,17 @@ var __vue_render__$x = function () {
95516
95516
  1
95517
95517
  )
95518
95518
  };
95519
- var __vue_staticRenderFns__$x = [];
95520
- __vue_render__$x._withStripped = true;
95519
+ var __vue_staticRenderFns__$z = [];
95520
+ __vue_render__$z._withStripped = true;
95521
95521
 
95522
95522
  /* style */
95523
- const __vue_inject_styles__$x = undefined;
95523
+ const __vue_inject_styles__$z = undefined;
95524
95524
  /* scoped */
95525
- const __vue_scope_id__$x = undefined;
95525
+ const __vue_scope_id__$z = undefined;
95526
95526
  /* module identifier */
95527
- const __vue_module_identifier__$x = undefined;
95527
+ const __vue_module_identifier__$z = undefined;
95528
95528
  /* functional template */
95529
- const __vue_is_functional_template__$x = false;
95529
+ const __vue_is_functional_template__$z = false;
95530
95530
  /* style inject */
95531
95531
 
95532
95532
  /* style inject SSR */
@@ -95535,13 +95535,13 @@ __vue_render__$x._withStripped = true;
95535
95535
 
95536
95536
 
95537
95537
 
95538
- const __vue_component__$x = /*#__PURE__*/__vue_normalize__(
95539
- { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
95540
- __vue_inject_styles__$x,
95541
- __vue_script__$v,
95542
- __vue_scope_id__$x,
95543
- __vue_is_functional_template__$x,
95544
- __vue_module_identifier__$x,
95538
+ const __vue_component__$z = /*#__PURE__*/__vue_normalize__(
95539
+ { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
95540
+ __vue_inject_styles__$z,
95541
+ __vue_script__$x,
95542
+ __vue_scope_id__$z,
95543
+ __vue_is_functional_template__$z,
95544
+ __vue_module_identifier__$z,
95545
95545
  false,
95546
95546
  undefined,
95547
95547
  undefined,
@@ -95561,12 +95561,12 @@ __vue_render__$x._withStripped = true;
95561
95561
  //
95562
95562
 
95563
95563
 
95564
- var script$u = {
95564
+ var script$w = {
95565
95565
  name: 'AppMain',
95566
- components: { iframeToggle: __vue_component__$x },
95566
+ components: { iframeToggle: __vue_component__$z },
95567
95567
  computed: {
95568
95568
  cachedViews() {
95569
- return this.$store.state.tagsView.cachedViews
95569
+ return this.$store.state['z-tagsView'].cachedViews
95570
95570
  },
95571
95571
  key() {
95572
95572
  return this.$route.path
@@ -95633,10 +95633,10 @@ var browser = createInjector;
95633
95633
  var __vue_create_injector__ = /*@__PURE__*/getDefaultExportFromCjs(browser);
95634
95634
 
95635
95635
  /* script */
95636
- const __vue_script__$u = script$u;
95636
+ const __vue_script__$w = script$w;
95637
95637
 
95638
95638
  /* template */
95639
- var __vue_render__$w = function () {
95639
+ var __vue_render__$y = function () {
95640
95640
  var _vm = this;
95641
95641
  var _h = _vm.$createElement;
95642
95642
  var _c = _vm._self._c || _h;
@@ -95667,35 +95667,35 @@ var __vue_render__$w = function () {
95667
95667
  1
95668
95668
  )
95669
95669
  };
95670
- var __vue_staticRenderFns__$w = [];
95671
- __vue_render__$w._withStripped = true;
95670
+ var __vue_staticRenderFns__$y = [];
95671
+ __vue_render__$y._withStripped = true;
95672
95672
 
95673
95673
  /* style */
95674
- const __vue_inject_styles__$w = function (inject) {
95674
+ const __vue_inject_styles__$y = function (inject) {
95675
95675
  if (!inject) return
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 })
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 });
95676
+ inject("data-v-7ff2a9cf_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-7ff2a9cf]: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-7ff2a9cf] {\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-7ff2a9cf] {\n padding-top: 50px;\n}\n.hasTagsView .app-main[data-v-7ff2a9cf] {\n /* 84 = navbar + tags-view = 50 + 34 */\n min-height: calc(100vh - 84px);\n}\n.hasTagsView .fixed-header + .app-main[data-v-7ff2a9cf] {\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['z-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 })
95677
+ ,inject("data-v-7ff2a9cf_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['z-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 });
95678
95678
 
95679
95679
  };
95680
95680
  /* scoped */
95681
- const __vue_scope_id__$w = "data-v-e177811c";
95681
+ const __vue_scope_id__$y = "data-v-7ff2a9cf";
95682
95682
  /* module identifier */
95683
- const __vue_module_identifier__$w = undefined;
95683
+ const __vue_module_identifier__$y = undefined;
95684
95684
  /* functional template */
95685
- const __vue_is_functional_template__$w = false;
95685
+ const __vue_is_functional_template__$y = false;
95686
95686
  /* style inject SSR */
95687
95687
 
95688
95688
  /* style inject shadow dom */
95689
95689
 
95690
95690
 
95691
95691
 
95692
- const __vue_component__$w = /*#__PURE__*/__vue_normalize__(
95693
- { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
95694
- __vue_inject_styles__$w,
95695
- __vue_script__$u,
95696
- __vue_scope_id__$w,
95697
- __vue_is_functional_template__$w,
95698
- __vue_module_identifier__$w,
95692
+ const __vue_component__$y = /*#__PURE__*/__vue_normalize__(
95693
+ { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
95694
+ __vue_inject_styles__$y,
95695
+ __vue_script__$w,
95696
+ __vue_scope_id__$y,
95697
+ __vue_is_functional_template__$y,
95698
+ __vue_module_identifier__$y,
95699
95699
  false,
95700
95700
  __vue_create_injector__,
95701
95701
  undefined,
@@ -95716,7 +95716,7 @@ __vue_render__$w._withStripped = true;
95716
95716
  //
95717
95717
  //
95718
95718
 
95719
- var script$t = {
95719
+ var script$v = {
95720
95720
  data() {
95721
95721
  return {
95722
95722
  levelList: null
@@ -95736,7 +95736,7 @@ var script$t = {
95736
95736
  },
95737
95737
  methods: {
95738
95738
  getIndexRouter() {
95739
- const arr = this.$store.state.permission.sidebarRouters;
95739
+ const arr = this.$store.state['z-permission'].sidebarRouters;
95740
95740
  const rootItem = arr.find((item) => {
95741
95741
  return (item.path === '' || item.path === '/') && item.redirect
95742
95742
  });
@@ -95771,10 +95771,10 @@ var script$t = {
95771
95771
  };
95772
95772
 
95773
95773
  /* script */
95774
- const __vue_script__$t = script$t;
95774
+ const __vue_script__$v = script$v;
95775
95775
 
95776
95776
  /* template */
95777
- var __vue_render__$v = function () {
95777
+ var __vue_render__$x = function () {
95778
95778
  var _vm = this;
95779
95779
  var _h = _vm.$createElement;
95780
95780
  var _c = _vm._self._c || _h;
@@ -95818,34 +95818,34 @@ var __vue_render__$v = function () {
95818
95818
  1
95819
95819
  )
95820
95820
  };
95821
- var __vue_staticRenderFns__$v = [];
95822
- __vue_render__$v._withStripped = true;
95821
+ var __vue_staticRenderFns__$x = [];
95822
+ __vue_render__$x._withStripped = true;
95823
95823
 
95824
95824
  /* style */
95825
- const __vue_inject_styles__$v = function (inject) {
95825
+ const __vue_inject_styles__$x = function (inject) {
95826
95826
  if (!inject) return
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 });
95827
+ inject("data-v-5878a65c_0", { source: ".app-breadcrumb.el-breadcrumb[data-v-5878a65c] {\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-5878a65c] {\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['z-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 });
95828
95828
 
95829
95829
  };
95830
95830
  /* scoped */
95831
- const __vue_scope_id__$v = "data-v-3c331f27";
95831
+ const __vue_scope_id__$x = "data-v-5878a65c";
95832
95832
  /* module identifier */
95833
- const __vue_module_identifier__$v = undefined;
95833
+ const __vue_module_identifier__$x = undefined;
95834
95834
  /* functional template */
95835
- const __vue_is_functional_template__$v = false;
95835
+ const __vue_is_functional_template__$x = false;
95836
95836
  /* style inject SSR */
95837
95837
 
95838
95838
  /* style inject shadow dom */
95839
95839
 
95840
95840
 
95841
95841
 
95842
- const __vue_component__$v = /*#__PURE__*/__vue_normalize__(
95843
- { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
95844
- __vue_inject_styles__$v,
95845
- __vue_script__$t,
95846
- __vue_scope_id__$v,
95847
- __vue_is_functional_template__$v,
95848
- __vue_module_identifier__$v,
95842
+ const __vue_component__$x = /*#__PURE__*/__vue_normalize__(
95843
+ { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
95844
+ __vue_inject_styles__$x,
95845
+ __vue_script__$v,
95846
+ __vue_scope_id__$x,
95847
+ __vue_is_functional_template__$x,
95848
+ __vue_module_identifier__$x,
95849
95849
  false,
95850
95850
  __vue_create_injector__,
95851
95851
  undefined,
@@ -95879,7 +95879,7 @@ __vue_render__$v._withStripped = true;
95879
95879
  // 隐藏侧边栏路由
95880
95880
  const hideList = ['/index', '/user/profile'];
95881
95881
 
95882
- var script$s = {
95882
+ var script$u = {
95883
95883
  data() {
95884
95884
  return {
95885
95885
  // 顶部栏初始数
@@ -95890,7 +95890,7 @@ var script$s = {
95890
95890
  },
95891
95891
  computed: {
95892
95892
  theme() {
95893
- return this.$store.state.settings.theme
95893
+ return this.$store.state['z-settings'].theme
95894
95894
  },
95895
95895
  // 顶部显示菜单
95896
95896
  topMenus() {
@@ -95909,7 +95909,7 @@ var script$s = {
95909
95909
  },
95910
95910
  // 所有的路由信息
95911
95911
  routers() {
95912
- return this.$store.state.permission.topbarRouters
95912
+ return this.$store.state['z-permission'].topbarRouters
95913
95913
  },
95914
95914
  // 设置子路由
95915
95915
  childrenMenus() {
@@ -95939,11 +95939,11 @@ var script$s = {
95939
95939
  const tmpPath = path.substring(1, path.length);
95940
95940
  activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/'));
95941
95941
  if (!this.$route.meta.link) {
95942
- this.$store.dispatch('app/toggleSideBarHide', false);
95942
+ this.$store.dispatch('z-app/toggleSideBarHide', false);
95943
95943
  }
95944
95944
  } else if (!this.$route.children) {
95945
95945
  activePath = path;
95946
- this.$store.dispatch('app/toggleSideBarHide', true);
95946
+ this.$store.dispatch('z-app/toggleSideBarHide', true);
95947
95947
  }
95948
95948
  this.activeRoutes(activePath);
95949
95949
  return activePath
@@ -95980,11 +95980,11 @@ var script$s = {
95980
95980
  } else {
95981
95981
  this.$router.push({ path: key });
95982
95982
  }
95983
- this.$store.dispatch('app/toggleSideBarHide', true);
95983
+ this.$store.dispatch('z-app/toggleSideBarHide', true);
95984
95984
  } else {
95985
95985
  // 显示左侧联动菜单
95986
95986
  this.activeRoutes(key);
95987
- this.$store.dispatch('app/toggleSideBarHide', false);
95987
+ this.$store.dispatch('z-app/toggleSideBarHide', false);
95988
95988
  }
95989
95989
  },
95990
95990
  // 当前激活的路由
@@ -96000,7 +96000,7 @@ var script$s = {
96000
96000
  if (routes.length > 0) {
96001
96001
  this.$store.commit('SET_SIDEBAR_ROUTERS', routes);
96002
96002
  } else {
96003
- this.$store.dispatch('app/toggleSideBarHide', true);
96003
+ this.$store.dispatch('z-app/toggleSideBarHide', true);
96004
96004
  }
96005
96005
  },
96006
96006
  ishttp(url) {
@@ -96010,10 +96010,10 @@ var script$s = {
96010
96010
  };
96011
96011
 
96012
96012
  /* script */
96013
- const __vue_script__$s = script$s;
96013
+ const __vue_script__$u = script$u;
96014
96014
 
96015
96015
  /* template */
96016
- var __vue_render__$u = function () {
96016
+ var __vue_render__$w = function () {
96017
96017
  var _vm = this;
96018
96018
  var _h = _vm.$createElement;
96019
96019
  var _c = _vm._self._c || _h;
@@ -96066,34 +96066,34 @@ var __vue_render__$u = function () {
96066
96066
  2
96067
96067
  )
96068
96068
  };
96069
- var __vue_staticRenderFns__$u = [];
96070
- __vue_render__$u._withStripped = true;
96069
+ var __vue_staticRenderFns__$w = [];
96070
+ __vue_render__$w._withStripped = true;
96071
96071
 
96072
96072
  /* style */
96073
- const __vue_inject_styles__$u = function (inject) {
96073
+ const __vue_inject_styles__$w = function (inject) {
96074
96074
  if (!inject) return
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 });
96075
+ inject("data-v-7562f229_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['z-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['z-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('z-app/toggleSideBarHide', false)\n }\n } else if (!this.$route.children) {\n activePath = path\n this.$store.dispatch('z-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('z-app/toggleSideBarHide', true)\n } else {\n // 显示左侧联动菜单\n this.activeRoutes(key)\n this.$store.dispatch('z-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('z-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 });
96076
96076
 
96077
96077
  };
96078
96078
  /* scoped */
96079
- const __vue_scope_id__$u = undefined;
96079
+ const __vue_scope_id__$w = undefined;
96080
96080
  /* module identifier */
96081
- const __vue_module_identifier__$u = undefined;
96081
+ const __vue_module_identifier__$w = undefined;
96082
96082
  /* functional template */
96083
- const __vue_is_functional_template__$u = false;
96083
+ const __vue_is_functional_template__$w = false;
96084
96084
  /* style inject SSR */
96085
96085
 
96086
96086
  /* style inject shadow dom */
96087
96087
 
96088
96088
 
96089
96089
 
96090
- const __vue_component__$u = /*#__PURE__*/__vue_normalize__(
96091
- { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
96092
- __vue_inject_styles__$u,
96093
- __vue_script__$s,
96094
- __vue_scope_id__$u,
96095
- __vue_is_functional_template__$u,
96096
- __vue_module_identifier__$u,
96090
+ const __vue_component__$w = /*#__PURE__*/__vue_normalize__(
96091
+ { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
96092
+ __vue_inject_styles__$w,
96093
+ __vue_script__$u,
96094
+ __vue_scope_id__$w,
96095
+ __vue_is_functional_template__$w,
96096
+ __vue_module_identifier__$w,
96097
96097
  false,
96098
96098
  __vue_create_injector__,
96099
96099
  undefined,
@@ -96116,7 +96116,7 @@ __vue_render__$u._withStripped = true;
96116
96116
  //
96117
96117
  //
96118
96118
 
96119
- var script$r = {
96119
+ var script$t = {
96120
96120
  name: 'Hamburger',
96121
96121
  props: {
96122
96122
  isActive: {
@@ -96132,10 +96132,10 @@ var script$r = {
96132
96132
  };
96133
96133
 
96134
96134
  /* script */
96135
- const __vue_script__$r = script$r;
96135
+ const __vue_script__$t = script$t;
96136
96136
 
96137
96137
  /* template */
96138
- var __vue_render__$t = function () {
96138
+ var __vue_render__$v = function () {
96139
96139
  var _vm = this;
96140
96140
  var _h = _vm.$createElement;
96141
96141
  var _c = _vm._self._c || _h;
@@ -96166,34 +96166,34 @@ var __vue_render__$t = function () {
96166
96166
  ]
96167
96167
  )
96168
96168
  };
96169
- var __vue_staticRenderFns__$t = [];
96170
- __vue_render__$t._withStripped = true;
96169
+ var __vue_staticRenderFns__$v = [];
96170
+ __vue_render__$v._withStripped = true;
96171
96171
 
96172
96172
  /* style */
96173
- const __vue_inject_styles__$t = function (inject) {
96173
+ const __vue_inject_styles__$v = function (inject) {
96174
96174
  if (!inject) return
96175
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 });
96176
96176
 
96177
96177
  };
96178
96178
  /* scoped */
96179
- const __vue_scope_id__$t = "data-v-3b0f2894";
96179
+ const __vue_scope_id__$v = "data-v-3b0f2894";
96180
96180
  /* module identifier */
96181
- const __vue_module_identifier__$t = undefined;
96181
+ const __vue_module_identifier__$v = undefined;
96182
96182
  /* functional template */
96183
- const __vue_is_functional_template__$t = false;
96183
+ const __vue_is_functional_template__$v = false;
96184
96184
  /* style inject SSR */
96185
96185
 
96186
96186
  /* style inject shadow dom */
96187
96187
 
96188
96188
 
96189
96189
 
96190
- const __vue_component__$t = /*#__PURE__*/__vue_normalize__(
96191
- { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
96192
- __vue_inject_styles__$t,
96193
- __vue_script__$r,
96194
- __vue_scope_id__$t,
96195
- __vue_is_functional_template__$t,
96196
- __vue_module_identifier__$t,
96190
+ const __vue_component__$v = /*#__PURE__*/__vue_normalize__(
96191
+ { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
96192
+ __vue_inject_styles__$v,
96193
+ __vue_script__$t,
96194
+ __vue_scope_id__$v,
96195
+ __vue_is_functional_template__$v,
96196
+ __vue_module_identifier__$v,
96197
96197
  false,
96198
96198
  __vue_create_injector__,
96199
96199
  undefined,
@@ -96203,23 +96203,23 @@ __vue_render__$t._withStripped = true;
96203
96203
  /* script */
96204
96204
 
96205
96205
  /* template */
96206
- var __vue_render__$s = function () {
96206
+ var __vue_render__$u = function () {
96207
96207
  var _vm = this;
96208
96208
  var _h = _vm.$createElement;
96209
96209
  var _c = _vm._self._c || _h;
96210
96210
  return _c("div", [_vm._v("全屏")])
96211
96211
  };
96212
- var __vue_staticRenderFns__$s = [];
96213
- __vue_render__$s._withStripped = true;
96212
+ var __vue_staticRenderFns__$u = [];
96213
+ __vue_render__$u._withStripped = true;
96214
96214
 
96215
96215
  /* style */
96216
- const __vue_inject_styles__$s = undefined;
96216
+ const __vue_inject_styles__$u = undefined;
96217
96217
  /* scoped */
96218
- const __vue_scope_id__$s = undefined;
96218
+ const __vue_scope_id__$u = undefined;
96219
96219
  /* module identifier */
96220
- const __vue_module_identifier__$s = undefined;
96220
+ const __vue_module_identifier__$u = undefined;
96221
96221
  /* functional template */
96222
- const __vue_is_functional_template__$s = false;
96222
+ const __vue_is_functional_template__$u = false;
96223
96223
  /* style inject */
96224
96224
 
96225
96225
  /* style inject SSR */
@@ -96228,13 +96228,13 @@ __vue_render__$s._withStripped = true;
96228
96228
 
96229
96229
 
96230
96230
 
96231
- const __vue_component__$s = /*#__PURE__*/__vue_normalize__(
96232
- { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
96233
- __vue_inject_styles__$s,
96231
+ const __vue_component__$u = /*#__PURE__*/__vue_normalize__(
96232
+ { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
96233
+ __vue_inject_styles__$u,
96234
96234
  {},
96235
- __vue_scope_id__$s,
96236
- __vue_is_functional_template__$s,
96237
- __vue_module_identifier__$s,
96235
+ __vue_scope_id__$u,
96236
+ __vue_is_functional_template__$u,
96237
+ __vue_module_identifier__$u,
96238
96238
  false,
96239
96239
  undefined,
96240
96240
  undefined,
@@ -96255,7 +96255,7 @@ __vue_render__$s._withStripped = true;
96255
96255
  //
96256
96256
  //
96257
96257
 
96258
- var script$q = {
96258
+ var script$s = {
96259
96259
  data() {
96260
96260
  return {
96261
96261
  sizeOptions: [
@@ -96274,7 +96274,7 @@ var script$q = {
96274
96274
  methods: {
96275
96275
  handleSetSize(size) {
96276
96276
  this.$ELEMENT.size = size;
96277
- this.$store.dispatch('app/setSize', size);
96277
+ this.$store.dispatch('z-app/setSize', size);
96278
96278
  this.refreshView();
96279
96279
  this.$message({
96280
96280
  message: 'Switch Size Success',
@@ -96283,7 +96283,7 @@ var script$q = {
96283
96283
  },
96284
96284
  refreshView() {
96285
96285
  // In order to make the cached page re-rendered
96286
- this.$store.dispatch('tagsView/delAllCachedViews', this.$route);
96286
+ this.$store.dispatch('z-tagsView/delAllCachedViews', this.$route);
96287
96287
 
96288
96288
  const { fullPath } = this.$route;
96289
96289
 
@@ -96297,10 +96297,10 @@ var script$q = {
96297
96297
  };
96298
96298
 
96299
96299
  /* script */
96300
- const __vue_script__$q = script$q;
96300
+ const __vue_script__$s = script$s;
96301
96301
 
96302
96302
  /* template */
96303
- var __vue_render__$r = function () {
96303
+ var __vue_render__$t = function () {
96304
96304
  var _vm = this;
96305
96305
  var _h = _vm.$createElement;
96306
96306
  var _c = _vm._self._c || _h;
@@ -96329,17 +96329,17 @@ var __vue_render__$r = function () {
96329
96329
  1
96330
96330
  )
96331
96331
  };
96332
- var __vue_staticRenderFns__$r = [];
96333
- __vue_render__$r._withStripped = true;
96332
+ var __vue_staticRenderFns__$t = [];
96333
+ __vue_render__$t._withStripped = true;
96334
96334
 
96335
96335
  /* style */
96336
- const __vue_inject_styles__$r = undefined;
96336
+ const __vue_inject_styles__$t = undefined;
96337
96337
  /* scoped */
96338
- const __vue_scope_id__$r = undefined;
96338
+ const __vue_scope_id__$t = undefined;
96339
96339
  /* module identifier */
96340
- const __vue_module_identifier__$r = undefined;
96340
+ const __vue_module_identifier__$t = undefined;
96341
96341
  /* functional template */
96342
- const __vue_is_functional_template__$r = false;
96342
+ const __vue_is_functional_template__$t = false;
96343
96343
  /* style inject */
96344
96344
 
96345
96345
  /* style inject SSR */
@@ -96348,13 +96348,13 @@ __vue_render__$r._withStripped = true;
96348
96348
 
96349
96349
 
96350
96350
 
96351
- const __vue_component__$r = /*#__PURE__*/__vue_normalize__(
96352
- { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
96353
- __vue_inject_styles__$r,
96354
- __vue_script__$q,
96355
- __vue_scope_id__$r,
96356
- __vue_is_functional_template__$r,
96357
- __vue_module_identifier__$r,
96351
+ const __vue_component__$t = /*#__PURE__*/__vue_normalize__(
96352
+ { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
96353
+ __vue_inject_styles__$t,
96354
+ __vue_script__$s,
96355
+ __vue_scope_id__$t,
96356
+ __vue_is_functional_template__$t,
96357
+ __vue_module_identifier__$t,
96358
96358
  false,
96359
96359
  undefined,
96360
96360
  undefined,
@@ -96400,7 +96400,7 @@ var Fuse = /*@__PURE__*/getDefaultExportFromCjs(fuse_minExports);
96400
96400
  //
96401
96401
 
96402
96402
 
96403
- var script$p = {
96403
+ var script$r = {
96404
96404
  name: 'HeaderSearch',
96405
96405
  data() {
96406
96406
  return {
@@ -96413,7 +96413,7 @@ var script$p = {
96413
96413
  },
96414
96414
  computed: {
96415
96415
  routes() {
96416
- return this.$store.state.permission.routes
96416
+ return this.$store.state['z-permission'].routes
96417
96417
  }
96418
96418
  },
96419
96419
  watch: {
@@ -96530,10 +96530,10 @@ var script$p = {
96530
96530
  };
96531
96531
 
96532
96532
  /* script */
96533
- const __vue_script__$p = script$p;
96533
+ const __vue_script__$r = script$r;
96534
96534
 
96535
96535
  /* template */
96536
- var __vue_render__$q = function () {
96536
+ var __vue_render__$s = function () {
96537
96537
  var _vm = this;
96538
96538
  var _h = _vm.$createElement;
96539
96539
  var _c = _vm._self._c || _h;
@@ -96574,34 +96574,34 @@ var __vue_render__$q = function () {
96574
96574
  1
96575
96575
  )
96576
96576
  };
96577
- var __vue_staticRenderFns__$q = [];
96578
- __vue_render__$q._withStripped = true;
96577
+ var __vue_staticRenderFns__$s = [];
96578
+ __vue_render__$s._withStripped = true;
96579
96579
 
96580
96580
  /* style */
96581
- const __vue_inject_styles__$q = function (inject) {
96581
+ const __vue_inject_styles__$s = function (inject) {
96582
96582
  if (!inject) return
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 });
96583
+ inject("data-v-b6965cc4_0", { source: ".header-search[data-v-b6965cc4] {\n font-size: 0 !important;\n}\n.header-search .search-icon[data-v-b6965cc4] {\n cursor: pointer;\n font-size: 18px;\n vertical-align: middle;\n}\n.header-search .header-search-select[data-v-b6965cc4] {\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-b6965cc4] .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-b6965cc4] {\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['z-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 });
96584
96584
 
96585
96585
  };
96586
96586
  /* scoped */
96587
- const __vue_scope_id__$q = "data-v-37c87e35";
96587
+ const __vue_scope_id__$s = "data-v-b6965cc4";
96588
96588
  /* module identifier */
96589
- const __vue_module_identifier__$q = undefined;
96589
+ const __vue_module_identifier__$s = undefined;
96590
96590
  /* functional template */
96591
- const __vue_is_functional_template__$q = false;
96591
+ const __vue_is_functional_template__$s = false;
96592
96592
  /* style inject SSR */
96593
96593
 
96594
96594
  /* style inject shadow dom */
96595
96595
 
96596
96596
 
96597
96597
 
96598
- const __vue_component__$q = /*#__PURE__*/__vue_normalize__(
96599
- { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
96600
- __vue_inject_styles__$q,
96601
- __vue_script__$p,
96602
- __vue_scope_id__$q,
96603
- __vue_is_functional_template__$q,
96604
- __vue_module_identifier__$q,
96598
+ const __vue_component__$s = /*#__PURE__*/__vue_normalize__(
96599
+ { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
96600
+ __vue_inject_styles__$s,
96601
+ __vue_script__$r,
96602
+ __vue_scope_id__$s,
96603
+ __vue_is_functional_template__$s,
96604
+ __vue_module_identifier__$s,
96605
96605
  false,
96606
96606
  __vue_create_injector__,
96607
96607
  undefined,
@@ -96649,24 +96649,24 @@ __vue_render__$q._withStripped = true;
96649
96649
  //
96650
96650
 
96651
96651
 
96652
- var script$o = {
96652
+ var script$q = {
96653
96653
  components: {
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
96654
+ Breadcrumb: __vue_component__$x,
96655
+ TopNav: __vue_component__$w,
96656
+ Hamburger: __vue_component__$v,
96657
+ Screenfull: __vue_component__$u,
96658
+ SizeSelect: __vue_component__$t,
96659
+ Search: __vue_component__$s
96660
96660
  },
96661
96661
  computed: {
96662
- ...mapState('app', ['sidebar', 'device']),
96663
- ...mapState('user', ['avatar']),
96662
+ ...mapState('z-app', ['sidebar', 'device']),
96663
+ ...mapState('z-user', ['avatar']),
96664
96664
  setting: {
96665
96665
  get() {
96666
- return this.$store.state.settings.showSettings
96666
+ return this.$store.state['z-settings'].showSettings
96667
96667
  },
96668
96668
  set(val) {
96669
- this.$store.dispatch('settings/changeSetting', {
96669
+ this.$store.dispatch('z-settings/changeSetting', {
96670
96670
  key: 'showSettings',
96671
96671
  value: val
96672
96672
  });
@@ -96674,13 +96674,13 @@ var script$o = {
96674
96674
  },
96675
96675
  topNav: {
96676
96676
  get() {
96677
- return this.$store.state.settings.topNav
96677
+ return this.$store.state['z-settings'].topNav
96678
96678
  }
96679
96679
  }
96680
96680
  },
96681
96681
  methods: {
96682
96682
  toggleSideBar() {
96683
- this.$store.dispatch('app/toggleSideBar');
96683
+ this.$store.dispatch('z-app/toggleSideBar');
96684
96684
  },
96685
96685
  async logout() {
96686
96686
  this.$confirm('确定注销并退出系统吗?', '提示', {
@@ -96699,10 +96699,10 @@ var script$o = {
96699
96699
  };
96700
96700
 
96701
96701
  /* script */
96702
- const __vue_script__$o = script$o;
96702
+ const __vue_script__$q = script$q;
96703
96703
 
96704
96704
  /* template */
96705
- var __vue_render__$p = function () {
96705
+ var __vue_render__$r = function () {
96706
96706
  var _vm = this;
96707
96707
  var _h = _vm.$createElement;
96708
96708
  var _c = _vm._self._c || _h;
@@ -96772,34 +96772,34 @@ var __vue_render__$p = function () {
96772
96772
  1
96773
96773
  )
96774
96774
  };
96775
- var __vue_staticRenderFns__$p = [];
96776
- __vue_render__$p._withStripped = true;
96775
+ var __vue_staticRenderFns__$r = [];
96776
+ __vue_render__$r._withStripped = true;
96777
96777
 
96778
96778
  /* style */
96779
- const __vue_inject_styles__$p = function (inject) {
96779
+ const __vue_inject_styles__$r = function (inject) {
96780
96780
  if (!inject) return
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 });
96781
+ inject("data-v-4f3f513a_0", { source: ".navbar[data-v-4f3f513a] {\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-4f3f513a] {\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-4f3f513a]:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.navbar .breadcrumb-container[data-v-4f3f513a] {\n float: left;\n}\n.navbar .topmenu-container[data-v-4f3f513a] {\n position: absolute;\n left: 50px;\n}\n.navbar .errLog-container[data-v-4f3f513a] {\n display: inline-block;\n vertical-align: top;\n}\n.navbar .right-menu[data-v-4f3f513a] {\n float: right;\n height: 100%;\n line-height: 50px;\n}\n.navbar .right-menu[data-v-4f3f513a]:focus {\n outline: none;\n}\n.navbar .right-menu .right-menu-item[data-v-4f3f513a] {\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-4f3f513a] {\n cursor: pointer;\n transition: background 0.3s;\n}\n.navbar .right-menu .right-menu-item.hover-effect[data-v-4f3f513a]:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.navbar .right-menu .avatar-container[data-v-4f3f513a] {\n margin-right: 30px;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper[data-v-4f3f513a] {\n margin-top: 5px;\n position: relative;\n}\n.navbar .right-menu .avatar-container .avatar-wrapper .user-avatar[data-v-4f3f513a] {\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-4f3f513a] {\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('z-app', ['sidebar', 'device']),\r\n ...mapState('z-user', ['avatar']),\r\n setting: {\r\n get() {\r\n return this.$store.state['z-settings'].showSettings\r\n },\r\n set(val) {\r\n this.$store.dispatch('z-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['z-settings'].topNav\r\n }\r\n }\r\n },\r\n methods: {\r\n toggleSideBar() {\r\n this.$store.dispatch('z-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 });
96782
96782
 
96783
96783
  };
96784
96784
  /* scoped */
96785
- const __vue_scope_id__$p = "data-v-8fbc56cc";
96785
+ const __vue_scope_id__$r = "data-v-4f3f513a";
96786
96786
  /* module identifier */
96787
- const __vue_module_identifier__$p = undefined;
96787
+ const __vue_module_identifier__$r = undefined;
96788
96788
  /* functional template */
96789
- const __vue_is_functional_template__$p = false;
96789
+ const __vue_is_functional_template__$r = false;
96790
96790
  /* style inject SSR */
96791
96791
 
96792
96792
  /* style inject shadow dom */
96793
96793
 
96794
96794
 
96795
96795
 
96796
- const __vue_component__$p = /*#__PURE__*/__vue_normalize__(
96797
- { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
96798
- __vue_inject_styles__$p,
96799
- __vue_script__$o,
96800
- __vue_scope_id__$p,
96801
- __vue_is_functional_template__$p,
96802
- __vue_module_identifier__$p,
96796
+ const __vue_component__$r = /*#__PURE__*/__vue_normalize__(
96797
+ { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
96798
+ __vue_inject_styles__$r,
96799
+ __vue_script__$q,
96800
+ __vue_scope_id__$r,
96801
+ __vue_is_functional_template__$r,
96802
+ __vue_module_identifier__$r,
96803
96803
  false,
96804
96804
  __vue_create_injector__,
96805
96805
  undefined,
@@ -96833,7 +96833,7 @@ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAA
96833
96833
  //
96834
96834
 
96835
96835
 
96836
- var script$n = {
96836
+ var script$p = {
96837
96837
  name: 'SidebarLogo',
96838
96838
  props: {
96839
96839
  collapse: {
@@ -96846,7 +96846,7 @@ var script$n = {
96846
96846
  return variables
96847
96847
  },
96848
96848
  sideTheme() {
96849
- return this.$store.state.settings.sideTheme
96849
+ return this.$store.state['z-settings'].sideTheme
96850
96850
  }
96851
96851
  },
96852
96852
  data() {
@@ -96861,10 +96861,10 @@ var script$n = {
96861
96861
  };
96862
96862
 
96863
96863
  /* script */
96864
- const __vue_script__$n = script$n;
96864
+ const __vue_script__$p = script$p;
96865
96865
 
96866
96866
  /* template */
96867
- var __vue_render__$o = function () {
96867
+ var __vue_render__$q = function () {
96868
96868
  var _vm = this;
96869
96869
  var _h = _vm.$createElement;
96870
96870
  var _c = _vm._self._c || _h;
@@ -96955,34 +96955,34 @@ var __vue_render__$o = function () {
96955
96955
  1
96956
96956
  )
96957
96957
  };
96958
- var __vue_staticRenderFns__$o = [];
96959
- __vue_render__$o._withStripped = true;
96958
+ var __vue_staticRenderFns__$q = [];
96959
+ __vue_render__$q._withStripped = true;
96960
96960
 
96961
96961
  /* style */
96962
- const __vue_inject_styles__$o = function (inject) {
96962
+ const __vue_inject_styles__$q = function (inject) {
96963
96963
  if (!inject) return
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 });
96964
+ inject("data-v-183d881d_0", { source: ".sidebarLogoFade-enter-active[data-v-183d881d] {\n transition: opacity 1.5s;\n}\n.sidebarLogoFade-enter[data-v-183d881d],\n.sidebarLogoFade-leave-to[data-v-183d881d] {\n opacity: 0;\n}\n.sidebar-logo-container[data-v-183d881d] {\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-183d881d] {\n height: 100%;\n width: 100%;\n}\n.sidebar-logo-container .sidebar-logo-link .sidebar-logo[data-v-183d881d] {\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-183d881d] {\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-183d881d] {\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['z-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 });
96965
96965
 
96966
96966
  };
96967
96967
  /* scoped */
96968
- const __vue_scope_id__$o = "data-v-4d10e2a6";
96968
+ const __vue_scope_id__$q = "data-v-183d881d";
96969
96969
  /* module identifier */
96970
- const __vue_module_identifier__$o = undefined;
96970
+ const __vue_module_identifier__$q = undefined;
96971
96971
  /* functional template */
96972
- const __vue_is_functional_template__$o = false;
96972
+ const __vue_is_functional_template__$q = false;
96973
96973
  /* style inject SSR */
96974
96974
 
96975
96975
  /* style inject shadow dom */
96976
96976
 
96977
96977
 
96978
96978
 
96979
- const __vue_component__$o = /*#__PURE__*/__vue_normalize__(
96980
- { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
96981
- __vue_inject_styles__$o,
96982
- __vue_script__$n,
96983
- __vue_scope_id__$o,
96984
- __vue_is_functional_template__$o,
96985
- __vue_module_identifier__$o,
96979
+ const __vue_component__$q = /*#__PURE__*/__vue_normalize__(
96980
+ { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
96981
+ __vue_inject_styles__$q,
96982
+ __vue_script__$p,
96983
+ __vue_scope_id__$q,
96984
+ __vue_is_functional_template__$q,
96985
+ __vue_module_identifier__$q,
96986
96986
  false,
96987
96987
  __vue_create_injector__,
96988
96988
  undefined,
@@ -96996,7 +96996,7 @@ __vue_render__$o._withStripped = true;
96996
96996
  //
96997
96997
  //
96998
96998
 
96999
- var script$m = {
96999
+ var script$o = {
97000
97000
  name: 'MenuItem',
97001
97001
  props: {
97002
97002
  icon: {
@@ -97011,10 +97011,10 @@ var script$m = {
97011
97011
  };
97012
97012
 
97013
97013
  /* script */
97014
- const __vue_script__$m = script$m;
97014
+ const __vue_script__$o = script$o;
97015
97015
 
97016
97016
  /* template */
97017
- var __vue_render__$n = function () {
97017
+ var __vue_render__$p = function () {
97018
97018
  var _vm = this;
97019
97019
  var _h = _vm.$createElement;
97020
97020
  var _c = _vm._self._c || _h;
@@ -97024,17 +97024,17 @@ var __vue_render__$n = function () {
97024
97024
  ]),
97025
97025
  ])
97026
97026
  };
97027
- var __vue_staticRenderFns__$n = [];
97028
- __vue_render__$n._withStripped = true;
97027
+ var __vue_staticRenderFns__$p = [];
97028
+ __vue_render__$p._withStripped = true;
97029
97029
 
97030
97030
  /* style */
97031
- const __vue_inject_styles__$n = undefined;
97031
+ const __vue_inject_styles__$p = undefined;
97032
97032
  /* scoped */
97033
- const __vue_scope_id__$n = undefined;
97033
+ const __vue_scope_id__$p = undefined;
97034
97034
  /* module identifier */
97035
- const __vue_module_identifier__$n = undefined;
97035
+ const __vue_module_identifier__$p = undefined;
97036
97036
  /* functional template */
97037
- const __vue_is_functional_template__$n = false;
97037
+ const __vue_is_functional_template__$p = false;
97038
97038
  /* style inject */
97039
97039
 
97040
97040
  /* style inject SSR */
@@ -97043,13 +97043,13 @@ __vue_render__$n._withStripped = true;
97043
97043
 
97044
97044
 
97045
97045
 
97046
- const __vue_component__$n = /*#__PURE__*/__vue_normalize__(
97047
- { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
97048
- __vue_inject_styles__$n,
97049
- __vue_script__$m,
97050
- __vue_scope_id__$n,
97051
- __vue_is_functional_template__$n,
97052
- __vue_module_identifier__$n,
97046
+ const __vue_component__$p = /*#__PURE__*/__vue_normalize__(
97047
+ { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
97048
+ __vue_inject_styles__$p,
97049
+ __vue_script__$o,
97050
+ __vue_scope_id__$p,
97051
+ __vue_is_functional_template__$p,
97052
+ __vue_module_identifier__$p,
97053
97053
  false,
97054
97054
  undefined,
97055
97055
  undefined,
@@ -97064,7 +97064,7 @@ __vue_render__$n._withStripped = true;
97064
97064
  //
97065
97065
 
97066
97066
 
97067
- var script$l = {
97067
+ var script$n = {
97068
97068
  props: {
97069
97069
  to: {
97070
97070
  type: [String, Object],
@@ -97099,10 +97099,10 @@ var script$l = {
97099
97099
  };
97100
97100
 
97101
97101
  /* script */
97102
- const __vue_script__$l = script$l;
97102
+ const __vue_script__$n = script$n;
97103
97103
 
97104
97104
  /* template */
97105
- var __vue_render__$m = function () {
97105
+ var __vue_render__$o = function () {
97106
97106
  var _vm = this;
97107
97107
  var _h = _vm.$createElement;
97108
97108
  var _c = _vm._self._c || _h;
@@ -97113,17 +97113,17 @@ var __vue_render__$m = function () {
97113
97113
  2
97114
97114
  )
97115
97115
  };
97116
- var __vue_staticRenderFns__$m = [];
97117
- __vue_render__$m._withStripped = true;
97116
+ var __vue_staticRenderFns__$o = [];
97117
+ __vue_render__$o._withStripped = true;
97118
97118
 
97119
97119
  /* style */
97120
- const __vue_inject_styles__$m = undefined;
97120
+ const __vue_inject_styles__$o = undefined;
97121
97121
  /* scoped */
97122
- const __vue_scope_id__$m = undefined;
97122
+ const __vue_scope_id__$o = undefined;
97123
97123
  /* module identifier */
97124
- const __vue_module_identifier__$m = undefined;
97124
+ const __vue_module_identifier__$o = undefined;
97125
97125
  /* functional template */
97126
- const __vue_is_functional_template__$m = false;
97126
+ const __vue_is_functional_template__$o = false;
97127
97127
  /* style inject */
97128
97128
 
97129
97129
  /* style inject SSR */
@@ -97132,13 +97132,13 @@ __vue_render__$m._withStripped = true;
97132
97132
 
97133
97133
 
97134
97134
 
97135
- const __vue_component__$m = /*#__PURE__*/__vue_normalize__(
97136
- { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
97137
- __vue_inject_styles__$m,
97138
- __vue_script__$l,
97139
- __vue_scope_id__$m,
97140
- __vue_is_functional_template__$m,
97141
- __vue_module_identifier__$m,
97135
+ const __vue_component__$o = /*#__PURE__*/__vue_normalize__(
97136
+ { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
97137
+ __vue_inject_styles__$o,
97138
+ __vue_script__$n,
97139
+ __vue_scope_id__$o,
97140
+ __vue_is_functional_template__$o,
97141
+ __vue_module_identifier__$o,
97142
97142
  false,
97143
97143
  undefined,
97144
97144
  undefined,
@@ -97148,7 +97148,7 @@ __vue_render__$m._withStripped = true;
97148
97148
  var FixiOSBug = {
97149
97149
  computed: {
97150
97150
  device() {
97151
- return this.$store.state.app.device
97151
+ return this.$store.state['z-app'].device
97152
97152
  }
97153
97153
  },
97154
97154
  mounted() {
@@ -97199,9 +97199,9 @@ var FixiOSBug = {
97199
97199
  //
97200
97200
 
97201
97201
 
97202
- var script$k = {
97202
+ var script$m = {
97203
97203
  name: 'SidebarItem',
97204
- components: { Item: __vue_component__$n, AppLink: __vue_component__$m },
97204
+ components: { Item: __vue_component__$p, AppLink: __vue_component__$o },
97205
97205
  mixins: [FixiOSBug],
97206
97206
  props: {
97207
97207
  // route object
@@ -97267,10 +97267,10 @@ var script$k = {
97267
97267
  };
97268
97268
 
97269
97269
  /* script */
97270
- const __vue_script__$k = script$k;
97270
+ const __vue_script__$m = script$m;
97271
97271
 
97272
97272
  /* template */
97273
- var __vue_render__$l = function () {
97273
+ var __vue_render__$n = function () {
97274
97274
  var _vm = this;
97275
97275
  var _h = _vm.$createElement;
97276
97276
  var _c = _vm._self._c || _h;
@@ -97364,17 +97364,17 @@ var __vue_render__$l = function () {
97364
97364
  )
97365
97365
  : _vm._e()
97366
97366
  };
97367
- var __vue_staticRenderFns__$l = [];
97368
- __vue_render__$l._withStripped = true;
97367
+ var __vue_staticRenderFns__$n = [];
97368
+ __vue_render__$n._withStripped = true;
97369
97369
 
97370
97370
  /* style */
97371
- const __vue_inject_styles__$l = undefined;
97371
+ const __vue_inject_styles__$n = undefined;
97372
97372
  /* scoped */
97373
- const __vue_scope_id__$l = undefined;
97373
+ const __vue_scope_id__$n = undefined;
97374
97374
  /* module identifier */
97375
- const __vue_module_identifier__$l = undefined;
97375
+ const __vue_module_identifier__$n = undefined;
97376
97376
  /* functional template */
97377
- const __vue_is_functional_template__$l = false;
97377
+ const __vue_is_functional_template__$n = false;
97378
97378
  /* style inject */
97379
97379
 
97380
97380
  /* style inject SSR */
@@ -97383,13 +97383,13 @@ __vue_render__$l._withStripped = true;
97383
97383
 
97384
97384
 
97385
97385
 
97386
- const __vue_component__$l = /*#__PURE__*/__vue_normalize__(
97387
- { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
97388
- __vue_inject_styles__$l,
97389
- __vue_script__$k,
97390
- __vue_scope_id__$l,
97391
- __vue_is_functional_template__$l,
97392
- __vue_module_identifier__$l,
97386
+ const __vue_component__$n = /*#__PURE__*/__vue_normalize__(
97387
+ { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
97388
+ __vue_inject_styles__$n,
97389
+ __vue_script__$m,
97390
+ __vue_scope_id__$n,
97391
+ __vue_is_functional_template__$n,
97392
+ __vue_module_identifier__$n,
97393
97393
  false,
97394
97394
  undefined,
97395
97395
  undefined,
@@ -97421,12 +97421,12 @@ __vue_render__$l._withStripped = true;
97421
97421
  //
97422
97422
 
97423
97423
 
97424
- var script$j = {
97425
- components: { SidebarItem: __vue_component__$l, Logo: __vue_component__$o },
97424
+ var script$l = {
97425
+ components: { SidebarItem: __vue_component__$n, Logo: __vue_component__$q },
97426
97426
  computed: {
97427
- ...mapState(['settings']),
97428
- ...mapState('app', ['sidebar']),
97429
- ...mapState('permission', ['sidebarRouters']),
97427
+ ...mapState(['z-settings']),
97428
+ ...mapState('z-app', ['sidebar']),
97429
+ ...mapState('z-permission', ['sidebarRouters']),
97430
97430
  activeMenu() {
97431
97431
  const route = this.$route;
97432
97432
  const { meta, path } = route;
@@ -97437,7 +97437,7 @@ var script$j = {
97437
97437
  return path
97438
97438
  },
97439
97439
  showLogo() {
97440
- return this.$store.state.settings.sidebarLogo
97440
+ return this.$store.state['z-settings'].sidebarLogo
97441
97441
  },
97442
97442
  variables() {
97443
97443
  return variables
@@ -97450,10 +97450,10 @@ var script$j = {
97450
97450
  };
97451
97451
 
97452
97452
  /* script */
97453
- const __vue_script__$j = script$j;
97453
+ const __vue_script__$l = script$l;
97454
97454
 
97455
97455
  /* template */
97456
- var __vue_render__$k = function () {
97456
+ var __vue_render__$m = function () {
97457
97457
  var _vm = this;
97458
97458
  var _h = _vm.$createElement;
97459
97459
  var _c = _vm._self._c || _h;
@@ -97463,7 +97463,7 @@ var __vue_render__$k = function () {
97463
97463
  class: { "has-logo": _vm.showLogo },
97464
97464
  style: {
97465
97465
  backgroundColor:
97466
- _vm.settings.sideTheme === "theme-dark"
97466
+ this["z-settings"].sideTheme === "theme-dark"
97467
97467
  ? _vm.variables.menuBackground
97468
97468
  : _vm.variables.menuLightBackground,
97469
97469
  },
@@ -97476,7 +97476,7 @@ var __vue_render__$k = function () {
97476
97476
  _c(
97477
97477
  "el-scrollbar",
97478
97478
  {
97479
- class: _vm.settings.sideTheme,
97479
+ class: this["z-settings"].sideTheme,
97480
97480
  attrs: { "wrap-class": "scrollbar-wrapper" },
97481
97481
  },
97482
97482
  [
@@ -97487,15 +97487,15 @@ var __vue_render__$k = function () {
97487
97487
  "default-active": _vm.activeMenu,
97488
97488
  collapse: _vm.isCollapse,
97489
97489
  "background-color":
97490
- _vm.settings.sideTheme === "theme-dark"
97490
+ this["z-settings"].sideTheme === "theme-dark"
97491
97491
  ? _vm.variables.menuBackground
97492
97492
  : _vm.variables.menuLightBackground,
97493
97493
  "text-color":
97494
- _vm.settings.sideTheme === "theme-dark"
97494
+ this["z-settings"].sideTheme === "theme-dark"
97495
97495
  ? _vm.variables.menuColor
97496
97496
  : _vm.variables.menuLightColor,
97497
97497
  "unique-opened": true,
97498
- "active-text-color": _vm.settings.theme,
97498
+ "active-text-color": this["z-settings"].theme,
97499
97499
  "collapse-transition": false,
97500
97500
  mode: "vertical",
97501
97501
  },
@@ -97515,19 +97515,582 @@ var __vue_render__$k = function () {
97515
97515
  1
97516
97516
  )
97517
97517
  };
97518
+ var __vue_staticRenderFns__$m = [];
97519
+ __vue_render__$m._withStripped = true;
97520
+
97521
+ /* style */
97522
+ const __vue_inject_styles__$m = undefined;
97523
+ /* scoped */
97524
+ const __vue_scope_id__$m = undefined;
97525
+ /* module identifier */
97526
+ const __vue_module_identifier__$m = undefined;
97527
+ /* functional template */
97528
+ const __vue_is_functional_template__$m = false;
97529
+ /* style inject */
97530
+
97531
+ /* style inject SSR */
97532
+
97533
+ /* style inject shadow dom */
97534
+
97535
+
97536
+
97537
+ const __vue_component__$m = /*#__PURE__*/__vue_normalize__(
97538
+ { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
97539
+ __vue_inject_styles__$m,
97540
+ __vue_script__$l,
97541
+ __vue_scope_id__$m,
97542
+ __vue_is_functional_template__$m,
97543
+ __vue_module_identifier__$m,
97544
+ false,
97545
+ undefined,
97546
+ undefined,
97547
+ undefined
97548
+ );
97549
+
97550
+ //
97551
+ //
97552
+ //
97553
+ //
97554
+ //
97555
+ //
97556
+
97557
+ const tagAndTagSpacing = 4; // tagAndTagSpacing
97558
+
97559
+ var script$k = {
97560
+ name: 'ScrollPane',
97561
+ data() {
97562
+ return {
97563
+ left: 0
97564
+ }
97565
+ },
97566
+ computed: {
97567
+ scrollWrapper() {
97568
+ return this.$refs.scrollContainer.$refs.wrap
97569
+ }
97570
+ },
97571
+ mounted() {
97572
+ this.scrollWrapper.addEventListener('scroll', this.emitScroll, true);
97573
+ },
97574
+ beforeDestroy() {
97575
+ this.scrollWrapper.removeEventListener('scroll', this.emitScroll);
97576
+ },
97577
+ methods: {
97578
+ handleScroll(e) {
97579
+ const eventDelta = e.wheelDelta || -e.deltaY * 40;
97580
+ const $scrollWrapper = this.scrollWrapper;
97581
+ $scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4;
97582
+ },
97583
+ emitScroll() {
97584
+ this.$emit('scroll');
97585
+ },
97586
+ moveToTarget(currentTag) {
97587
+ const $container = this.$refs.scrollContainer.$el;
97588
+ const $containerWidth = $container.offsetWidth;
97589
+ const $scrollWrapper = this.scrollWrapper;
97590
+ const tagList = this.$parent.$refs.tag;
97591
+
97592
+ let firstTag = null;
97593
+ let lastTag = null;
97594
+
97595
+ // find first tag and last tag
97596
+ if (tagList.length > 0) {
97597
+ firstTag = tagList[0];
97598
+ lastTag = tagList[tagList.length - 1];
97599
+ }
97600
+
97601
+ if (firstTag === currentTag) {
97602
+ $scrollWrapper.scrollLeft = 0;
97603
+ } else if (lastTag === currentTag) {
97604
+ $scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth;
97605
+ } else {
97606
+ // find preTag and nextTag
97607
+ const currentIndex = tagList.findIndex(item => item === currentTag);
97608
+ const prevTag = tagList[currentIndex - 1];
97609
+ const nextTag = tagList[currentIndex + 1];
97610
+
97611
+ // the tag's offsetLeft after of nextTag
97612
+ const afterNextTagOffsetLeft = nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing;
97613
+
97614
+ // the tag's offsetLeft before of prevTag
97615
+ const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing;
97616
+
97617
+ if (afterNextTagOffsetLeft > $scrollWrapper.scrollLeft + $containerWidth) {
97618
+ $scrollWrapper.scrollLeft = afterNextTagOffsetLeft - $containerWidth;
97619
+ } else if (beforePrevTagOffsetLeft < $scrollWrapper.scrollLeft) {
97620
+ $scrollWrapper.scrollLeft = beforePrevTagOffsetLeft;
97621
+ }
97622
+ }
97623
+ }
97624
+ }
97625
+ };
97626
+
97627
+ /* script */
97628
+ const __vue_script__$k = script$k;
97629
+
97630
+ /* template */
97631
+ var __vue_render__$l = function () {
97632
+ var _vm = this;
97633
+ var _h = _vm.$createElement;
97634
+ var _c = _vm._self._c || _h;
97635
+ return _c(
97636
+ "el-scrollbar",
97637
+ {
97638
+ ref: "scrollContainer",
97639
+ staticClass: "scroll-container",
97640
+ attrs: { vertical: false },
97641
+ nativeOn: {
97642
+ wheel: function ($event) {
97643
+ $event.preventDefault();
97644
+ return _vm.handleScroll.apply(null, arguments)
97645
+ },
97646
+ },
97647
+ },
97648
+ [_vm._t("default")],
97649
+ 2
97650
+ )
97651
+ };
97652
+ var __vue_staticRenderFns__$l = [];
97653
+ __vue_render__$l._withStripped = true;
97654
+
97655
+ /* style */
97656
+ const __vue_inject_styles__$l = function (inject) {
97657
+ if (!inject) return
97658
+ inject("data-v-083b80f3_0", { source: ".scroll-container[data-v-083b80f3] {\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.scroll-container[data-v-083b80f3] .el-scrollbar__bar {\n bottom: 0px;\n}\n.scroll-container[data-v-083b80f3] .el-scrollbar__wrap {\n height: 49px;\n}\n\n/*# sourceMappingURL=ScrollPane.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\TagsView\\ScrollPane.vue","ScrollPane.vue"],"names":[],"mappings":"AA+EA;EACA,mBAAA;EACA,kBAAA;EACA,gBAAA;EACA,WAAA;AC9EA;ADgFA;EACA,WAAA;AC9EA;ADgFA;EACA,YAAA;AC9EA;;AAEA,yCAAyC","file":"ScrollPane.vue","sourcesContent":["<template>\n <el-scrollbar ref=\"scrollContainer\" :vertical=\"false\" class=\"scroll-container\" @wheel.native.prevent=\"handleScroll\">\n <slot />\n </el-scrollbar>\n</template>\n\n<script>\nconst tagAndTagSpacing = 4 // tagAndTagSpacing\n\nexport default {\n name: 'ScrollPane',\n data() {\n return {\n left: 0\n }\n },\n computed: {\n scrollWrapper() {\n return this.$refs.scrollContainer.$refs.wrap\n }\n },\n mounted() {\n this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)\n },\n beforeDestroy() {\n this.scrollWrapper.removeEventListener('scroll', this.emitScroll)\n },\n methods: {\n handleScroll(e) {\n const eventDelta = e.wheelDelta || -e.deltaY * 40\n const $scrollWrapper = this.scrollWrapper\n $scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4\n },\n emitScroll() {\n this.$emit('scroll')\n },\n moveToTarget(currentTag) {\n const $container = this.$refs.scrollContainer.$el\n const $containerWidth = $container.offsetWidth\n const $scrollWrapper = this.scrollWrapper\n const tagList = this.$parent.$refs.tag\n\n let firstTag = null\n let lastTag = null\n\n // find first tag and last tag\n if (tagList.length > 0) {\n firstTag = tagList[0]\n lastTag = tagList[tagList.length - 1]\n }\n\n if (firstTag === currentTag) {\n $scrollWrapper.scrollLeft = 0\n } else if (lastTag === currentTag) {\n $scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth\n } else {\n // find preTag and nextTag\n const currentIndex = tagList.findIndex(item => item === currentTag)\n const prevTag = tagList[currentIndex - 1]\n const nextTag = tagList[currentIndex + 1]\n\n // the tag's offsetLeft after of nextTag\n const afterNextTagOffsetLeft = nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing\n\n // the tag's offsetLeft before of prevTag\n const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing\n\n if (afterNextTagOffsetLeft > $scrollWrapper.scrollLeft + $containerWidth) {\n $scrollWrapper.scrollLeft = afterNextTagOffsetLeft - $containerWidth\n } else if (beforePrevTagOffsetLeft < $scrollWrapper.scrollLeft) {\n $scrollWrapper.scrollLeft = beforePrevTagOffsetLeft\n }\n }\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.scroll-container {\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n width: 100%;\n ::v-deep {\n .el-scrollbar__bar {\n bottom: 0px;\n }\n .el-scrollbar__wrap {\n height: 49px;\n }\n }\n}\n</style>\n",".scroll-container {\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.scroll-container ::v-deep .el-scrollbar__bar {\n bottom: 0px;\n}\n.scroll-container ::v-deep .el-scrollbar__wrap {\n height: 49px;\n}\n\n/*# sourceMappingURL=ScrollPane.vue.map */"]}, media: undefined });
97659
+
97660
+ };
97661
+ /* scoped */
97662
+ const __vue_scope_id__$l = "data-v-083b80f3";
97663
+ /* module identifier */
97664
+ const __vue_module_identifier__$l = undefined;
97665
+ /* functional template */
97666
+ const __vue_is_functional_template__$l = false;
97667
+ /* style inject SSR */
97668
+
97669
+ /* style inject shadow dom */
97670
+
97671
+
97672
+
97673
+ const __vue_component__$l = /*#__PURE__*/__vue_normalize__(
97674
+ { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
97675
+ __vue_inject_styles__$l,
97676
+ __vue_script__$k,
97677
+ __vue_scope_id__$l,
97678
+ __vue_is_functional_template__$l,
97679
+ __vue_module_identifier__$l,
97680
+ false,
97681
+ __vue_create_injector__,
97682
+ undefined,
97683
+ undefined
97684
+ );
97685
+
97686
+ //
97687
+ //
97688
+ //
97689
+ //
97690
+ //
97691
+ //
97692
+ //
97693
+ //
97694
+ //
97695
+ //
97696
+ //
97697
+ //
97698
+ //
97699
+ //
97700
+ //
97701
+ //
97702
+ //
97703
+ //
97704
+ //
97705
+ //
97706
+ //
97707
+ //
97708
+ //
97709
+ //
97710
+ //
97711
+ //
97712
+ //
97713
+ //
97714
+ //
97715
+ //
97716
+
97717
+
97718
+ var script$j = {
97719
+ components: { ScrollPane: __vue_component__$l },
97720
+ data() {
97721
+ return {
97722
+ visible: false,
97723
+ top: 0,
97724
+ left: 0,
97725
+ selectedTag: {},
97726
+ affixTags: []
97727
+ }
97728
+ },
97729
+ computed: {
97730
+ visitedViews() {
97731
+ return this.$store.state['z-tagsView'].visitedViews
97732
+ },
97733
+ routes() {
97734
+ return this.$store.state['z-permission'].routes
97735
+ },
97736
+ theme() {
97737
+ return this.$store.state['z-settings'].theme
97738
+ }
97739
+ },
97740
+ watch: {
97741
+ $route() {
97742
+ this.addTags();
97743
+ this.moveToCurrentTag();
97744
+ },
97745
+ visible(value) {
97746
+ if (value) {
97747
+ document.body.addEventListener('click', this.closeMenu);
97748
+ } else {
97749
+ document.body.removeEventListener('click', this.closeMenu);
97750
+ }
97751
+ }
97752
+ },
97753
+ mounted() {
97754
+ this.initTags();
97755
+ this.addTags();
97756
+ },
97757
+ methods: {
97758
+ isActive(route) {
97759
+ return route.path === this.$route.path
97760
+ },
97761
+ activeStyle(tag) {
97762
+ if (!this.isActive(tag)) return {}
97763
+ return {
97764
+ 'background-color': this.theme,
97765
+ 'border-color': this.theme
97766
+ }
97767
+ },
97768
+ isAffix(tag) {
97769
+ return tag.meta && tag.meta.affix
97770
+ },
97771
+ isFirstView() {
97772
+ try {
97773
+ return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath
97774
+ } catch (err) {
97775
+ return false
97776
+ }
97777
+ },
97778
+ isLastView() {
97779
+ try {
97780
+ return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath
97781
+ } catch (err) {
97782
+ return false
97783
+ }
97784
+ },
97785
+ filterAffixTags(routes, basePath = '/') {
97786
+ let tags = [];
97787
+ routes.forEach((route) => {
97788
+ if (route.meta && route.meta.affix) {
97789
+ const tagPath = path.resolve(basePath, route.path);
97790
+ tags.push({
97791
+ fullPath: tagPath,
97792
+ path: tagPath,
97793
+ name: route.name,
97794
+ meta: { ...route.meta }
97795
+ });
97796
+ }
97797
+ if (route.children) {
97798
+ const tempTags = this.filterAffixTags(route.children, route.path);
97799
+ if (tempTags.length >= 1) {
97800
+ tags = [...tags, ...tempTags];
97801
+ }
97802
+ }
97803
+ });
97804
+ return tags
97805
+ },
97806
+ initTags() {
97807
+ const affixTags = (this.affixTags = this.filterAffixTags(this.routes));
97808
+ for (const tag of affixTags) {
97809
+ // Must have tag name
97810
+ if (tag.name) {
97811
+ this.$store.dispatch('z-tagsView/addVisitedView', tag);
97812
+ }
97813
+ }
97814
+ },
97815
+ addTags() {
97816
+ const { name } = this.$route;
97817
+ if (name) {
97818
+ this.$store.dispatch('z-tagsView/addView', this.$route);
97819
+ if (this.$route.meta.link) {
97820
+ this.$store.dispatch('z-tagsView/addIframeView', this.$route);
97821
+ }
97822
+ }
97823
+ return false
97824
+ },
97825
+ moveToCurrentTag() {
97826
+ const tags = this.$refs.tag;
97827
+ this.$nextTick(() => {
97828
+ for (const tag of tags) {
97829
+ if (tag.to.path === this.$route.path) {
97830
+ this.$refs.scrollPane.moveToTarget(tag);
97831
+ // when query is different then update
97832
+ if (tag.to.fullPath !== this.$route.fullPath) {
97833
+ this.$store.dispatch('z-tagsView/updateVisitedView', this.$route);
97834
+ }
97835
+ break
97836
+ }
97837
+ }
97838
+ });
97839
+ },
97840
+ refreshSelectedTag(view) {
97841
+ this.$tab.refreshPage(view);
97842
+ if (this.$route.meta.link) {
97843
+ this.$store.dispatch('z-tagsView/delIframeView', this.$route);
97844
+ }
97845
+ },
97846
+ closeSelectedTag(view) {
97847
+ this.$tab.closePage(view).then(({ visitedViews }) => {
97848
+ if (this.isActive(view)) {
97849
+ this.toLastView(visitedViews, view);
97850
+ }
97851
+ });
97852
+ },
97853
+ closeRightTags() {
97854
+ this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => {
97855
+ if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
97856
+ this.toLastView(visitedViews);
97857
+ }
97858
+ });
97859
+ },
97860
+ closeLeftTags() {
97861
+ this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => {
97862
+ if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
97863
+ this.toLastView(visitedViews);
97864
+ }
97865
+ });
97866
+ },
97867
+ closeOthersTags() {
97868
+ this.$router.push(this.selectedTag.fullPath).catch(() => {});
97869
+ this.$tab.closeOtherPage(this.selectedTag).then(() => {
97870
+ this.moveToCurrentTag();
97871
+ });
97872
+ },
97873
+ closeAllTags(view) {
97874
+ this.$tab.closeAllPage().then(({ visitedViews }) => {
97875
+ if (this.affixTags.some((tag) => tag.path === this.$route.path)) {
97876
+ return
97877
+ }
97878
+ this.toLastView(visitedViews, view);
97879
+ });
97880
+ },
97881
+ toLastView(visitedViews, view) {
97882
+ const latestView = visitedViews.slice(-1)[0];
97883
+ if (latestView) {
97884
+ this.$router.push(latestView.fullPath);
97885
+ } else {
97886
+ // now the default is to redirect to the home page if there is no tags-view,
97887
+ // you can adjust it according to your needs.
97888
+ if (view.name === 'Dashboard') {
97889
+ // to reload home page
97890
+ this.$router.replace({ path: '/redirect' + view.fullPath });
97891
+ } else {
97892
+ this.$router.push('/');
97893
+ }
97894
+ }
97895
+ },
97896
+ openMenu(tag, e) {
97897
+ const menuMinWidth = 105;
97898
+ const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
97899
+ const offsetWidth = this.$el.offsetWidth; // container width
97900
+ const maxLeft = offsetWidth - menuMinWidth; // left boundary
97901
+ const left = e.clientX - offsetLeft + 15; // 15: margin right
97902
+
97903
+ if (left > maxLeft) {
97904
+ this.left = maxLeft;
97905
+ } else {
97906
+ this.left = left;
97907
+ }
97908
+
97909
+ this.top = e.clientY;
97910
+ this.visible = true;
97911
+ this.selectedTag = tag;
97912
+ },
97913
+ closeMenu() {
97914
+ this.visible = false;
97915
+ },
97916
+ handleScroll() {
97917
+ this.closeMenu();
97918
+ }
97919
+ }
97920
+ };
97921
+
97922
+ /* script */
97923
+ const __vue_script__$j = script$j;
97924
+
97925
+ /* template */
97926
+ var __vue_render__$k = function () {
97927
+ var _vm = this;
97928
+ var _h = _vm.$createElement;
97929
+ var _c = _vm._self._c || _h;
97930
+ return _c(
97931
+ "div",
97932
+ {
97933
+ staticClass: "tags-view-container",
97934
+ attrs: { id: "tags-view-container" },
97935
+ },
97936
+ [
97937
+ _c(
97938
+ "scroll-pane",
97939
+ {
97940
+ ref: "scrollPane",
97941
+ staticClass: "tags-view-wrapper",
97942
+ on: { scroll: _vm.handleScroll },
97943
+ },
97944
+ _vm._l(_vm.visitedViews, function (tag) {
97945
+ return _c(
97946
+ "router-link",
97947
+ {
97948
+ key: tag.path,
97949
+ ref: "tag",
97950
+ refInFor: true,
97951
+ staticClass: "tags-view-item",
97952
+ class: _vm.isActive(tag) ? "active" : "",
97953
+ style: _vm.activeStyle(tag),
97954
+ attrs: {
97955
+ to: {
97956
+ path: tag.path,
97957
+ query: tag.query,
97958
+ fullPath: tag.fullPath,
97959
+ },
97960
+ tag: "span",
97961
+ },
97962
+ nativeOn: {
97963
+ mouseup: function ($event) {
97964
+ if ("button" in $event && $event.button !== 1) {
97965
+ return null
97966
+ }
97967
+ !_vm.isAffix(tag) ? _vm.closeSelectedTag(tag) : "";
97968
+ },
97969
+ contextmenu: function ($event) {
97970
+ $event.preventDefault();
97971
+ return _vm.openMenu(tag, $event)
97972
+ },
97973
+ },
97974
+ },
97975
+ [
97976
+ _vm._v("\n " + _vm._s(tag.title) + "\n "),
97977
+ !_vm.isAffix(tag)
97978
+ ? _c("span", {
97979
+ staticClass: "el-icon-close",
97980
+ on: {
97981
+ click: function ($event) {
97982
+ $event.preventDefault();
97983
+ $event.stopPropagation();
97984
+ return _vm.closeSelectedTag(tag)
97985
+ },
97986
+ },
97987
+ })
97988
+ : _vm._e(),
97989
+ ]
97990
+ )
97991
+ }),
97992
+ 1
97993
+ ),
97994
+ _vm._v(" "),
97995
+ _c(
97996
+ "ul",
97997
+ {
97998
+ directives: [
97999
+ {
98000
+ name: "show",
98001
+ rawName: "v-show",
98002
+ value: _vm.visible,
98003
+ expression: "visible",
98004
+ },
98005
+ ],
98006
+ staticClass: "contextmenu",
98007
+ style: { left: _vm.left + "px", top: _vm.top + "px" },
98008
+ },
98009
+ [
98010
+ _c(
98011
+ "li",
98012
+ {
98013
+ on: {
98014
+ click: function ($event) {
98015
+ return _vm.refreshSelectedTag(_vm.selectedTag)
98016
+ },
98017
+ },
98018
+ },
98019
+ [
98020
+ _c("i", { staticClass: "el-icon-refresh-right" }),
98021
+ _vm._v(" 刷新页面"),
98022
+ ]
98023
+ ),
98024
+ _vm._v(" "),
98025
+ !_vm.isAffix(_vm.selectedTag)
98026
+ ? _c(
98027
+ "li",
98028
+ {
98029
+ on: {
98030
+ click: function ($event) {
98031
+ return _vm.closeSelectedTag(_vm.selectedTag)
98032
+ },
98033
+ },
98034
+ },
98035
+ [_c("i", { staticClass: "el-icon-close" }), _vm._v(" 关闭当前")]
98036
+ )
98037
+ : _vm._e(),
98038
+ _vm._v(" "),
98039
+ _c("li", { on: { click: _vm.closeOthersTags } }, [
98040
+ _c("i", { staticClass: "el-icon-circle-close" }),
98041
+ _vm._v(" 关闭其他"),
98042
+ ]),
98043
+ _vm._v(" "),
98044
+ !_vm.isFirstView()
98045
+ ? _c("li", { on: { click: _vm.closeLeftTags } }, [
98046
+ _c("i", { staticClass: "el-icon-back" }),
98047
+ _vm._v(" 关闭左侧"),
98048
+ ])
98049
+ : _vm._e(),
98050
+ _vm._v(" "),
98051
+ !_vm.isLastView()
98052
+ ? _c("li", { on: { click: _vm.closeRightTags } }, [
98053
+ _c("i", { staticClass: "el-icon-right" }),
98054
+ _vm._v(" 关闭右侧"),
98055
+ ])
98056
+ : _vm._e(),
98057
+ _vm._v(" "),
98058
+ _c(
98059
+ "li",
98060
+ {
98061
+ on: {
98062
+ click: function ($event) {
98063
+ return _vm.closeAllTags(_vm.selectedTag)
98064
+ },
98065
+ },
98066
+ },
98067
+ [
98068
+ _c("i", { staticClass: "el-icon-circle-close" }),
98069
+ _vm._v(" 全部关闭"),
98070
+ ]
98071
+ ),
98072
+ ]
98073
+ ),
98074
+ ],
98075
+ 1
98076
+ )
98077
+ };
97518
98078
  var __vue_staticRenderFns__$k = [];
97519
98079
  __vue_render__$k._withStripped = true;
97520
98080
 
97521
98081
  /* style */
97522
- const __vue_inject_styles__$k = undefined;
98082
+ const __vue_inject_styles__$k = function (inject) {
98083
+ if (!inject) return
98084
+ inject("data-v-1621f612_0", { source: ".tags-view-container[data-v-1621f612] {\n height: 34px;\n width: 100%;\n background: #fff;\n border-bottom: 1px solid #d8dce5;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);\n}\n.tags-view-container .tags-view-wrapper .tags-view-item[data-v-1621f612] {\n display: inline-block;\n position: relative;\n cursor: pointer;\n height: 26px;\n line-height: 26px;\n border: 1px solid #d8dce5;\n color: #495060;\n background: #fff;\n padding: 0 8px;\n font-size: 12px;\n margin-left: 5px;\n margin-top: 4px;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item[data-v-1621f612]:first-of-type {\n margin-left: 15px;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item[data-v-1621f612]:last-of-type {\n margin-right: 15px;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item.active[data-v-1621f612] {\n background-color: #42b983;\n color: #fff;\n border-color: #42b983;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item.active[data-v-1621f612]::before {\n content: \"\";\n background: #fff;\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n position: relative;\n margin-right: 2px;\n}\n.tags-view-container .contextmenu[data-v-1621f612] {\n margin: 0;\n background: #fff;\n z-index: 3000;\n position: absolute;\n list-style-type: none;\n padding: 5px 0;\n border-radius: 4px;\n font-size: 12px;\n font-weight: 400;\n color: #333;\n box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);\n}\n.tags-view-container .contextmenu li[data-v-1621f612] {\n margin: 0;\n padding: 7px 16px;\n cursor: pointer;\n}\n.tags-view-container .contextmenu li[data-v-1621f612]:hover {\n background: #eee;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\TagsView\\index.vue","index.vue"],"names":[],"mappings":"AAgPA;EACA,YAAA;EACA,WAAA;EACA,gBAAA;EACA,gCAAA;EACA,0EAAA;AC/OA;ADiPA;EACA,qBAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,iBAAA;EACA,yBAAA;EACA,cAAA;EACA,gBAAA;EACA,cAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;AC/OA;ADgPA;EACA,iBAAA;AC9OA;ADgPA;EACA,kBAAA;AC9OA;ADgPA;EACA,yBAAA;EACA,WAAA;EACA,qBAAA;AC9OA;AD+OA;EACA,WAAA;EACA,gBAAA;EACA,qBAAA;EACA,UAAA;EACA,WAAA;EACA,kBAAA;EACA,kBAAA;EACA,iBAAA;AC7OA;ADkPA;EACA,SAAA;EACA,gBAAA;EACA,aAAA;EACA,kBAAA;EACA,qBAAA;EACA,cAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,WAAA;EACA,4CAAA;AChPA;ADiPA;EACA,SAAA;EACA,iBAAA;EACA,eAAA;AC/OA;ADgPA;EACA,gBAAA;AC9OA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div id=\"tags-view-container\" class=\"tags-view-container\">\r\n <scroll-pane ref=\"scrollPane\" class=\"tags-view-wrapper\" @scroll=\"handleScroll\">\r\n <router-link\r\n v-for=\"tag in visitedViews\"\r\n ref=\"tag\"\r\n :key=\"tag.path\"\r\n :class=\"isActive(tag) ? 'active' : ''\"\r\n :to=\"{ path: tag.path, query: tag.query, fullPath: tag.fullPath }\"\r\n tag=\"span\"\r\n class=\"tags-view-item\"\r\n :style=\"activeStyle(tag)\"\r\n @click.middle.native=\"!isAffix(tag) ? closeSelectedTag(tag) : ''\"\r\n @contextmenu.prevent.native=\"openMenu(tag, $event)\"\r\n >\r\n {{ tag.title }}\r\n <span v-if=\"!isAffix(tag)\" class=\"el-icon-close\" @click.prevent.stop=\"closeSelectedTag(tag)\" />\r\n </router-link>\r\n </scroll-pane>\r\n <ul v-show=\"visible\" :style=\"{ left: left + 'px', top: top + 'px' }\" class=\"contextmenu\">\r\n <li @click=\"refreshSelectedTag(selectedTag)\"><i class=\"el-icon-refresh-right\"></i> 刷新页面</li>\r\n <li v-if=\"!isAffix(selectedTag)\" @click=\"closeSelectedTag(selectedTag)\"><i class=\"el-icon-close\"></i> 关闭当前</li>\r\n <li @click=\"closeOthersTags\"><i class=\"el-icon-circle-close\"></i> 关闭其他</li>\r\n <li v-if=\"!isFirstView()\" @click=\"closeLeftTags\"><i class=\"el-icon-back\"></i> 关闭左侧</li>\r\n <li v-if=\"!isLastView()\" @click=\"closeRightTags\"><i class=\"el-icon-right\"></i> 关闭右侧</li>\r\n <li @click=\"closeAllTags(selectedTag)\"><i class=\"el-icon-circle-close\"></i> 全部关闭</li>\r\n </ul>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport ScrollPane from './ScrollPane.vue'\r\nimport { path } from '../../../../utils/utils.js'\r\n\r\nexport default {\r\n components: { ScrollPane },\r\n data() {\r\n return {\r\n visible: false,\r\n top: 0,\r\n left: 0,\r\n selectedTag: {},\r\n affixTags: []\r\n }\r\n },\r\n computed: {\r\n visitedViews() {\r\n return this.$store.state['z-tagsView'].visitedViews\r\n },\r\n routes() {\r\n return this.$store.state['z-permission'].routes\r\n },\r\n theme() {\r\n return this.$store.state['z-settings'].theme\r\n }\r\n },\r\n watch: {\r\n $route() {\r\n this.addTags()\r\n this.moveToCurrentTag()\r\n },\r\n visible(value) {\r\n if (value) {\r\n document.body.addEventListener('click', this.closeMenu)\r\n } else {\r\n document.body.removeEventListener('click', this.closeMenu)\r\n }\r\n }\r\n },\r\n mounted() {\r\n this.initTags()\r\n this.addTags()\r\n },\r\n methods: {\r\n isActive(route) {\r\n return route.path === this.$route.path\r\n },\r\n activeStyle(tag) {\r\n if (!this.isActive(tag)) return {}\r\n return {\r\n 'background-color': this.theme,\r\n 'border-color': this.theme\r\n }\r\n },\r\n isAffix(tag) {\r\n return tag.meta && tag.meta.affix\r\n },\r\n isFirstView() {\r\n try {\r\n return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath\r\n } catch (err) {\r\n return false\r\n }\r\n },\r\n isLastView() {\r\n try {\r\n return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath\r\n } catch (err) {\r\n return false\r\n }\r\n },\r\n filterAffixTags(routes, basePath = '/') {\r\n let tags = []\r\n routes.forEach((route) => {\r\n if (route.meta && route.meta.affix) {\r\n const tagPath = path.resolve(basePath, route.path)\r\n tags.push({\r\n fullPath: tagPath,\r\n path: tagPath,\r\n name: route.name,\r\n meta: { ...route.meta }\r\n })\r\n }\r\n if (route.children) {\r\n const tempTags = this.filterAffixTags(route.children, route.path)\r\n if (tempTags.length >= 1) {\r\n tags = [...tags, ...tempTags]\r\n }\r\n }\r\n })\r\n return tags\r\n },\r\n initTags() {\r\n const affixTags = (this.affixTags = this.filterAffixTags(this.routes))\r\n for (const tag of affixTags) {\r\n // Must have tag name\r\n if (tag.name) {\r\n this.$store.dispatch('z-tagsView/addVisitedView', tag)\r\n }\r\n }\r\n },\r\n addTags() {\r\n const { name } = this.$route\r\n if (name) {\r\n this.$store.dispatch('z-tagsView/addView', this.$route)\r\n if (this.$route.meta.link) {\r\n this.$store.dispatch('z-tagsView/addIframeView', this.$route)\r\n }\r\n }\r\n return false\r\n },\r\n moveToCurrentTag() {\r\n const tags = this.$refs.tag\r\n this.$nextTick(() => {\r\n for (const tag of tags) {\r\n if (tag.to.path === this.$route.path) {\r\n this.$refs.scrollPane.moveToTarget(tag)\r\n // when query is different then update\r\n if (tag.to.fullPath !== this.$route.fullPath) {\r\n this.$store.dispatch('z-tagsView/updateVisitedView', this.$route)\r\n }\r\n break\r\n }\r\n }\r\n })\r\n },\r\n refreshSelectedTag(view) {\r\n this.$tab.refreshPage(view)\r\n if (this.$route.meta.link) {\r\n this.$store.dispatch('z-tagsView/delIframeView', this.$route)\r\n }\r\n },\r\n closeSelectedTag(view) {\r\n this.$tab.closePage(view).then(({ visitedViews }) => {\r\n if (this.isActive(view)) {\r\n this.toLastView(visitedViews, view)\r\n }\r\n })\r\n },\r\n closeRightTags() {\r\n this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => {\r\n if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {\r\n this.toLastView(visitedViews)\r\n }\r\n })\r\n },\r\n closeLeftTags() {\r\n this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => {\r\n if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {\r\n this.toLastView(visitedViews)\r\n }\r\n })\r\n },\r\n closeOthersTags() {\r\n this.$router.push(this.selectedTag.fullPath).catch(() => {})\r\n this.$tab.closeOtherPage(this.selectedTag).then(() => {\r\n this.moveToCurrentTag()\r\n })\r\n },\r\n closeAllTags(view) {\r\n this.$tab.closeAllPage().then(({ visitedViews }) => {\r\n if (this.affixTags.some((tag) => tag.path === this.$route.path)) {\r\n return\r\n }\r\n this.toLastView(visitedViews, view)\r\n })\r\n },\r\n toLastView(visitedViews, view) {\r\n const latestView = visitedViews.slice(-1)[0]\r\n if (latestView) {\r\n this.$router.push(latestView.fullPath)\r\n } else {\r\n // now the default is to redirect to the home page if there is no tags-view,\r\n // you can adjust it according to your needs.\r\n if (view.name === 'Dashboard') {\r\n // to reload home page\r\n this.$router.replace({ path: '/redirect' + view.fullPath })\r\n } else {\r\n this.$router.push('/')\r\n }\r\n }\r\n },\r\n openMenu(tag, e) {\r\n const menuMinWidth = 105\r\n const offsetLeft = this.$el.getBoundingClientRect().left // container margin left\r\n const offsetWidth = this.$el.offsetWidth // container width\r\n const maxLeft = offsetWidth - menuMinWidth // left boundary\r\n const left = e.clientX - offsetLeft + 15 // 15: margin right\r\n\r\n if (left > maxLeft) {\r\n this.left = maxLeft\r\n } else {\r\n this.left = left\r\n }\r\n\r\n this.top = e.clientY\r\n this.visible = true\r\n this.selectedTag = tag\r\n },\r\n closeMenu() {\r\n this.visible = false\r\n },\r\n handleScroll() {\r\n this.closeMenu()\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.tags-view-container {\r\n height: 34px;\r\n width: 100%;\r\n background: #fff;\r\n border-bottom: 1px solid #d8dce5;\r\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);\r\n .tags-view-wrapper {\r\n .tags-view-item {\r\n display: inline-block;\r\n position: relative;\r\n cursor: pointer;\r\n height: 26px;\r\n line-height: 26px;\r\n border: 1px solid #d8dce5;\r\n color: #495060;\r\n background: #fff;\r\n padding: 0 8px;\r\n font-size: 12px;\r\n margin-left: 5px;\r\n margin-top: 4px;\r\n &:first-of-type {\r\n margin-left: 15px;\r\n }\r\n &:last-of-type {\r\n margin-right: 15px;\r\n }\r\n &.active {\r\n background-color: #42b983;\r\n color: #fff;\r\n border-color: #42b983;\r\n &::before {\r\n content: '';\r\n background: #fff;\r\n display: inline-block;\r\n width: 8px;\r\n height: 8px;\r\n border-radius: 50%;\r\n position: relative;\r\n margin-right: 2px;\r\n }\r\n }\r\n }\r\n }\r\n .contextmenu {\r\n margin: 0;\r\n background: #fff;\r\n z-index: 3000;\r\n position: absolute;\r\n list-style-type: none;\r\n padding: 5px 0;\r\n border-radius: 4px;\r\n font-size: 12px;\r\n font-weight: 400;\r\n color: #333;\r\n box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);\r\n li {\r\n margin: 0;\r\n padding: 7px 16px;\r\n cursor: pointer;\r\n &:hover {\r\n background: #eee;\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n\r\n<style lang=\"scss\">\r\n//reset element css of el-icon-close\r\n.tags-view-wrapper {\r\n .tags-view-item {\r\n .el-icon-close {\r\n width: 16px;\r\n height: 16px;\r\n vertical-align: 2px;\r\n border-radius: 50%;\r\n text-align: center;\r\n transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);\r\n transform-origin: 100% 50%;\r\n &:before {\r\n transform: scale(0.6);\r\n display: inline-block;\r\n vertical-align: -3px;\r\n }\r\n &:hover {\r\n background-color: #b4bccc;\r\n color: #fff;\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n",".tags-view-container {\n height: 34px;\n width: 100%;\n background: #fff;\n border-bottom: 1px solid #d8dce5;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);\n}\n.tags-view-container .tags-view-wrapper .tags-view-item {\n display: inline-block;\n position: relative;\n cursor: pointer;\n height: 26px;\n line-height: 26px;\n border: 1px solid #d8dce5;\n color: #495060;\n background: #fff;\n padding: 0 8px;\n font-size: 12px;\n margin-left: 5px;\n margin-top: 4px;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item:first-of-type {\n margin-left: 15px;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item:last-of-type {\n margin-right: 15px;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item.active {\n background-color: #42b983;\n color: #fff;\n border-color: #42b983;\n}\n.tags-view-container .tags-view-wrapper .tags-view-item.active::before {\n content: \"\";\n background: #fff;\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n position: relative;\n margin-right: 2px;\n}\n.tags-view-container .contextmenu {\n margin: 0;\n background: #fff;\n z-index: 3000;\n position: absolute;\n list-style-type: none;\n padding: 5px 0;\n border-radius: 4px;\n font-size: 12px;\n font-weight: 400;\n color: #333;\n box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);\n}\n.tags-view-container .contextmenu li {\n margin: 0;\n padding: 7px 16px;\n cursor: pointer;\n}\n.tags-view-container .contextmenu li:hover {\n background: #eee;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
98085
+ ,inject("data-v-1621f612_1", { source: ".tags-view-wrapper .tags-view-item .el-icon-close {\n width: 16px;\n height: 16px;\n vertical-align: 2px;\n border-radius: 50%;\n text-align: center;\n transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);\n transform-origin: 100% 50%;\n}\n.tags-view-wrapper .tags-view-item .el-icon-close:before {\n transform: scale(0.6);\n display: inline-block;\n vertical-align: -3px;\n}\n.tags-view-wrapper .tags-view-item .el-icon-close:hover {\n background-color: #b4bccc;\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["D:\\workspace-my\\gitee\\rollup-demo\\lib\\packages\\layout\\components\\TagsView\\index.vue","index.vue"],"names":[],"mappings":"AAuTA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA,yDAAA;EACA,0BAAA;ACtTA;ADuTA;EACA,qBAAA;EACA,qBAAA;EACA,oBAAA;ACrTA;ADuTA;EACA,yBAAA;EACA,WAAA;ACrTA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div id=\"tags-view-container\" class=\"tags-view-container\">\r\n <scroll-pane ref=\"scrollPane\" class=\"tags-view-wrapper\" @scroll=\"handleScroll\">\r\n <router-link\r\n v-for=\"tag in visitedViews\"\r\n ref=\"tag\"\r\n :key=\"tag.path\"\r\n :class=\"isActive(tag) ? 'active' : ''\"\r\n :to=\"{ path: tag.path, query: tag.query, fullPath: tag.fullPath }\"\r\n tag=\"span\"\r\n class=\"tags-view-item\"\r\n :style=\"activeStyle(tag)\"\r\n @click.middle.native=\"!isAffix(tag) ? closeSelectedTag(tag) : ''\"\r\n @contextmenu.prevent.native=\"openMenu(tag, $event)\"\r\n >\r\n {{ tag.title }}\r\n <span v-if=\"!isAffix(tag)\" class=\"el-icon-close\" @click.prevent.stop=\"closeSelectedTag(tag)\" />\r\n </router-link>\r\n </scroll-pane>\r\n <ul v-show=\"visible\" :style=\"{ left: left + 'px', top: top + 'px' }\" class=\"contextmenu\">\r\n <li @click=\"refreshSelectedTag(selectedTag)\"><i class=\"el-icon-refresh-right\"></i> 刷新页面</li>\r\n <li v-if=\"!isAffix(selectedTag)\" @click=\"closeSelectedTag(selectedTag)\"><i class=\"el-icon-close\"></i> 关闭当前</li>\r\n <li @click=\"closeOthersTags\"><i class=\"el-icon-circle-close\"></i> 关闭其他</li>\r\n <li v-if=\"!isFirstView()\" @click=\"closeLeftTags\"><i class=\"el-icon-back\"></i> 关闭左侧</li>\r\n <li v-if=\"!isLastView()\" @click=\"closeRightTags\"><i class=\"el-icon-right\"></i> 关闭右侧</li>\r\n <li @click=\"closeAllTags(selectedTag)\"><i class=\"el-icon-circle-close\"></i> 全部关闭</li>\r\n </ul>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport ScrollPane from './ScrollPane.vue'\r\nimport { path } from '../../../../utils/utils.js'\r\n\r\nexport default {\r\n components: { ScrollPane },\r\n data() {\r\n return {\r\n visible: false,\r\n top: 0,\r\n left: 0,\r\n selectedTag: {},\r\n affixTags: []\r\n }\r\n },\r\n computed: {\r\n visitedViews() {\r\n return this.$store.state['z-tagsView'].visitedViews\r\n },\r\n routes() {\r\n return this.$store.state['z-permission'].routes\r\n },\r\n theme() {\r\n return this.$store.state['z-settings'].theme\r\n }\r\n },\r\n watch: {\r\n $route() {\r\n this.addTags()\r\n this.moveToCurrentTag()\r\n },\r\n visible(value) {\r\n if (value) {\r\n document.body.addEventListener('click', this.closeMenu)\r\n } else {\r\n document.body.removeEventListener('click', this.closeMenu)\r\n }\r\n }\r\n },\r\n mounted() {\r\n this.initTags()\r\n this.addTags()\r\n },\r\n methods: {\r\n isActive(route) {\r\n return route.path === this.$route.path\r\n },\r\n activeStyle(tag) {\r\n if (!this.isActive(tag)) return {}\r\n return {\r\n 'background-color': this.theme,\r\n 'border-color': this.theme\r\n }\r\n },\r\n isAffix(tag) {\r\n return tag.meta && tag.meta.affix\r\n },\r\n isFirstView() {\r\n try {\r\n return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath\r\n } catch (err) {\r\n return false\r\n }\r\n },\r\n isLastView() {\r\n try {\r\n return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath\r\n } catch (err) {\r\n return false\r\n }\r\n },\r\n filterAffixTags(routes, basePath = '/') {\r\n let tags = []\r\n routes.forEach((route) => {\r\n if (route.meta && route.meta.affix) {\r\n const tagPath = path.resolve(basePath, route.path)\r\n tags.push({\r\n fullPath: tagPath,\r\n path: tagPath,\r\n name: route.name,\r\n meta: { ...route.meta }\r\n })\r\n }\r\n if (route.children) {\r\n const tempTags = this.filterAffixTags(route.children, route.path)\r\n if (tempTags.length >= 1) {\r\n tags = [...tags, ...tempTags]\r\n }\r\n }\r\n })\r\n return tags\r\n },\r\n initTags() {\r\n const affixTags = (this.affixTags = this.filterAffixTags(this.routes))\r\n for (const tag of affixTags) {\r\n // Must have tag name\r\n if (tag.name) {\r\n this.$store.dispatch('z-tagsView/addVisitedView', tag)\r\n }\r\n }\r\n },\r\n addTags() {\r\n const { name } = this.$route\r\n if (name) {\r\n this.$store.dispatch('z-tagsView/addView', this.$route)\r\n if (this.$route.meta.link) {\r\n this.$store.dispatch('z-tagsView/addIframeView', this.$route)\r\n }\r\n }\r\n return false\r\n },\r\n moveToCurrentTag() {\r\n const tags = this.$refs.tag\r\n this.$nextTick(() => {\r\n for (const tag of tags) {\r\n if (tag.to.path === this.$route.path) {\r\n this.$refs.scrollPane.moveToTarget(tag)\r\n // when query is different then update\r\n if (tag.to.fullPath !== this.$route.fullPath) {\r\n this.$store.dispatch('z-tagsView/updateVisitedView', this.$route)\r\n }\r\n break\r\n }\r\n }\r\n })\r\n },\r\n refreshSelectedTag(view) {\r\n this.$tab.refreshPage(view)\r\n if (this.$route.meta.link) {\r\n this.$store.dispatch('z-tagsView/delIframeView', this.$route)\r\n }\r\n },\r\n closeSelectedTag(view) {\r\n this.$tab.closePage(view).then(({ visitedViews }) => {\r\n if (this.isActive(view)) {\r\n this.toLastView(visitedViews, view)\r\n }\r\n })\r\n },\r\n closeRightTags() {\r\n this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => {\r\n if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {\r\n this.toLastView(visitedViews)\r\n }\r\n })\r\n },\r\n closeLeftTags() {\r\n this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => {\r\n if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {\r\n this.toLastView(visitedViews)\r\n }\r\n })\r\n },\r\n closeOthersTags() {\r\n this.$router.push(this.selectedTag.fullPath).catch(() => {})\r\n this.$tab.closeOtherPage(this.selectedTag).then(() => {\r\n this.moveToCurrentTag()\r\n })\r\n },\r\n closeAllTags(view) {\r\n this.$tab.closeAllPage().then(({ visitedViews }) => {\r\n if (this.affixTags.some((tag) => tag.path === this.$route.path)) {\r\n return\r\n }\r\n this.toLastView(visitedViews, view)\r\n })\r\n },\r\n toLastView(visitedViews, view) {\r\n const latestView = visitedViews.slice(-1)[0]\r\n if (latestView) {\r\n this.$router.push(latestView.fullPath)\r\n } else {\r\n // now the default is to redirect to the home page if there is no tags-view,\r\n // you can adjust it according to your needs.\r\n if (view.name === 'Dashboard') {\r\n // to reload home page\r\n this.$router.replace({ path: '/redirect' + view.fullPath })\r\n } else {\r\n this.$router.push('/')\r\n }\r\n }\r\n },\r\n openMenu(tag, e) {\r\n const menuMinWidth = 105\r\n const offsetLeft = this.$el.getBoundingClientRect().left // container margin left\r\n const offsetWidth = this.$el.offsetWidth // container width\r\n const maxLeft = offsetWidth - menuMinWidth // left boundary\r\n const left = e.clientX - offsetLeft + 15 // 15: margin right\r\n\r\n if (left > maxLeft) {\r\n this.left = maxLeft\r\n } else {\r\n this.left = left\r\n }\r\n\r\n this.top = e.clientY\r\n this.visible = true\r\n this.selectedTag = tag\r\n },\r\n closeMenu() {\r\n this.visible = false\r\n },\r\n handleScroll() {\r\n this.closeMenu()\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.tags-view-container {\r\n height: 34px;\r\n width: 100%;\r\n background: #fff;\r\n border-bottom: 1px solid #d8dce5;\r\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);\r\n .tags-view-wrapper {\r\n .tags-view-item {\r\n display: inline-block;\r\n position: relative;\r\n cursor: pointer;\r\n height: 26px;\r\n line-height: 26px;\r\n border: 1px solid #d8dce5;\r\n color: #495060;\r\n background: #fff;\r\n padding: 0 8px;\r\n font-size: 12px;\r\n margin-left: 5px;\r\n margin-top: 4px;\r\n &:first-of-type {\r\n margin-left: 15px;\r\n }\r\n &:last-of-type {\r\n margin-right: 15px;\r\n }\r\n &.active {\r\n background-color: #42b983;\r\n color: #fff;\r\n border-color: #42b983;\r\n &::before {\r\n content: '';\r\n background: #fff;\r\n display: inline-block;\r\n width: 8px;\r\n height: 8px;\r\n border-radius: 50%;\r\n position: relative;\r\n margin-right: 2px;\r\n }\r\n }\r\n }\r\n }\r\n .contextmenu {\r\n margin: 0;\r\n background: #fff;\r\n z-index: 3000;\r\n position: absolute;\r\n list-style-type: none;\r\n padding: 5px 0;\r\n border-radius: 4px;\r\n font-size: 12px;\r\n font-weight: 400;\r\n color: #333;\r\n box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);\r\n li {\r\n margin: 0;\r\n padding: 7px 16px;\r\n cursor: pointer;\r\n &:hover {\r\n background: #eee;\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n\r\n<style lang=\"scss\">\r\n//reset element css of el-icon-close\r\n.tags-view-wrapper {\r\n .tags-view-item {\r\n .el-icon-close {\r\n width: 16px;\r\n height: 16px;\r\n vertical-align: 2px;\r\n border-radius: 50%;\r\n text-align: center;\r\n transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);\r\n transform-origin: 100% 50%;\r\n &:before {\r\n transform: scale(0.6);\r\n display: inline-block;\r\n vertical-align: -3px;\r\n }\r\n &:hover {\r\n background-color: #b4bccc;\r\n color: #fff;\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n",".tags-view-wrapper .tags-view-item .el-icon-close {\n width: 16px;\n height: 16px;\n vertical-align: 2px;\n border-radius: 50%;\n text-align: center;\n transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);\n transform-origin: 100% 50%;\n}\n.tags-view-wrapper .tags-view-item .el-icon-close:before {\n transform: scale(0.6);\n display: inline-block;\n vertical-align: -3px;\n}\n.tags-view-wrapper .tags-view-item .el-icon-close:hover {\n background-color: #b4bccc;\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
98086
+
98087
+ };
97523
98088
  /* scoped */
97524
- const __vue_scope_id__$k = undefined;
98089
+ const __vue_scope_id__$k = "data-v-1621f612";
97525
98090
  /* module identifier */
97526
98091
  const __vue_module_identifier__$k = undefined;
97527
98092
  /* functional template */
97528
98093
  const __vue_is_functional_template__$k = false;
97529
- /* style inject */
97530
-
97531
98094
  /* style inject SSR */
97532
98095
 
97533
98096
  /* style inject shadow dom */
@@ -97542,7 +98105,7 @@ __vue_render__$k._withStripped = true;
97542
98105
  __vue_is_functional_template__$k,
97543
98106
  __vue_module_identifier__$k,
97544
98107
  false,
97545
- undefined,
98108
+ __vue_create_injector__,
97546
98109
  undefined,
97547
98110
  undefined
97548
98111
  );
@@ -97566,18 +98129,19 @@ __vue_render__$k._withStripped = true;
97566
98129
  var script$i = {
97567
98130
  name: 'z-layout',
97568
98131
  components: {
97569
- AppMain: __vue_component__$w,
97570
- Navbar: __vue_component__$p,
97571
- Sidebar: __vue_component__$k
98132
+ AppMain: __vue_component__$y,
98133
+ Navbar: __vue_component__$r,
98134
+ Sidebar: __vue_component__$m,
98135
+ TagsView: __vue_component__$k
97572
98136
  },
97573
98137
  computed: {
97574
98138
  ...mapState({
97575
- theme: (state) => state.settings.theme,
97576
- sideTheme: (state) => state.settings.sideTheme,
97577
- sidebar: (state) => state.app.sidebar,
97578
- device: (state) => state.app.device,
97579
- needTagsView: (state) => state.settings.tagsView,
97580
- fixedHeader: (state) => state.settings.fixedHeader
98139
+ theme: (state) => state['z-settings'].theme,
98140
+ sideTheme: (state) => state['z-settings'].sideTheme,
98141
+ sidebar: (state) => state['z-app'].sidebar,
98142
+ device: (state) => state['z-app'].device,
98143
+ needTagsView: (state) => state['z-settings'].tagsView,
98144
+ fixedHeader: (state) => state['z-settings'].fixedHeader
97581
98145
  }),
97582
98146
  classObj() {
97583
98147
  return {
@@ -97593,7 +98157,7 @@ var script$i = {
97593
98157
  },
97594
98158
  methods: {
97595
98159
  handleClickOutside() {
97596
- this.$store.dispatch('app/closeSideBar', { withoutAnimation: false });
98160
+ this.$store.dispatch('z-app/closeSideBar', { withoutAnimation: false });
97597
98161
  }
97598
98162
  }
97599
98163
  };
@@ -97638,7 +98202,11 @@ var __vue_render__$j = function () {
97638
98202
  _c(
97639
98203
  "div",
97640
98204
  { class: { "fixed-header": _vm.fixedHeader } },
97641
- [_c("Navbar"), _vm._v(" "), _c("div")],
98205
+ [
98206
+ _c("Navbar"),
98207
+ _vm._v(" "),
98208
+ _vm.needTagsView ? _c("TagsView") : _vm._e(),
98209
+ ],
97642
98210
  1
97643
98211
  ),
97644
98212
  _vm._v(" "),
@@ -97656,11 +98224,11 @@ __vue_render__$j._withStripped = true;
97656
98224
  /* style */
97657
98225
  const __vue_inject_styles__$j = function (inject) {
97658
98226
  if (!inject) return
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 });
98227
+ inject("data-v-18391fbc_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-18391fbc]: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-18391fbc] {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.app-wrapper[data-v-18391fbc]:after {\n content: \"\";\n display: table;\n clear: both;\n}\n.app-wrapper.mobile.openSidebar[data-v-18391fbc] {\n position: fixed;\n top: 0;\n}\n.drawer-bg[data-v-18391fbc] {\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-18391fbc] {\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-18391fbc] {\n width: calc(100% - 54px);\n}\n.sidebarHide .fixed-header[data-v-18391fbc] {\n width: 100%;\n}\n.mobile .fixed-header[data-v-18391fbc] {\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;ACsCA;EAEA,kBAAA;EACA,YAAA;EACA,WAAA;ADpCA;AACA;EACE,WAAW;EACX,cAAc;EACd,WAAW;AACb;ACgCA;EACA,eAAA;EACA,MAAA;AD9BA;ACiCA;EACA,gBAAA;EACA,YAAA;EACA,WAAA;EACA,MAAA;EACA,YAAA;EACA,kBAAA;EACA,YAAA;AD9BA;ACgCA;EACA,eAAA;EACA,MAAA;EACA,QAAA;EACA,UAAA;EACA,yBAAA;EACA,uBAAA;AD7BA;AC+BA;EACA,wBAAA;AD5BA;AC8BA;EACA,WAAA;AD3BA;AC6BA;EACA,WAAA;AD1BA;;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 <TagsView v-if=\"needTagsView\" />\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\nimport TagsView from './components/TagsView/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 TagsView\r\n },\r\n computed: {\r\n ...mapState({\r\n theme: (state) => state['z-settings'].theme,\r\n sideTheme: (state) => state['z-settings'].sideTheme,\r\n sidebar: (state) => state['z-app'].sidebar,\r\n device: (state) => state['z-app'].device,\r\n needTagsView: (state) => state['z-settings'].tagsView,\r\n fixedHeader: (state) => state['z-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('z-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 });
97660
98228
 
97661
98229
  };
97662
98230
  /* scoped */
97663
- const __vue_scope_id__$j = "data-v-2785cad2";
98231
+ const __vue_scope_id__$j = "data-v-18391fbc";
97664
98232
  /* module identifier */
97665
98233
  const __vue_module_identifier__$j = undefined;
97666
98234
  /* functional template */
@@ -97754,7 +98322,7 @@ const actions$5 = {
97754
98322
  GenerateRoutes({ commit }, $z) {
97755
98323
  return new Promise((resolve) => {
97756
98324
  const $http = $z.$http;
97757
- const routerOption = $z.router || {};
98325
+ const routerOption = $z.routerConfig || {};
97758
98326
  let api = function () {
97759
98327
  if ($http) {
97760
98328
  return $http.request({
@@ -97774,7 +98342,7 @@ const actions$5 = {
97774
98342
  const sidebarRoutes = filterAsyncRouter(sdata);
97775
98343
  const rewriteRoutes = filterAsyncRouter(rdata, false, true);
97776
98344
  rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true });
97777
- const constantRoutes = $z.router.routes || [];
98345
+ const constantRoutes = $z.routerConfig.routes || [];
97778
98346
 
97779
98347
  commit('SET_ADD_ROUTES', rewriteRoutes);
97780
98348
  commit('SET_ROUTES', constantRoutes.concat(rewriteRoutes));
@@ -97799,7 +98367,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
97799
98367
  } else if (route.component === 'ParentView') {
97800
98368
  route.component = __vue_component__$i;
97801
98369
  } else if (route.component === 'InnerLink') {
97802
- route.component = __vue_component__$y;
98370
+ route.component = __vue_component__$A;
97803
98371
  } else {
97804
98372
  route.component = loadView(route.component);
97805
98373
  }
@@ -97849,14 +98417,14 @@ const loadView = (view) => {
97849
98417
 
97850
98418
  function registerStateModule$5(store) {
97851
98419
  if (!store || !store.hasModule) return
97852
- if (!store.hasModule('permission')) {
98420
+ if (!store.hasModule('z-permission')) {
97853
98421
  const statesModule = {
97854
98422
  namespaced: true,
97855
98423
  state: state$5,
97856
98424
  mutations: mutations$5,
97857
98425
  actions: actions$5
97858
98426
  };
97859
- store.registerModule('permission', statesModule);
98427
+ store.registerModule('z-permission', statesModule);
97860
98428
  }
97861
98429
  }
97862
98430
 
@@ -97870,8 +98438,11 @@ function createRouter(Vue) {
97870
98438
  if (!(VueRouterObj && VueRouterObj[0])) {
97871
98439
  Vue.use(VueRouter);
97872
98440
  const $z = Vue.prototype.$z;
97873
- const routerOption = $z.router;
97874
- if (routerOption) {
98441
+ const routerObj = $z.router;
98442
+ const routerOption = $z.routerConfig;
98443
+ if (routerObj) {
98444
+ Vue.prototype.$z.$router = routerObj;
98445
+ } else if (routerOption) {
97875
98446
  const defaultConfig = {
97876
98447
  mode: routerOption.mode || 'history', // 去掉url中的#
97877
98448
  scrollBehavior: () => ({ y: 0 }),
@@ -97899,9 +98470,9 @@ function createRouter(Vue) {
97899
98470
  if (!router.options.isAddDynamicMenuRoutes && store) {
97900
98471
  router.options.isAddDynamicMenuRoutes = true;
97901
98472
  isRelogin.show = true;
97902
- store.dispatch('user/GetInfo', $z).then(() => {
98473
+ store.dispatch('z-user/GetInfo', $z).then(() => {
97903
98474
  isRelogin.show = false;
97904
- store.dispatch('permission/GenerateRoutes', $z).then((accessRoutes) => {
98475
+ store.dispatch('z-permission/GenerateRoutes', $z).then((accessRoutes) => {
97905
98476
  // 根据roles权限生成可访问的路由表
97906
98477
  router.addRoutes(accessRoutes); // 动态添加可访问路由表
97907
98478
  router.options.routes = Object.assign(router.options.routes, accessRoutes);
@@ -97966,7 +98537,7 @@ const actions$4 = {
97966
98537
  GetInfo({ commit }, $z) {
97967
98538
  return new Promise((resolve, reject) => {
97968
98539
  const $http = $z.$http;
97969
- const routerOption = $z.router || {};
98540
+ const routerOption = $z.routerConfig || {};
97970
98541
  let api = function () {
97971
98542
  if ($http) {
97972
98543
  return $http.request({
@@ -98006,14 +98577,14 @@ const actions$4 = {
98006
98577
 
98007
98578
  function registerStateModule$4(store) {
98008
98579
  if (!store || !store.hasModule) return
98009
- if (!store.hasModule('user')) {
98580
+ if (!store.hasModule('z-user')) {
98010
98581
  const statesModule = {
98011
98582
  namespaced: true,
98012
98583
  state: state$4,
98013
98584
  mutations: mutations$4,
98014
98585
  actions: actions$4
98015
98586
  };
98016
- store.registerModule('user', statesModule);
98587
+ store.registerModule('z-user', statesModule);
98017
98588
  }
98018
98589
  }
98019
98590
 
@@ -99483,14 +100054,14 @@ const actions$2 = {
99483
100054
 
99484
100055
  function registerStateModule$2(store) {
99485
100056
  if (!store || !store.hasModule) return
99486
- if (!store.hasModule('settings')) {
100057
+ if (!store.hasModule('z-settings')) {
99487
100058
  const statesModule = {
99488
100059
  namespaced: true,
99489
100060
  state: state$2,
99490
100061
  mutations: mutations$2,
99491
100062
  actions: actions$2
99492
100063
  };
99493
- store.registerModule('settings', statesModule);
100064
+ store.registerModule('z-settings', statesModule);
99494
100065
  }
99495
100066
  }
99496
100067
 
@@ -99554,14 +100125,14 @@ const actions$1 = {
99554
100125
 
99555
100126
  function registerStateModule$1(store) {
99556
100127
  if (!store || !store.hasModule) return
99557
- if (!store.hasModule('app')) {
100128
+ if (!store.hasModule('z-app')) {
99558
100129
  const statesModule = {
99559
100130
  namespaced: true,
99560
100131
  state: state$1,
99561
100132
  mutations: mutations$1,
99562
100133
  actions: actions$1
99563
100134
  };
99564
- store.registerModule('app', statesModule);
100135
+ store.registerModule('z-app', statesModule);
99565
100136
  }
99566
100137
  }
99567
100138
 
@@ -99789,14 +100360,14 @@ const actions = {
99789
100360
 
99790
100361
  function registerStateModule(store) {
99791
100362
  if (!store || !store.hasModule) return
99792
- if (!store.hasModule('tagsView')) {
100363
+ if (!store.hasModule('z-tagsView')) {
99793
100364
  const statesModule = {
99794
100365
  namespaced: true,
99795
100366
  state,
99796
100367
  mutations,
99797
100368
  actions
99798
100369
  };
99799
- store.registerModule('tagsView', statesModule);
100370
+ store.registerModule('z-tagsView', statesModule);
99800
100371
  }
99801
100372
  }
99802
100373
 
@@ -99810,6 +100381,90 @@ __vue_component__$j.install = function (Vue, option = {}) {
99810
100381
  registerStateModule(store);
99811
100382
  };
99812
100383
 
100384
+ // import store from '@/store'
100385
+ // import router from '@/router';
100386
+
100387
+ function tab (Vue, option) {
100388
+ console.log(Vue.prototype.$z.store);
100389
+ const store = Vue.prototype.$z.store;
100390
+ const router = Vue.prototype.$z.$router;
100391
+ return {
100392
+ // 刷新当前tab页签
100393
+ refreshPage(obj) {
100394
+ const { path, query, matched } = router.currentRoute;
100395
+ if (obj === undefined) {
100396
+ matched.forEach((m) => {
100397
+ if (m.components && m.components.default && m.components.default.name) {
100398
+ if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
100399
+ obj = { name: m.components.default.name, path: path, query: query };
100400
+ }
100401
+ }
100402
+ });
100403
+ }
100404
+ return store.dispatch('z-tagsView/delCachedView', obj).then(() => {
100405
+ const { path, query } = obj;
100406
+ router.replace({
100407
+ path: '/redirect' + path,
100408
+ query: query
100409
+ });
100410
+ })
100411
+ },
100412
+ // 关闭当前tab页签,打开新页签
100413
+ closeOpenPage(obj) {
100414
+ store.dispatch('z-tagsView/delView', router.currentRoute);
100415
+ if (obj !== undefined) {
100416
+ return router.push(obj)
100417
+ }
100418
+ },
100419
+ // 关闭指定tab页签
100420
+ closePage(obj) {
100421
+ if (obj === undefined) {
100422
+ return store.dispatch('z-tagsView/delView', router.currentRoute).then(({ visitedViews }) => {
100423
+ const latestView = visitedViews.slice(-1)[0];
100424
+ if (latestView) {
100425
+ return router.push(latestView.fullPath)
100426
+ }
100427
+ return router.push('/')
100428
+ })
100429
+ }
100430
+ return store.dispatch('z-tagsView/delView', obj)
100431
+ },
100432
+ // 关闭所有tab页签
100433
+ closeAllPage() {
100434
+ return store.dispatch('z-tagsView/delAllViews')
100435
+ },
100436
+ // 关闭左侧tab页签
100437
+ closeLeftPage(obj) {
100438
+ return store.dispatch('z-tagsView/delLeftTags', obj || router.currentRoute)
100439
+ },
100440
+ // 关闭右侧tab页签
100441
+ closeRightPage(obj) {
100442
+ return store.dispatch('z-tagsView/delRightTags', obj || router.currentRoute)
100443
+ },
100444
+ // 关闭其他tab页签
100445
+ closeOtherPage(obj) {
100446
+ return store.dispatch('z-tagsView/delOthersViews', obj || router.currentRoute)
100447
+ },
100448
+ // 添加tab页签
100449
+ openPage(title, url, params) {
100450
+ var obj = { path: url, meta: { title: title } };
100451
+ store.dispatch('z-tagsView/addView', obj);
100452
+ return router.push({ path: url, query: params })
100453
+ },
100454
+ // 修改tab页签
100455
+ updatePage(obj) {
100456
+ return store.dispatch('z-tagsView/updateVisitedView', obj)
100457
+ }
100458
+ }
100459
+ }
100460
+
100461
+ var PluginsZ = {
100462
+ install(Vue, option = {}) {
100463
+ // 页签操作
100464
+ Vue.prototype.$tab = tab(Vue);
100465
+ }
100466
+ };
100467
+
99813
100468
  //
99814
100469
  //
99815
100470
  //
@@ -100806,7 +101461,7 @@ if (typeof window !== 'undefined' && window.Vue) {
100806
101461
  install(window.Vue);
100807
101462
  }
100808
101463
  const components = [
100809
- __vue_component__$z,
101464
+ __vue_component__$B,
100810
101465
  __vue_component__,
100811
101466
  RequestZ,
100812
101467
  RouterZ,
@@ -100828,7 +101483,8 @@ const components = [
100828
101483
  __vue_component__$3,
100829
101484
  __vue_component__$2,
100830
101485
  __vue_component__$1,
100831
- __vue_component__$j
101486
+ __vue_component__$j,
101487
+ PluginsZ
100832
101488
  ];
100833
101489
  const install = (Vue, option = {}) => {
100834
101490
  setGolbalData(Vue, option);
@@ -100851,12 +101507,13 @@ exports.DictZ = DictZ;
100851
101507
  exports.FooterZ = __vue_component__$8;
100852
101508
  exports.HeaderZ = __vue_component__$7;
100853
101509
  exports.Icon2Z = __vue_component__;
100854
- exports.IconZ = __vue_component__$z;
101510
+ exports.IconZ = __vue_component__$B;
100855
101511
  exports.InputZ = __vue_component__$6;
100856
101512
  exports.LayoutZ = __vue_component__$j;
100857
101513
  exports.ListZ = __vue_component__$g;
100858
101514
  exports.MainZ = __vue_component__$5;
100859
101515
  exports.OptionZ = __vue_component__$4;
101516
+ exports.PluginsZ = PluginsZ;
100860
101517
  exports.RequestZ = RequestZ;
100861
101518
  exports.RouterZ = RouterZ;
100862
101519
  exports.RowZ = __vue_component__$3;