ecinc-cloud-yoaemail 9.5.4 → 9.5.5
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/lib/ecyoaemail.common.js +236 -4070
- package/lib/ecyoaemail.umd.js +240 -4074
- package/lib/ecyoaemail.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/ecyoaemail.umd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(
|
|
3
|
+
module.exports = factory();
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
5
|
define([], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["ecyoaemail"] = factory(
|
|
7
|
+
exports["ecyoaemail"] = factory();
|
|
8
8
|
else
|
|
9
|
-
root["ecyoaemail"] = factory(
|
|
10
|
-
})((typeof self !== 'undefined' ? self : this), function(
|
|
9
|
+
root["ecyoaemail"] = factory();
|
|
10
|
+
})((typeof self !== 'undefined' ? self : this), function() {
|
|
11
11
|
return /******/ (function(modules) { // webpackBootstrap
|
|
12
12
|
/******/ // The module cache
|
|
13
13
|
/******/ var installedModules = {};
|
|
@@ -96,17 +96,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
-
/***/ "1829":
|
|
100
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
101
|
-
|
|
102
|
-
"use strict";
|
|
103
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_66e2781e_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cd12");
|
|
104
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_66e2781e_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_66e2781e_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
105
|
-
/* unused harmony reexport * */
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
/***/ }),
|
|
109
|
-
|
|
110
99
|
/***/ "24fb":
|
|
111
100
|
/***/ (function(module, exports, __webpack_require__) {
|
|
112
101
|
|
|
@@ -1383,20 +1372,6 @@ var index = {
|
|
|
1383
1372
|
|
|
1384
1373
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
|
|
1385
1374
|
|
|
1386
|
-
/***/ }),
|
|
1387
|
-
|
|
1388
|
-
/***/ "3609":
|
|
1389
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1390
|
-
|
|
1391
|
-
// Imports
|
|
1392
|
-
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
1393
|
-
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
1394
|
-
// Module
|
|
1395
|
-
exports.push([module.i, "[data-v-66e2781e]:export{stdMenuBgcolor:var(--lmBgColor);stdMenuHover:var(--lmBgColorActive)!important;stdMenuText:var(--lmTextColor)!important;stdMenuAcitveText:var(--lmTextColorActive)!important;stdSubMenuBgcolor:var(--lmBgColor);stdSubMenuHover:rgba(163,174,177,.419608);stdSubMenuActiveText:var(--lmTextColorActive)!important;darkMenuBgcolor:#304156;darkMenuHover:#263445;darkMenuText:#bfcbd9;darkMenuAcitveText:#ffd04b;darkSubMenuBgcolor:#384b63;darkSubMenuHover:#263445;darkSubMenuActiveText:#ffd04b;sideBarWidth:210px;formLabelWidth:133px;lightBlue:var(--subjectColor)}.app-wrapper[data-v-66e2781e]{position:relative;height:100%;width:100%}.app-wrapper[data-v-66e2781e]:after{content:\"\";display:table;clear:both}.app-wrapper.mobile.openSidebar[data-v-66e2781e]{position:fixed;top:0}.drawer-bg[data-v-66e2781e]{background:#000;opacity:.3;width:100%;top:0;height:100%;position:absolute;z-index:999}.fixed-header[data-v-66e2781e]{position:fixed;top:60px;right:0;z-index:9;width:calc(100% - 210px);-webkit-transition:width .28s;transition:width .28s}.mobile .fixed-header[data-v-66e2781e]{width:100%}.imgHead[data-v-66e2781e]{width:20px;height:20px;border-radius:20px;text-align:center;line-height:20px;margin-right:10px}.imgHead2[data-v-66e2781e]{display:inline-block;width:24px;height:24px;border-radius:50%;text-align:center;line-height:24px;top:-3px;position:relative}[data-v-66e2781e] .changEmail .el-input__inner{border:none;padding-left:6px}.accountDialog[data-v-66e2781e]{width:300px;height:auto;position:absolute;z-index:100;top:45px;right:10px;background-color:#fff;-webkit-box-shadow:0 0 6px 0 rgba(0,0,0,.1)!important;box-shadow:0 0 6px 0 rgba(0,0,0,.1)!important;border-radius:4px;font-size:14px}.accountDialog .currentOptiopn[data-v-66e2781e]{height:66px;padding:10px 20px;border-bottom:1px solid #eee}.accountDialog .optionList[data-v-66e2781e]{width:260px;color:#333;margin-top:16px;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;padding:0 40px 0 20px}.accountDialog .optionList[data-v-66e2781e]:hover{color:#409eff}.accountDialog .optionListWrap>div:first-child .optionList[data-v-66e2781e]{margin-top:0}.headInfo[data-v-66e2781e]{width:240px;height:50px;background:#fff;position:absolute;top:0;right:0}[data-v-66e2781e] .navbar{margin:0;padding:0 10px}[data-v-66e2781e] .navbar .right-menu{right:10px}", ""]);
|
|
1396
|
-
// Exports
|
|
1397
|
-
module.exports = exports;
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
1375
|
/***/ }),
|
|
1401
1376
|
|
|
1402
1377
|
/***/ "499e":
|
|
@@ -1721,52 +1696,19 @@ var WIDTH = 992; // refer to Bootstrap's responsive design
|
|
|
1721
1696
|
|
|
1722
1697
|
/***/ }),
|
|
1723
1698
|
|
|
1724
|
-
/***/ "
|
|
1699
|
+
/***/ "7832":
|
|
1725
1700
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1726
1701
|
|
|
1727
1702
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
1728
1703
|
|
|
1729
1704
|
// load the styles
|
|
1730
|
-
var content = __webpack_require__("
|
|
1705
|
+
var content = __webpack_require__("bef1");
|
|
1731
1706
|
if(content.__esModule) content = content.default;
|
|
1732
1707
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
1733
1708
|
if(content.locals) module.exports = content.locals;
|
|
1734
1709
|
// add the styles to the DOM
|
|
1735
1710
|
var add = __webpack_require__("499e").default
|
|
1736
|
-
var update = add("
|
|
1737
|
-
|
|
1738
|
-
/***/ }),
|
|
1739
|
-
|
|
1740
|
-
/***/ "5fa6":
|
|
1741
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1742
|
-
|
|
1743
|
-
// Imports
|
|
1744
|
-
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
1745
|
-
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
1746
|
-
// Module
|
|
1747
|
-
exports.push([module.i, ".appname{margin-left:-5px}.el-menu--popup{overflow:hidden;border-radius:3px}.nest-menu.notop{border-top:none!important}.nest-menu.notop .el-menu-item{background-color:#384b63!important;border-bottom:1px dotted #777;height:50px;line-height:50px}.nest-menu.notop .el-menu-item.is-active{color:#fff!important}.nest-menu.notop .el-menu-item.is-active:after{right:0}.nest-menu.notop .el-menu-item:hover{background-color:#445c80!important;color:#fff!important}.nest-menu.notop:last-child .el-menu-item{border-bottom:none}.el-menu-item{height:50px}.std-scrollbar-wrapper{background-color:var(--lmBgColor);border-right:1px solid #e6e6e6}.std-scrollbar-wrapper .el-submenu__title:hover,.std-scrollbar-wrapper .submenu-title-noDropdown:hover{background-color:var(--lmBgColorActive) !important!important}.std-scrollbar-wrapper .is-active>.el-submenu__title{color:var(--lmTextColorActive)!important}.std-scrollbar-wrapper .el-submenu .el-menu-item,.std-scrollbar-wrapper .nest-menu .el-submenu>.el-submenu__title{background-color:var(--lmBgColor)!important}.std-scrollbar-wrapper .el-submenu .el-menu-item:hover,.std-scrollbar-wrapper .nest-menu .el-submenu>.el-submenu__title:hover{background-color:rgba(163,174,177,.419608)!important}.dark-scrollbar-wrapper{background-color:#304156;border-right:1px solid #304156}.dark-scrollbar-wrapper .el-submenu__title:hover,.dark-scrollbar-wrapper .submenu-title-noDropdown:hover{background-color:#263445!important}.dark-scrollbar-wrapper .is-active>.el-submenu__title{color:#fff}.dark-scrollbar-wrapper .el-submenu .el-menu-item,.dark-scrollbar-wrapper .nest-menu .el-submenu>.el-submenu__title{background-color:#384b63!important;border-bottom:none}.dark-scrollbar-wrapper .el-submenu .el-menu-item.is-active,.dark-scrollbar-wrapper .nest-menu .el-submenu>.el-submenu__title.is-active{color:#fff!important}.dark-scrollbar-wrapper .el-submenu .el-menu-item:hover,.dark-scrollbar-wrapper .nest-menu .el-submenu>.el-submenu__title:hover{background-color:#445c80!important;color:#fff!important}/deep/.topBtn-wrapper{text-align:center;height:55px}.separate{height:10px;background-color:#fff}.writeEmail{position:relative;justify-items:start;margin:0;border-radius:2px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:inline-block;line-height:49px;border:1px solid #eee;text-align:center;background-color:#fff;height:31px;margin:12px 4px;width:76px;cursor:pointer}.writeEmail:first-child{border-right:1px solid #d8d9da}.writeEmail .svg-icon{width:14px;height:14px;position:absolute;top:30%;left:25%}.writeEmail span{font-size:14px;line-height:19px;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:50%}", ""]);
|
|
1748
|
-
// Exports
|
|
1749
|
-
exports.locals = {
|
|
1750
|
-
"stdMenuBgcolor": "var(--lmBgColor)",
|
|
1751
|
-
"stdMenuHover": "var(--lmBgColorActive)",
|
|
1752
|
-
"stdMenuText": "var(--lmTextColor)",
|
|
1753
|
-
"stdMenuAcitveText": "var(--lmTextColorActive)",
|
|
1754
|
-
"stdSubMenuBgcolor": "var(--lmBgColor)",
|
|
1755
|
-
"stdSubMenuHover": "rgba(163,174,177,.419608)",
|
|
1756
|
-
"stdSubMenuActiveText": "var(--lmTextColorActive)",
|
|
1757
|
-
"darkMenuBgcolor": "#304156",
|
|
1758
|
-
"darkMenuHover": "#263445",
|
|
1759
|
-
"darkMenuText": "#bfcbd9",
|
|
1760
|
-
"darkMenuAcitveText": "#ffd04b",
|
|
1761
|
-
"darkSubMenuBgcolor": "#384b63",
|
|
1762
|
-
"darkSubMenuHover": "#263445",
|
|
1763
|
-
"darkSubMenuActiveText": "#ffd04b",
|
|
1764
|
-
"sideBarWidth": "210px",
|
|
1765
|
-
"formLabelWidth": "133px",
|
|
1766
|
-
"lightBlue": "var(--subjectColor)"
|
|
1767
|
-
};
|
|
1768
|
-
module.exports = exports;
|
|
1769
|
-
|
|
1711
|
+
var update = add("2295d35e", content, true, {"sourceMap":false,"shadowMode":false});
|
|
1770
1712
|
|
|
1771
1713
|
/***/ }),
|
|
1772
1714
|
|
|
@@ -1855,55 +1797,29 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1855
1797
|
|
|
1856
1798
|
/***/ }),
|
|
1857
1799
|
|
|
1858
|
-
/***/ "
|
|
1859
|
-
/***/ (function(module,
|
|
1800
|
+
/***/ "8979":
|
|
1801
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1802
|
+
|
|
1803
|
+
"use strict";
|
|
1804
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5e809c44_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7832");
|
|
1805
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5e809c44_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5e809c44_prod_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
1806
|
+
/* unused harmony reexport * */
|
|
1860
1807
|
|
|
1861
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
|
|
1862
1808
|
|
|
1863
1809
|
/***/ }),
|
|
1864
1810
|
|
|
1865
|
-
/***/ "
|
|
1811
|
+
/***/ "bef1":
|
|
1866
1812
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1867
1813
|
|
|
1868
1814
|
// Imports
|
|
1869
1815
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
1870
1816
|
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
1871
1817
|
// Module
|
|
1872
|
-
exports.push([module.i, "", ""]);
|
|
1818
|
+
exports.push([module.i, "[data-v-5e809c44]:export{stdMenuBgcolor:var(--lmBgColor);stdMenuHover:var(--lmBgColorActive)!important;stdMenuText:var(--lmTextColor)!important;stdMenuAcitveText:var(--lmTextColorActive)!important;stdSubMenuBgcolor:var(--lmBgColor);stdSubMenuHover:rgba(163,174,177,.419608);stdSubMenuActiveText:var(--lmTextColorActive)!important;darkMenuBgcolor:#304156;darkMenuHover:#263445;darkMenuText:#bfcbd9;darkMenuAcitveText:#ffd04b;darkSubMenuBgcolor:#384b63;darkSubMenuHover:#263445;darkSubMenuActiveText:#ffd04b;sideBarWidth:210px;formLabelWidth:133px;lightBlue:var(--subjectColor)}.app-wrapper[data-v-5e809c44]{position:relative;height:100%;width:100%}.app-wrapper[data-v-5e809c44]:after{content:\"\";display:table;clear:both}.app-wrapper.mobile.openSidebar[data-v-5e809c44]{position:fixed;top:0}.drawer-bg[data-v-5e809c44]{background:#000;opacity:.3;width:100%;top:0;height:100%;position:absolute;z-index:999}.fixed-header[data-v-5e809c44]{position:fixed;top:60px;right:0;z-index:9;width:calc(100% - 210px);-webkit-transition:width .28s;transition:width .28s}.mobile .fixed-header[data-v-5e809c44]{width:100%}.imgHead[data-v-5e809c44]{width:20px;height:20px;border-radius:20px;text-align:center;line-height:20px;margin-right:10px}.imgHead2[data-v-5e809c44]{display:inline-block;width:24px;height:24px;border-radius:50%;text-align:center;line-height:24px;top:-3px;position:relative}[data-v-5e809c44] .changEmail .el-input__inner{border:none;padding-left:6px}.accountDialog[data-v-5e809c44]{width:300px;height:auto;position:absolute;z-index:100;top:45px;right:10px;background-color:#fff;-webkit-box-shadow:0 0 6px 0 rgba(0,0,0,.1)!important;box-shadow:0 0 6px 0 rgba(0,0,0,.1)!important;border-radius:4px;font-size:14px}.accountDialog .currentOptiopn[data-v-5e809c44]{height:66px;padding:10px 20px;border-bottom:1px solid #eee}.accountDialog .optionList[data-v-5e809c44]{width:260px;color:#333;margin-top:16px;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;padding:0 40px 0 20px}.accountDialog .optionList[data-v-5e809c44]:hover{color:#409eff}.accountDialog .optionListWrap>div:first-child .optionList[data-v-5e809c44]{margin-top:0}.headInfo[data-v-5e809c44]{width:240px;height:50px;background:#fff;position:absolute;top:0;right:0}[data-v-5e809c44] .navbar{margin:0;padding:0 10px}[data-v-5e809c44] .navbar .right-menu{right:10px}", ""]);
|
|
1873
1819
|
// Exports
|
|
1874
|
-
exports.locals = {
|
|
1875
|
-
"stdMenuBgcolor": "var(--lmBgColor)",
|
|
1876
|
-
"stdMenuHover": "var(--lmBgColorActive)",
|
|
1877
|
-
"stdMenuText": "var(--lmTextColor)",
|
|
1878
|
-
"stdMenuAcitveText": "var(--lmTextColorActive)",
|
|
1879
|
-
"stdSubMenuBgcolor": "var(--lmBgColor)",
|
|
1880
|
-
"stdSubMenuHover": "rgba(163,174,177,.419608)",
|
|
1881
|
-
"stdSubMenuActiveText": "var(--lmTextColorActive)",
|
|
1882
|
-
"darkMenuBgcolor": "#304156",
|
|
1883
|
-
"darkMenuHover": "#263445",
|
|
1884
|
-
"darkMenuText": "#bfcbd9",
|
|
1885
|
-
"darkMenuAcitveText": "#ffd04b",
|
|
1886
|
-
"darkSubMenuBgcolor": "#384b63",
|
|
1887
|
-
"darkSubMenuHover": "#263445",
|
|
1888
|
-
"darkSubMenuActiveText": "#ffd04b",
|
|
1889
|
-
"sideBarWidth": "210px",
|
|
1890
|
-
"formLabelWidth": "133px",
|
|
1891
|
-
"lightBlue": "var(--subjectColor)"
|
|
1892
|
-
};
|
|
1893
1820
|
module.exports = exports;
|
|
1894
1821
|
|
|
1895
1822
|
|
|
1896
|
-
/***/ }),
|
|
1897
|
-
|
|
1898
|
-
/***/ "a907":
|
|
1899
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1900
|
-
|
|
1901
|
-
"use strict";
|
|
1902
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_LeftMenu_vue_vue_type_style_index_0_id_670785a0_prod_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f13b");
|
|
1903
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_LeftMenu_vue_vue_type_style_index_0_id_670785a0_prod_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_LeftMenu_vue_vue_type_style_index_0_id_670785a0_prod_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
1904
|
-
/* unused harmony reexport * */
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
1823
|
/***/ }),
|
|
1908
1824
|
|
|
1909
1825
|
/***/ "c8ba":
|
|
@@ -1931,22 +1847,6 @@ try {
|
|
|
1931
1847
|
module.exports = g;
|
|
1932
1848
|
|
|
1933
1849
|
|
|
1934
|
-
/***/ }),
|
|
1935
|
-
|
|
1936
|
-
/***/ "cd12":
|
|
1937
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1938
|
-
|
|
1939
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
1940
|
-
|
|
1941
|
-
// load the styles
|
|
1942
|
-
var content = __webpack_require__("3609");
|
|
1943
|
-
if(content.__esModule) content = content.default;
|
|
1944
|
-
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
1945
|
-
if(content.locals) module.exports = content.locals;
|
|
1946
|
-
// add the styles to the DOM
|
|
1947
|
-
var add = __webpack_require__("499e").default
|
|
1948
|
-
var update = add("3ee6287e", content, true, {"sourceMap":false,"shadowMode":false});
|
|
1949
|
-
|
|
1950
1850
|
/***/ }),
|
|
1951
1851
|
|
|
1952
1852
|
/***/ "ef8d":
|
|
@@ -2426,3237 +2326,101 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2426
2326
|
|
|
2427
2327
|
/***/ }),
|
|
2428
2328
|
|
|
2429
|
-
/***/ "
|
|
2430
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2431
|
-
|
|
2432
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
2433
|
-
|
|
2434
|
-
// load the styles
|
|
2435
|
-
var content = __webpack_require__("5fa6");
|
|
2436
|
-
if(content.__esModule) content = content.default;
|
|
2437
|
-
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
2438
|
-
if(content.locals) module.exports = content.locals;
|
|
2439
|
-
// add the styles to the DOM
|
|
2440
|
-
var add = __webpack_require__("499e").default
|
|
2441
|
-
var update = add("b53561cc", content, true, {"sourceMap":false,"shadowMode":false});
|
|
2442
|
-
|
|
2443
|
-
/***/ }),
|
|
2444
|
-
|
|
2445
|
-
/***/ "f583":
|
|
2329
|
+
/***/ "fb15":
|
|
2446
2330
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2447
2331
|
|
|
2448
2332
|
"use strict";
|
|
2449
2333
|
__webpack_require__.r(__webpack_exports__);
|
|
2450
2334
|
|
|
2451
|
-
//
|
|
2452
|
-
|
|
2453
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
2454
|
-
|
|
2455
|
-
// CONCATENATED MODULE: ./node_modules/vue-router/dist/vue-router.esm.js
|
|
2456
|
-
/*!
|
|
2457
|
-
* vue-router v3.6.5
|
|
2458
|
-
* (c) 2022 Evan You
|
|
2459
|
-
* @license MIT
|
|
2460
|
-
*/
|
|
2461
|
-
/* */
|
|
2462
|
-
|
|
2463
|
-
function assert (condition, message) {
|
|
2464
|
-
if (!condition) {
|
|
2465
|
-
throw new Error(("[vue-router] " + message))
|
|
2466
|
-
}
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
|
-
function warn (condition, message) {
|
|
2470
|
-
if (!condition) {
|
|
2471
|
-
typeof console !== 'undefined' && console.warn(("[vue-router] " + message));
|
|
2472
|
-
}
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
function extend (a, b) {
|
|
2476
|
-
for (var key in b) {
|
|
2477
|
-
a[key] = b[key];
|
|
2478
|
-
}
|
|
2479
|
-
return a
|
|
2480
|
-
}
|
|
2481
|
-
|
|
2482
|
-
/* */
|
|
2483
|
-
|
|
2484
|
-
var encodeReserveRE = /[!'()*]/g;
|
|
2485
|
-
var encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };
|
|
2486
|
-
var commaRE = /%2C/g;
|
|
2487
|
-
|
|
2488
|
-
// fixed encodeURIComponent which is more conformant to RFC3986:
|
|
2489
|
-
// - escapes [!'()*]
|
|
2490
|
-
// - preserve commas
|
|
2491
|
-
var encode = function (str) { return encodeURIComponent(str)
|
|
2492
|
-
.replace(encodeReserveRE, encodeReserveReplacer)
|
|
2493
|
-
.replace(commaRE, ','); };
|
|
2494
|
-
|
|
2495
|
-
function decode (str) {
|
|
2496
|
-
try {
|
|
2497
|
-
return decodeURIComponent(str)
|
|
2498
|
-
} catch (err) {
|
|
2499
|
-
if (false) {}
|
|
2500
|
-
}
|
|
2501
|
-
return str
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
function resolveQuery (
|
|
2505
|
-
query,
|
|
2506
|
-
extraQuery,
|
|
2507
|
-
_parseQuery
|
|
2508
|
-
) {
|
|
2509
|
-
if ( extraQuery === void 0 ) extraQuery = {};
|
|
2510
|
-
|
|
2511
|
-
var parse = _parseQuery || parseQuery;
|
|
2512
|
-
var parsedQuery;
|
|
2513
|
-
try {
|
|
2514
|
-
parsedQuery = parse(query || '');
|
|
2515
|
-
} catch (e) {
|
|
2516
|
-
"production" !== 'production' && warn(false, e.message);
|
|
2517
|
-
parsedQuery = {};
|
|
2518
|
-
}
|
|
2519
|
-
for (var key in extraQuery) {
|
|
2520
|
-
var value = extraQuery[key];
|
|
2521
|
-
parsedQuery[key] = Array.isArray(value)
|
|
2522
|
-
? value.map(castQueryParamValue)
|
|
2523
|
-
: castQueryParamValue(value);
|
|
2524
|
-
}
|
|
2525
|
-
return parsedQuery
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
var castQueryParamValue = function (value) { return (value == null || typeof value === 'object' ? value : String(value)); };
|
|
2529
|
-
|
|
2530
|
-
function parseQuery (query) {
|
|
2531
|
-
var res = {};
|
|
2532
|
-
|
|
2533
|
-
query = query.trim().replace(/^(\?|#|&)/, '');
|
|
2534
|
-
|
|
2535
|
-
if (!query) {
|
|
2536
|
-
return res
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
query.split('&').forEach(function (param) {
|
|
2540
|
-
var parts = param.replace(/\+/g, ' ').split('=');
|
|
2541
|
-
var key = decode(parts.shift());
|
|
2542
|
-
var val = parts.length > 0 ? decode(parts.join('=')) : null;
|
|
2543
|
-
|
|
2544
|
-
if (res[key] === undefined) {
|
|
2545
|
-
res[key] = val;
|
|
2546
|
-
} else if (Array.isArray(res[key])) {
|
|
2547
|
-
res[key].push(val);
|
|
2548
|
-
} else {
|
|
2549
|
-
res[key] = [res[key], val];
|
|
2550
|
-
}
|
|
2551
|
-
});
|
|
2552
|
-
|
|
2553
|
-
return res
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2556
|
-
function stringifyQuery (obj) {
|
|
2557
|
-
var res = obj
|
|
2558
|
-
? Object.keys(obj)
|
|
2559
|
-
.map(function (key) {
|
|
2560
|
-
var val = obj[key];
|
|
2561
|
-
|
|
2562
|
-
if (val === undefined) {
|
|
2563
|
-
return ''
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
|
-
if (val === null) {
|
|
2567
|
-
return encode(key)
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
|
-
if (Array.isArray(val)) {
|
|
2571
|
-
var result = [];
|
|
2572
|
-
val.forEach(function (val2) {
|
|
2573
|
-
if (val2 === undefined) {
|
|
2574
|
-
return
|
|
2575
|
-
}
|
|
2576
|
-
if (val2 === null) {
|
|
2577
|
-
result.push(encode(key));
|
|
2578
|
-
} else {
|
|
2579
|
-
result.push(encode(key) + '=' + encode(val2));
|
|
2580
|
-
}
|
|
2581
|
-
});
|
|
2582
|
-
return result.join('&')
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
|
-
return encode(key) + '=' + encode(val)
|
|
2586
|
-
})
|
|
2587
|
-
.filter(function (x) { return x.length > 0; })
|
|
2588
|
-
.join('&')
|
|
2589
|
-
: null;
|
|
2590
|
-
return res ? ("?" + res) : ''
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
/* */
|
|
2594
|
-
|
|
2595
|
-
var trailingSlashRE = /\/?$/;
|
|
2596
|
-
|
|
2597
|
-
function createRoute (
|
|
2598
|
-
record,
|
|
2599
|
-
location,
|
|
2600
|
-
redirectedFrom,
|
|
2601
|
-
router
|
|
2602
|
-
) {
|
|
2603
|
-
var stringifyQuery = router && router.options.stringifyQuery;
|
|
2335
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
2336
|
+
// This file is imported into lib/wc client bundles.
|
|
2604
2337
|
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
var route = {
|
|
2611
|
-
name: location.name || (record && record.name),
|
|
2612
|
-
meta: (record && record.meta) || {},
|
|
2613
|
-
path: location.path || '/',
|
|
2614
|
-
hash: location.hash || '',
|
|
2615
|
-
query: query,
|
|
2616
|
-
params: location.params || {},
|
|
2617
|
-
fullPath: getFullPath(location, stringifyQuery),
|
|
2618
|
-
matched: record ? formatMatch(record) : []
|
|
2619
|
-
};
|
|
2620
|
-
if (redirectedFrom) {
|
|
2621
|
-
route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);
|
|
2622
|
-
}
|
|
2623
|
-
return Object.freeze(route)
|
|
2624
|
-
}
|
|
2338
|
+
if (typeof window !== 'undefined') {
|
|
2339
|
+
var currentScript = window.document.currentScript
|
|
2340
|
+
if (true) {
|
|
2341
|
+
var getCurrentScript = __webpack_require__("8875")
|
|
2342
|
+
currentScript = getCurrentScript()
|
|
2625
2343
|
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
} else if (value && typeof value === 'object') {
|
|
2630
|
-
var res = {};
|
|
2631
|
-
for (var key in value) {
|
|
2632
|
-
res[key] = clone(value[key]);
|
|
2344
|
+
// for backward compatibility, because previously we directly included the polyfill
|
|
2345
|
+
if (!('currentScript' in document)) {
|
|
2346
|
+
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
|
2633
2347
|
}
|
|
2634
|
-
return res
|
|
2635
|
-
} else {
|
|
2636
|
-
return value
|
|
2637
|
-
}
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
// the starting route that represents the initial state
|
|
2641
|
-
var START = createRoute(null, {
|
|
2642
|
-
path: '/'
|
|
2643
|
-
});
|
|
2644
|
-
|
|
2645
|
-
function formatMatch (record) {
|
|
2646
|
-
var res = [];
|
|
2647
|
-
while (record) {
|
|
2648
|
-
res.unshift(record);
|
|
2649
|
-
record = record.parent;
|
|
2650
2348
|
}
|
|
2651
|
-
return res
|
|
2652
|
-
}
|
|
2653
2349
|
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
) {
|
|
2658
|
-
var path = ref.path;
|
|
2659
|
-
var query = ref.query; if ( query === void 0 ) query = {};
|
|
2660
|
-
var hash = ref.hash; if ( hash === void 0 ) hash = '';
|
|
2661
|
-
|
|
2662
|
-
var stringify = _stringifyQuery || stringifyQuery;
|
|
2663
|
-
return (path || '/') + stringify(query) + hash
|
|
2664
|
-
}
|
|
2665
|
-
|
|
2666
|
-
function isSameRoute (a, b, onlyPath) {
|
|
2667
|
-
if (b === START) {
|
|
2668
|
-
return a === b
|
|
2669
|
-
} else if (!b) {
|
|
2670
|
-
return false
|
|
2671
|
-
} else if (a.path && b.path) {
|
|
2672
|
-
return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && (onlyPath ||
|
|
2673
|
-
a.hash === b.hash &&
|
|
2674
|
-
isObjectEqual(a.query, b.query))
|
|
2675
|
-
} else if (a.name && b.name) {
|
|
2676
|
-
return (
|
|
2677
|
-
a.name === b.name &&
|
|
2678
|
-
(onlyPath || (
|
|
2679
|
-
a.hash === b.hash &&
|
|
2680
|
-
isObjectEqual(a.query, b.query) &&
|
|
2681
|
-
isObjectEqual(a.params, b.params))
|
|
2682
|
-
)
|
|
2683
|
-
)
|
|
2684
|
-
} else {
|
|
2685
|
-
return false
|
|
2350
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
2351
|
+
if (src) {
|
|
2352
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
2686
2353
|
}
|
|
2687
2354
|
}
|
|
2688
2355
|
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
if ( b === void 0 ) b = {};
|
|
2356
|
+
// Indicate to webpack that this file can be concatenated
|
|
2357
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
2692
2358
|
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
var
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
var bKey = bKeys[i];
|
|
2703
|
-
if (bKey !== key) { return false }
|
|
2704
|
-
var bVal = b[key];
|
|
2705
|
-
// query values can be null and undefined
|
|
2706
|
-
if (aVal == null || bVal == null) { return aVal === bVal }
|
|
2707
|
-
// check nested equality
|
|
2708
|
-
if (typeof aVal === 'object' && typeof bVal === 'object') {
|
|
2709
|
-
return isObjectEqual(aVal, bVal)
|
|
2359
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9ad868ba-vue-loader-template"}!./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ecyoa/email/src/index.vue?vue&type=template&id=5e809c44&scoped=true&
|
|
2360
|
+
var render = function render() {
|
|
2361
|
+
var _vm = this,
|
|
2362
|
+
_c = _vm._self._c;
|
|
2363
|
+
return _c('div', {
|
|
2364
|
+
staticClass: "app-wrapper",
|
|
2365
|
+
class: _vm.classObj,
|
|
2366
|
+
on: {
|
|
2367
|
+
"click": _vm.handleBodyOnClick
|
|
2710
2368
|
}
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
function isIncludedRoute (current, target) {
|
|
2716
|
-
return (
|
|
2717
|
-
current.path.replace(trailingSlashRE, '/').indexOf(
|
|
2718
|
-
target.path.replace(trailingSlashRE, '/')
|
|
2719
|
-
) === 0 &&
|
|
2720
|
-
(!target.hash || current.hash === target.hash) &&
|
|
2721
|
-
queryIncludes(current.query, target.query)
|
|
2722
|
-
)
|
|
2723
|
-
}
|
|
2724
|
-
|
|
2725
|
-
function queryIncludes (current, target) {
|
|
2726
|
-
for (var key in target) {
|
|
2727
|
-
if (!(key in current)) {
|
|
2728
|
-
return false
|
|
2369
|
+
}, [_vm.awaitShow ? _c('LeftMenu', {
|
|
2370
|
+
staticClass: "sidebar-container",
|
|
2371
|
+
on: {
|
|
2372
|
+
"getate": _vm.getate
|
|
2729
2373
|
}
|
|
2730
|
-
}
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
for (var name in record.instances) {
|
|
2738
|
-
var instance = record.instances[name];
|
|
2739
|
-
var cbs = record.enteredCbs[name];
|
|
2740
|
-
if (!instance || !cbs) { continue }
|
|
2741
|
-
delete record.enteredCbs[name];
|
|
2742
|
-
for (var i$1 = 0; i$1 < cbs.length; i$1++) {
|
|
2743
|
-
if (!instance._isBeingDestroyed) { cbs[i$1](instance); }
|
|
2744
|
-
}
|
|
2374
|
+
}) : _vm._e(), _c('div', {
|
|
2375
|
+
staticClass: "main-container",
|
|
2376
|
+
class: {
|
|
2377
|
+
hasTagsView: _vm.needTagsView
|
|
2378
|
+
},
|
|
2379
|
+
staticStyle: {
|
|
2380
|
+
"background": "#F4F6F9"
|
|
2745
2381
|
}
|
|
2746
|
-
}
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
props: {
|
|
2753
|
-
name: {
|
|
2754
|
-
type: String,
|
|
2755
|
-
default: 'default'
|
|
2382
|
+
}, [_c('div', {
|
|
2383
|
+
class: {
|
|
2384
|
+
'fixed-header': _vm.fixedHeader
|
|
2385
|
+
},
|
|
2386
|
+
staticStyle: {
|
|
2387
|
+
"position": "relative"
|
|
2756
2388
|
}
|
|
2757
|
-
},
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
var parent = ref.parent;
|
|
2762
|
-
var data = ref.data;
|
|
2763
|
-
|
|
2764
|
-
// used by devtools to display a router-view badge
|
|
2765
|
-
data.routerView = true;
|
|
2766
|
-
|
|
2767
|
-
// directly use parent context's createElement() function
|
|
2768
|
-
// so that components rendered by router-view can resolve named slots
|
|
2769
|
-
var h = parent.$createElement;
|
|
2770
|
-
var name = props.name;
|
|
2771
|
-
var route = parent.$route;
|
|
2772
|
-
var cache = parent._routerViewCache || (parent._routerViewCache = {});
|
|
2773
|
-
|
|
2774
|
-
// determine current view depth, also check to see if the tree
|
|
2775
|
-
// has been toggled inactive but kept-alive.
|
|
2776
|
-
var depth = 0;
|
|
2777
|
-
var inactive = false;
|
|
2778
|
-
while (parent && parent._routerRoot !== parent) {
|
|
2779
|
-
var vnodeData = parent.$vnode ? parent.$vnode.data : {};
|
|
2780
|
-
if (vnodeData.routerView) {
|
|
2781
|
-
depth++;
|
|
2782
|
-
}
|
|
2783
|
-
if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {
|
|
2784
|
-
inactive = true;
|
|
2785
|
-
}
|
|
2786
|
-
parent = parent.$parent;
|
|
2389
|
+
}, [_vm.needTagsView && _vm.showTopMenus ? _c('tags-view', {
|
|
2390
|
+
ref: "tagsView",
|
|
2391
|
+
staticStyle: {
|
|
2392
|
+
"padding-right": "245px"
|
|
2787
2393
|
}
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);
|
|
2799
|
-
}
|
|
2800
|
-
return h(cachedComponent, data, children)
|
|
2801
|
-
} else {
|
|
2802
|
-
// render previous empty view
|
|
2803
|
-
return h()
|
|
2394
|
+
}) : _vm._e(), _vm.show ? _c('div', {
|
|
2395
|
+
staticClass: "headInfo"
|
|
2396
|
+
}, [_c('div', {
|
|
2397
|
+
ref: "imgHead",
|
|
2398
|
+
staticStyle: {
|
|
2399
|
+
"cursor": "pointer"
|
|
2400
|
+
},
|
|
2401
|
+
on: {
|
|
2402
|
+
"click": function click($event) {
|
|
2403
|
+
_vm.accountDialog = !_vm.accountDialog;
|
|
2804
2404
|
}
|
|
2805
2405
|
}
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
return h()
|
|
2814
|
-
}
|
|
2815
|
-
|
|
2816
|
-
// cache component
|
|
2817
|
-
cache[name] = { component: component };
|
|
2818
|
-
|
|
2819
|
-
// attach instance registration hook
|
|
2820
|
-
// this will be called in the instance's injected lifecycle hooks
|
|
2821
|
-
data.registerRouteInstance = function (vm, val) {
|
|
2822
|
-
// val could be undefined for unregistration
|
|
2823
|
-
var current = matched.instances[name];
|
|
2824
|
-
if (
|
|
2825
|
-
(val && current !== vm) ||
|
|
2826
|
-
(!val && current === vm)
|
|
2827
|
-
) {
|
|
2828
|
-
matched.instances[name] = val;
|
|
2829
|
-
}
|
|
2406
|
+
}, [_c('div', {
|
|
2407
|
+
staticStyle: {
|
|
2408
|
+
"max-width": "200px",
|
|
2409
|
+
"display": "inline-block",
|
|
2410
|
+
"position": "absolute",
|
|
2411
|
+
"top": "16px",
|
|
2412
|
+
"right": "46px"
|
|
2830
2413
|
}
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
matched.instances[name] = vnode.componentInstance;
|
|
2836
|
-
};
|
|
2837
|
-
|
|
2838
|
-
// register instance in init hook
|
|
2839
|
-
// in case kept-alive component be actived when routes changed
|
|
2840
|
-
data.hook.init = function (vnode) {
|
|
2841
|
-
if (vnode.data.keepAlive &&
|
|
2842
|
-
vnode.componentInstance &&
|
|
2843
|
-
vnode.componentInstance !== matched.instances[name]
|
|
2844
|
-
) {
|
|
2845
|
-
matched.instances[name] = vnode.componentInstance;
|
|
2846
|
-
}
|
|
2847
|
-
|
|
2848
|
-
// if the route transition has already been confirmed then we weren't
|
|
2849
|
-
// able to call the cbs during confirmation as the component was not
|
|
2850
|
-
// registered yet, so we call it here.
|
|
2851
|
-
handleRouteEntered(route);
|
|
2852
|
-
};
|
|
2853
|
-
|
|
2854
|
-
var configProps = matched.props && matched.props[name];
|
|
2855
|
-
// save route and configProps in cache
|
|
2856
|
-
if (configProps) {
|
|
2857
|
-
extend(cache[name], {
|
|
2858
|
-
route: route,
|
|
2859
|
-
configProps: configProps
|
|
2860
|
-
});
|
|
2861
|
-
fillPropsinData(component, data, route, configProps);
|
|
2414
|
+
}, [_vm.valueHead !== null ? _c('div', {
|
|
2415
|
+
staticClass: "imgHead2",
|
|
2416
|
+
style: {
|
|
2417
|
+
'background-color': _vm.colorDisplay(_vm.valueHead)
|
|
2862
2418
|
}
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
function fillPropsinData (component, data, route, configProps) {
|
|
2869
|
-
// resolve props
|
|
2870
|
-
var propsToPass = data.props = resolveProps(route, configProps);
|
|
2871
|
-
if (propsToPass) {
|
|
2872
|
-
// clone to prevent mutation
|
|
2873
|
-
propsToPass = data.props = extend({}, propsToPass);
|
|
2874
|
-
// pass non-declared props as attrs
|
|
2875
|
-
var attrs = data.attrs = data.attrs || {};
|
|
2876
|
-
for (var key in propsToPass) {
|
|
2877
|
-
if (!component.props || !(key in component.props)) {
|
|
2878
|
-
attrs[key] = propsToPass[key];
|
|
2879
|
-
delete propsToPass[key];
|
|
2880
|
-
}
|
|
2881
|
-
}
|
|
2882
|
-
}
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
|
-
function resolveProps (route, config) {
|
|
2886
|
-
switch (typeof config) {
|
|
2887
|
-
case 'undefined':
|
|
2888
|
-
return
|
|
2889
|
-
case 'object':
|
|
2890
|
-
return config
|
|
2891
|
-
case 'function':
|
|
2892
|
-
return config(route)
|
|
2893
|
-
case 'boolean':
|
|
2894
|
-
return config ? route.params : undefined
|
|
2895
|
-
default:
|
|
2896
|
-
if (false) {}
|
|
2897
|
-
}
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
/* */
|
|
2901
|
-
|
|
2902
|
-
function resolvePath (
|
|
2903
|
-
relative,
|
|
2904
|
-
base,
|
|
2905
|
-
append
|
|
2906
|
-
) {
|
|
2907
|
-
var firstChar = relative.charAt(0);
|
|
2908
|
-
if (firstChar === '/') {
|
|
2909
|
-
return relative
|
|
2910
|
-
}
|
|
2911
|
-
|
|
2912
|
-
if (firstChar === '?' || firstChar === '#') {
|
|
2913
|
-
return base + relative
|
|
2914
|
-
}
|
|
2915
|
-
|
|
2916
|
-
var stack = base.split('/');
|
|
2917
|
-
|
|
2918
|
-
// remove trailing segment if:
|
|
2919
|
-
// - not appending
|
|
2920
|
-
// - appending to trailing slash (last segment is empty)
|
|
2921
|
-
if (!append || !stack[stack.length - 1]) {
|
|
2922
|
-
stack.pop();
|
|
2923
|
-
}
|
|
2924
|
-
|
|
2925
|
-
// resolve relative path
|
|
2926
|
-
var segments = relative.replace(/^\//, '').split('/');
|
|
2927
|
-
for (var i = 0; i < segments.length; i++) {
|
|
2928
|
-
var segment = segments[i];
|
|
2929
|
-
if (segment === '..') {
|
|
2930
|
-
stack.pop();
|
|
2931
|
-
} else if (segment !== '.') {
|
|
2932
|
-
stack.push(segment);
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
|
-
// ensure leading slash
|
|
2937
|
-
if (stack[0] !== '') {
|
|
2938
|
-
stack.unshift('');
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
|
-
return stack.join('/')
|
|
2942
|
-
}
|
|
2943
|
-
|
|
2944
|
-
function parsePath (path) {
|
|
2945
|
-
var hash = '';
|
|
2946
|
-
var query = '';
|
|
2947
|
-
|
|
2948
|
-
var hashIndex = path.indexOf('#');
|
|
2949
|
-
if (hashIndex >= 0) {
|
|
2950
|
-
hash = path.slice(hashIndex);
|
|
2951
|
-
path = path.slice(0, hashIndex);
|
|
2952
|
-
}
|
|
2953
|
-
|
|
2954
|
-
var queryIndex = path.indexOf('?');
|
|
2955
|
-
if (queryIndex >= 0) {
|
|
2956
|
-
query = path.slice(queryIndex + 1);
|
|
2957
|
-
path = path.slice(0, queryIndex);
|
|
2958
|
-
}
|
|
2959
|
-
|
|
2960
|
-
return {
|
|
2961
|
-
path: path,
|
|
2962
|
-
query: query,
|
|
2963
|
-
hash: hash
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
|
-
function cleanPath (path) {
|
|
2968
|
-
return path.replace(/\/(?:\s*\/)+/g, '/')
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
|
-
var isarray = Array.isArray || function (arr) {
|
|
2972
|
-
return Object.prototype.toString.call(arr) == '[object Array]';
|
|
2973
|
-
};
|
|
2974
|
-
|
|
2975
|
-
/**
|
|
2976
|
-
* Expose `pathToRegexp`.
|
|
2977
|
-
*/
|
|
2978
|
-
var pathToRegexp_1 = pathToRegexp;
|
|
2979
|
-
var parse_1 = parse;
|
|
2980
|
-
var compile_1 = compile;
|
|
2981
|
-
var tokensToFunction_1 = tokensToFunction;
|
|
2982
|
-
var tokensToRegExp_1 = tokensToRegExp;
|
|
2983
|
-
|
|
2984
|
-
/**
|
|
2985
|
-
* The main path matching regexp utility.
|
|
2986
|
-
*
|
|
2987
|
-
* @type {RegExp}
|
|
2988
|
-
*/
|
|
2989
|
-
var PATH_REGEXP = new RegExp([
|
|
2990
|
-
// Match escaped characters that would otherwise appear in future matches.
|
|
2991
|
-
// This allows the user to escape special characters that won't transform.
|
|
2992
|
-
'(\\\\.)',
|
|
2993
|
-
// Match Express-style parameters and un-named parameters with a prefix
|
|
2994
|
-
// and optional suffixes. Matches appear as:
|
|
2995
|
-
//
|
|
2996
|
-
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
|
2997
|
-
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
|
2998
|
-
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
|
2999
|
-
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
|
3000
|
-
].join('|'), 'g');
|
|
3001
|
-
|
|
3002
|
-
/**
|
|
3003
|
-
* Parse a string for the raw tokens.
|
|
3004
|
-
*
|
|
3005
|
-
* @param {string} str
|
|
3006
|
-
* @param {Object=} options
|
|
3007
|
-
* @return {!Array}
|
|
3008
|
-
*/
|
|
3009
|
-
function parse (str, options) {
|
|
3010
|
-
var tokens = [];
|
|
3011
|
-
var key = 0;
|
|
3012
|
-
var index = 0;
|
|
3013
|
-
var path = '';
|
|
3014
|
-
var defaultDelimiter = options && options.delimiter || '/';
|
|
3015
|
-
var res;
|
|
3016
|
-
|
|
3017
|
-
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
3018
|
-
var m = res[0];
|
|
3019
|
-
var escaped = res[1];
|
|
3020
|
-
var offset = res.index;
|
|
3021
|
-
path += str.slice(index, offset);
|
|
3022
|
-
index = offset + m.length;
|
|
3023
|
-
|
|
3024
|
-
// Ignore already escaped sequences.
|
|
3025
|
-
if (escaped) {
|
|
3026
|
-
path += escaped[1];
|
|
3027
|
-
continue
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
var next = str[index];
|
|
3031
|
-
var prefix = res[2];
|
|
3032
|
-
var name = res[3];
|
|
3033
|
-
var capture = res[4];
|
|
3034
|
-
var group = res[5];
|
|
3035
|
-
var modifier = res[6];
|
|
3036
|
-
var asterisk = res[7];
|
|
3037
|
-
|
|
3038
|
-
// Push the current path onto the tokens.
|
|
3039
|
-
if (path) {
|
|
3040
|
-
tokens.push(path);
|
|
3041
|
-
path = '';
|
|
3042
|
-
}
|
|
3043
|
-
|
|
3044
|
-
var partial = prefix != null && next != null && next !== prefix;
|
|
3045
|
-
var repeat = modifier === '+' || modifier === '*';
|
|
3046
|
-
var optional = modifier === '?' || modifier === '*';
|
|
3047
|
-
var delimiter = res[2] || defaultDelimiter;
|
|
3048
|
-
var pattern = capture || group;
|
|
3049
|
-
|
|
3050
|
-
tokens.push({
|
|
3051
|
-
name: name || key++,
|
|
3052
|
-
prefix: prefix || '',
|
|
3053
|
-
delimiter: delimiter,
|
|
3054
|
-
optional: optional,
|
|
3055
|
-
repeat: repeat,
|
|
3056
|
-
partial: partial,
|
|
3057
|
-
asterisk: !!asterisk,
|
|
3058
|
-
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
|
3059
|
-
});
|
|
3060
|
-
}
|
|
3061
|
-
|
|
3062
|
-
// Match any characters still remaining.
|
|
3063
|
-
if (index < str.length) {
|
|
3064
|
-
path += str.substr(index);
|
|
3065
|
-
}
|
|
3066
|
-
|
|
3067
|
-
// If the path exists, push it onto the end.
|
|
3068
|
-
if (path) {
|
|
3069
|
-
tokens.push(path);
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3072
|
-
return tokens
|
|
3073
|
-
}
|
|
3074
|
-
|
|
3075
|
-
/**
|
|
3076
|
-
* Compile a string to a template function for the path.
|
|
3077
|
-
*
|
|
3078
|
-
* @param {string} str
|
|
3079
|
-
* @param {Object=} options
|
|
3080
|
-
* @return {!function(Object=, Object=)}
|
|
3081
|
-
*/
|
|
3082
|
-
function compile (str, options) {
|
|
3083
|
-
return tokensToFunction(parse(str, options), options)
|
|
3084
|
-
}
|
|
3085
|
-
|
|
3086
|
-
/**
|
|
3087
|
-
* Prettier encoding of URI path segments.
|
|
3088
|
-
*
|
|
3089
|
-
* @param {string}
|
|
3090
|
-
* @return {string}
|
|
3091
|
-
*/
|
|
3092
|
-
function encodeURIComponentPretty (str) {
|
|
3093
|
-
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
|
3094
|
-
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
|
3095
|
-
})
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3098
|
-
/**
|
|
3099
|
-
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
|
3100
|
-
*
|
|
3101
|
-
* @param {string}
|
|
3102
|
-
* @return {string}
|
|
3103
|
-
*/
|
|
3104
|
-
function encodeAsterisk (str) {
|
|
3105
|
-
return encodeURI(str).replace(/[?#]/g, function (c) {
|
|
3106
|
-
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
|
3107
|
-
})
|
|
3108
|
-
}
|
|
3109
|
-
|
|
3110
|
-
/**
|
|
3111
|
-
* Expose a method for transforming tokens into the path function.
|
|
3112
|
-
*/
|
|
3113
|
-
function tokensToFunction (tokens, options) {
|
|
3114
|
-
// Compile all the tokens into regexps.
|
|
3115
|
-
var matches = new Array(tokens.length);
|
|
3116
|
-
|
|
3117
|
-
// Compile all the patterns before compilation.
|
|
3118
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
3119
|
-
if (typeof tokens[i] === 'object') {
|
|
3120
|
-
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));
|
|
3121
|
-
}
|
|
3122
|
-
}
|
|
3123
|
-
|
|
3124
|
-
return function (obj, opts) {
|
|
3125
|
-
var path = '';
|
|
3126
|
-
var data = obj || {};
|
|
3127
|
-
var options = opts || {};
|
|
3128
|
-
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;
|
|
3129
|
-
|
|
3130
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
3131
|
-
var token = tokens[i];
|
|
3132
|
-
|
|
3133
|
-
if (typeof token === 'string') {
|
|
3134
|
-
path += token;
|
|
3135
|
-
|
|
3136
|
-
continue
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
|
-
var value = data[token.name];
|
|
3140
|
-
var segment;
|
|
3141
|
-
|
|
3142
|
-
if (value == null) {
|
|
3143
|
-
if (token.optional) {
|
|
3144
|
-
// Prepend partial segment prefixes.
|
|
3145
|
-
if (token.partial) {
|
|
3146
|
-
path += token.prefix;
|
|
3147
|
-
}
|
|
3148
|
-
|
|
3149
|
-
continue
|
|
3150
|
-
} else {
|
|
3151
|
-
throw new TypeError('Expected "' + token.name + '" to be defined')
|
|
3152
|
-
}
|
|
3153
|
-
}
|
|
3154
|
-
|
|
3155
|
-
if (isarray(value)) {
|
|
3156
|
-
if (!token.repeat) {
|
|
3157
|
-
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
|
3158
|
-
}
|
|
3159
|
-
|
|
3160
|
-
if (value.length === 0) {
|
|
3161
|
-
if (token.optional) {
|
|
3162
|
-
continue
|
|
3163
|
-
} else {
|
|
3164
|
-
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
|
3165
|
-
}
|
|
3166
|
-
}
|
|
3167
|
-
|
|
3168
|
-
for (var j = 0; j < value.length; j++) {
|
|
3169
|
-
segment = encode(value[j]);
|
|
3170
|
-
|
|
3171
|
-
if (!matches[i].test(segment)) {
|
|
3172
|
-
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
|
|
3173
|
-
}
|
|
3174
|
-
|
|
3175
|
-
path += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
3176
|
-
}
|
|
3177
|
-
|
|
3178
|
-
continue
|
|
3179
|
-
}
|
|
3180
|
-
|
|
3181
|
-
segment = token.asterisk ? encodeAsterisk(value) : encode(value);
|
|
3182
|
-
|
|
3183
|
-
if (!matches[i].test(segment)) {
|
|
3184
|
-
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
path += token.prefix + segment;
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
|
-
return path
|
|
3191
|
-
}
|
|
3192
|
-
}
|
|
3193
|
-
|
|
3194
|
-
/**
|
|
3195
|
-
* Escape a regular expression string.
|
|
3196
|
-
*
|
|
3197
|
-
* @param {string} str
|
|
3198
|
-
* @return {string}
|
|
3199
|
-
*/
|
|
3200
|
-
function escapeString (str) {
|
|
3201
|
-
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
|
3202
|
-
}
|
|
3203
|
-
|
|
3204
|
-
/**
|
|
3205
|
-
* Escape the capturing group by escaping special characters and meaning.
|
|
3206
|
-
*
|
|
3207
|
-
* @param {string} group
|
|
3208
|
-
* @return {string}
|
|
3209
|
-
*/
|
|
3210
|
-
function escapeGroup (group) {
|
|
3211
|
-
return group.replace(/([=!:$\/()])/g, '\\$1')
|
|
3212
|
-
}
|
|
3213
|
-
|
|
3214
|
-
/**
|
|
3215
|
-
* Attach the keys as a property of the regexp.
|
|
3216
|
-
*
|
|
3217
|
-
* @param {!RegExp} re
|
|
3218
|
-
* @param {Array} keys
|
|
3219
|
-
* @return {!RegExp}
|
|
3220
|
-
*/
|
|
3221
|
-
function attachKeys (re, keys) {
|
|
3222
|
-
re.keys = keys;
|
|
3223
|
-
return re
|
|
3224
|
-
}
|
|
3225
|
-
|
|
3226
|
-
/**
|
|
3227
|
-
* Get the flags for a regexp from the options.
|
|
3228
|
-
*
|
|
3229
|
-
* @param {Object} options
|
|
3230
|
-
* @return {string}
|
|
3231
|
-
*/
|
|
3232
|
-
function flags (options) {
|
|
3233
|
-
return options && options.sensitive ? '' : 'i'
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3236
|
-
/**
|
|
3237
|
-
* Pull out keys from a regexp.
|
|
3238
|
-
*
|
|
3239
|
-
* @param {!RegExp} path
|
|
3240
|
-
* @param {!Array} keys
|
|
3241
|
-
* @return {!RegExp}
|
|
3242
|
-
*/
|
|
3243
|
-
function regexpToRegexp (path, keys) {
|
|
3244
|
-
// Use a negative lookahead to match only capturing groups.
|
|
3245
|
-
var groups = path.source.match(/\((?!\?)/g);
|
|
3246
|
-
|
|
3247
|
-
if (groups) {
|
|
3248
|
-
for (var i = 0; i < groups.length; i++) {
|
|
3249
|
-
keys.push({
|
|
3250
|
-
name: i,
|
|
3251
|
-
prefix: null,
|
|
3252
|
-
delimiter: null,
|
|
3253
|
-
optional: false,
|
|
3254
|
-
repeat: false,
|
|
3255
|
-
partial: false,
|
|
3256
|
-
asterisk: false,
|
|
3257
|
-
pattern: null
|
|
3258
|
-
});
|
|
3259
|
-
}
|
|
3260
|
-
}
|
|
3261
|
-
|
|
3262
|
-
return attachKeys(path, keys)
|
|
3263
|
-
}
|
|
3264
|
-
|
|
3265
|
-
/**
|
|
3266
|
-
* Transform an array into a regexp.
|
|
3267
|
-
*
|
|
3268
|
-
* @param {!Array} path
|
|
3269
|
-
* @param {Array} keys
|
|
3270
|
-
* @param {!Object} options
|
|
3271
|
-
* @return {!RegExp}
|
|
3272
|
-
*/
|
|
3273
|
-
function arrayToRegexp (path, keys, options) {
|
|
3274
|
-
var parts = [];
|
|
3275
|
-
|
|
3276
|
-
for (var i = 0; i < path.length; i++) {
|
|
3277
|
-
parts.push(pathToRegexp(path[i], keys, options).source);
|
|
3278
|
-
}
|
|
3279
|
-
|
|
3280
|
-
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
|
|
3281
|
-
|
|
3282
|
-
return attachKeys(regexp, keys)
|
|
3283
|
-
}
|
|
3284
|
-
|
|
3285
|
-
/**
|
|
3286
|
-
* Create a path regexp from string input.
|
|
3287
|
-
*
|
|
3288
|
-
* @param {string} path
|
|
3289
|
-
* @param {!Array} keys
|
|
3290
|
-
* @param {!Object} options
|
|
3291
|
-
* @return {!RegExp}
|
|
3292
|
-
*/
|
|
3293
|
-
function stringToRegexp (path, keys, options) {
|
|
3294
|
-
return tokensToRegExp(parse(path, options), keys, options)
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
|
-
/**
|
|
3298
|
-
* Expose a function for taking tokens and returning a RegExp.
|
|
3299
|
-
*
|
|
3300
|
-
* @param {!Array} tokens
|
|
3301
|
-
* @param {(Array|Object)=} keys
|
|
3302
|
-
* @param {Object=} options
|
|
3303
|
-
* @return {!RegExp}
|
|
3304
|
-
*/
|
|
3305
|
-
function tokensToRegExp (tokens, keys, options) {
|
|
3306
|
-
if (!isarray(keys)) {
|
|
3307
|
-
options = /** @type {!Object} */ (keys || options);
|
|
3308
|
-
keys = [];
|
|
3309
|
-
}
|
|
3310
|
-
|
|
3311
|
-
options = options || {};
|
|
3312
|
-
|
|
3313
|
-
var strict = options.strict;
|
|
3314
|
-
var end = options.end !== false;
|
|
3315
|
-
var route = '';
|
|
3316
|
-
|
|
3317
|
-
// Iterate over the tokens and create our regexp string.
|
|
3318
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
3319
|
-
var token = tokens[i];
|
|
3320
|
-
|
|
3321
|
-
if (typeof token === 'string') {
|
|
3322
|
-
route += escapeString(token);
|
|
3323
|
-
} else {
|
|
3324
|
-
var prefix = escapeString(token.prefix);
|
|
3325
|
-
var capture = '(?:' + token.pattern + ')';
|
|
3326
|
-
|
|
3327
|
-
keys.push(token);
|
|
3328
|
-
|
|
3329
|
-
if (token.repeat) {
|
|
3330
|
-
capture += '(?:' + prefix + capture + ')*';
|
|
3331
|
-
}
|
|
3332
|
-
|
|
3333
|
-
if (token.optional) {
|
|
3334
|
-
if (!token.partial) {
|
|
3335
|
-
capture = '(?:' + prefix + '(' + capture + '))?';
|
|
3336
|
-
} else {
|
|
3337
|
-
capture = prefix + '(' + capture + ')?';
|
|
3338
|
-
}
|
|
3339
|
-
} else {
|
|
3340
|
-
capture = prefix + '(' + capture + ')';
|
|
3341
|
-
}
|
|
3342
|
-
|
|
3343
|
-
route += capture;
|
|
3344
|
-
}
|
|
3345
|
-
}
|
|
3346
|
-
|
|
3347
|
-
var delimiter = escapeString(options.delimiter || '/');
|
|
3348
|
-
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
|
|
3349
|
-
|
|
3350
|
-
// In non-strict mode we allow a slash at the end of match. If the path to
|
|
3351
|
-
// match already ends with a slash, we remove it for consistency. The slash
|
|
3352
|
-
// is valid at the end of a path match, not in the middle. This is important
|
|
3353
|
-
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
|
3354
|
-
if (!strict) {
|
|
3355
|
-
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';
|
|
3356
|
-
}
|
|
3357
|
-
|
|
3358
|
-
if (end) {
|
|
3359
|
-
route += '$';
|
|
3360
|
-
} else {
|
|
3361
|
-
// In non-ending mode, we need the capturing groups to match as much as
|
|
3362
|
-
// possible by using a positive lookahead to the end or next path segment.
|
|
3363
|
-
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';
|
|
3364
|
-
}
|
|
3365
|
-
|
|
3366
|
-
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
|
-
/**
|
|
3370
|
-
* Normalize the given path string, returning a regular expression.
|
|
3371
|
-
*
|
|
3372
|
-
* An empty array can be passed in for the keys, which will hold the
|
|
3373
|
-
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
|
3374
|
-
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
|
3375
|
-
*
|
|
3376
|
-
* @param {(string|RegExp|Array)} path
|
|
3377
|
-
* @param {(Array|Object)=} keys
|
|
3378
|
-
* @param {Object=} options
|
|
3379
|
-
* @return {!RegExp}
|
|
3380
|
-
*/
|
|
3381
|
-
function pathToRegexp (path, keys, options) {
|
|
3382
|
-
if (!isarray(keys)) {
|
|
3383
|
-
options = /** @type {!Object} */ (keys || options);
|
|
3384
|
-
keys = [];
|
|
3385
|
-
}
|
|
3386
|
-
|
|
3387
|
-
options = options || {};
|
|
3388
|
-
|
|
3389
|
-
if (path instanceof RegExp) {
|
|
3390
|
-
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
|
3391
|
-
}
|
|
3392
|
-
|
|
3393
|
-
if (isarray(path)) {
|
|
3394
|
-
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
|
3398
|
-
}
|
|
3399
|
-
pathToRegexp_1.parse = parse_1;
|
|
3400
|
-
pathToRegexp_1.compile = compile_1;
|
|
3401
|
-
pathToRegexp_1.tokensToFunction = tokensToFunction_1;
|
|
3402
|
-
pathToRegexp_1.tokensToRegExp = tokensToRegExp_1;
|
|
3403
|
-
|
|
3404
|
-
/* */
|
|
3405
|
-
|
|
3406
|
-
// $flow-disable-line
|
|
3407
|
-
var regexpCompileCache = Object.create(null);
|
|
3408
|
-
|
|
3409
|
-
function fillParams (
|
|
3410
|
-
path,
|
|
3411
|
-
params,
|
|
3412
|
-
routeMsg
|
|
3413
|
-
) {
|
|
3414
|
-
params = params || {};
|
|
3415
|
-
try {
|
|
3416
|
-
var filler =
|
|
3417
|
-
regexpCompileCache[path] ||
|
|
3418
|
-
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
|
|
3419
|
-
|
|
3420
|
-
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
|
|
3421
|
-
// and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string
|
|
3422
|
-
if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }
|
|
3423
|
-
|
|
3424
|
-
return filler(params, { pretty: true })
|
|
3425
|
-
} catch (e) {
|
|
3426
|
-
if (false) {}
|
|
3427
|
-
return ''
|
|
3428
|
-
} finally {
|
|
3429
|
-
// delete the 0 if it was added
|
|
3430
|
-
delete params[0];
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
|
|
3434
|
-
/* */
|
|
3435
|
-
|
|
3436
|
-
function normalizeLocation (
|
|
3437
|
-
raw,
|
|
3438
|
-
current,
|
|
3439
|
-
append,
|
|
3440
|
-
router
|
|
3441
|
-
) {
|
|
3442
|
-
var next = typeof raw === 'string' ? { path: raw } : raw;
|
|
3443
|
-
// named target
|
|
3444
|
-
if (next._normalized) {
|
|
3445
|
-
return next
|
|
3446
|
-
} else if (next.name) {
|
|
3447
|
-
next = extend({}, raw);
|
|
3448
|
-
var params = next.params;
|
|
3449
|
-
if (params && typeof params === 'object') {
|
|
3450
|
-
next.params = extend({}, params);
|
|
3451
|
-
}
|
|
3452
|
-
return next
|
|
3453
|
-
}
|
|
3454
|
-
|
|
3455
|
-
// relative params
|
|
3456
|
-
if (!next.path && next.params && current) {
|
|
3457
|
-
next = extend({}, next);
|
|
3458
|
-
next._normalized = true;
|
|
3459
|
-
var params$1 = extend(extend({}, current.params), next.params);
|
|
3460
|
-
if (current.name) {
|
|
3461
|
-
next.name = current.name;
|
|
3462
|
-
next.params = params$1;
|
|
3463
|
-
} else if (current.matched.length) {
|
|
3464
|
-
var rawPath = current.matched[current.matched.length - 1].path;
|
|
3465
|
-
next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
|
|
3466
|
-
} else if (false) {}
|
|
3467
|
-
return next
|
|
3468
|
-
}
|
|
3469
|
-
|
|
3470
|
-
var parsedPath = parsePath(next.path || '');
|
|
3471
|
-
var basePath = (current && current.path) || '/';
|
|
3472
|
-
var path = parsedPath.path
|
|
3473
|
-
? resolvePath(parsedPath.path, basePath, append || next.append)
|
|
3474
|
-
: basePath;
|
|
3475
|
-
|
|
3476
|
-
var query = resolveQuery(
|
|
3477
|
-
parsedPath.query,
|
|
3478
|
-
next.query,
|
|
3479
|
-
router && router.options.parseQuery
|
|
3480
|
-
);
|
|
3481
|
-
|
|
3482
|
-
var hash = next.hash || parsedPath.hash;
|
|
3483
|
-
if (hash && hash.charAt(0) !== '#') {
|
|
3484
|
-
hash = "#" + hash;
|
|
3485
|
-
}
|
|
3486
|
-
|
|
3487
|
-
return {
|
|
3488
|
-
_normalized: true,
|
|
3489
|
-
path: path,
|
|
3490
|
-
query: query,
|
|
3491
|
-
hash: hash
|
|
3492
|
-
}
|
|
3493
|
-
}
|
|
3494
|
-
|
|
3495
|
-
/* */
|
|
3496
|
-
|
|
3497
|
-
// work around weird flow bug
|
|
3498
|
-
var toTypes = [String, Object];
|
|
3499
|
-
var eventTypes = [String, Array];
|
|
3500
|
-
|
|
3501
|
-
var noop = function () {};
|
|
3502
|
-
|
|
3503
|
-
var warnedCustomSlot;
|
|
3504
|
-
var warnedTagProp;
|
|
3505
|
-
var warnedEventProp;
|
|
3506
|
-
|
|
3507
|
-
var Link = {
|
|
3508
|
-
name: 'RouterLink',
|
|
3509
|
-
props: {
|
|
3510
|
-
to: {
|
|
3511
|
-
type: toTypes,
|
|
3512
|
-
required: true
|
|
3513
|
-
},
|
|
3514
|
-
tag: {
|
|
3515
|
-
type: String,
|
|
3516
|
-
default: 'a'
|
|
3517
|
-
},
|
|
3518
|
-
custom: Boolean,
|
|
3519
|
-
exact: Boolean,
|
|
3520
|
-
exactPath: Boolean,
|
|
3521
|
-
append: Boolean,
|
|
3522
|
-
replace: Boolean,
|
|
3523
|
-
activeClass: String,
|
|
3524
|
-
exactActiveClass: String,
|
|
3525
|
-
ariaCurrentValue: {
|
|
3526
|
-
type: String,
|
|
3527
|
-
default: 'page'
|
|
3528
|
-
},
|
|
3529
|
-
event: {
|
|
3530
|
-
type: eventTypes,
|
|
3531
|
-
default: 'click'
|
|
3532
|
-
}
|
|
3533
|
-
},
|
|
3534
|
-
render: function render (h) {
|
|
3535
|
-
var this$1$1 = this;
|
|
3536
|
-
|
|
3537
|
-
var router = this.$router;
|
|
3538
|
-
var current = this.$route;
|
|
3539
|
-
var ref = router.resolve(
|
|
3540
|
-
this.to,
|
|
3541
|
-
current,
|
|
3542
|
-
this.append
|
|
3543
|
-
);
|
|
3544
|
-
var location = ref.location;
|
|
3545
|
-
var route = ref.route;
|
|
3546
|
-
var href = ref.href;
|
|
3547
|
-
|
|
3548
|
-
var classes = {};
|
|
3549
|
-
var globalActiveClass = router.options.linkActiveClass;
|
|
3550
|
-
var globalExactActiveClass = router.options.linkExactActiveClass;
|
|
3551
|
-
// Support global empty active class
|
|
3552
|
-
var activeClassFallback =
|
|
3553
|
-
globalActiveClass == null ? 'router-link-active' : globalActiveClass;
|
|
3554
|
-
var exactActiveClassFallback =
|
|
3555
|
-
globalExactActiveClass == null
|
|
3556
|
-
? 'router-link-exact-active'
|
|
3557
|
-
: globalExactActiveClass;
|
|
3558
|
-
var activeClass =
|
|
3559
|
-
this.activeClass == null ? activeClassFallback : this.activeClass;
|
|
3560
|
-
var exactActiveClass =
|
|
3561
|
-
this.exactActiveClass == null
|
|
3562
|
-
? exactActiveClassFallback
|
|
3563
|
-
: this.exactActiveClass;
|
|
3564
|
-
|
|
3565
|
-
var compareTarget = route.redirectedFrom
|
|
3566
|
-
? createRoute(null, normalizeLocation(route.redirectedFrom), null, router)
|
|
3567
|
-
: route;
|
|
3568
|
-
|
|
3569
|
-
classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);
|
|
3570
|
-
classes[activeClass] = this.exact || this.exactPath
|
|
3571
|
-
? classes[exactActiveClass]
|
|
3572
|
-
: isIncludedRoute(current, compareTarget);
|
|
3573
|
-
|
|
3574
|
-
var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;
|
|
3575
|
-
|
|
3576
|
-
var handler = function (e) {
|
|
3577
|
-
if (guardEvent(e)) {
|
|
3578
|
-
if (this$1$1.replace) {
|
|
3579
|
-
router.replace(location, noop);
|
|
3580
|
-
} else {
|
|
3581
|
-
router.push(location, noop);
|
|
3582
|
-
}
|
|
3583
|
-
}
|
|
3584
|
-
};
|
|
3585
|
-
|
|
3586
|
-
var on = { click: guardEvent };
|
|
3587
|
-
if (Array.isArray(this.event)) {
|
|
3588
|
-
this.event.forEach(function (e) {
|
|
3589
|
-
on[e] = handler;
|
|
3590
|
-
});
|
|
3591
|
-
} else {
|
|
3592
|
-
on[this.event] = handler;
|
|
3593
|
-
}
|
|
3594
|
-
|
|
3595
|
-
var data = { class: classes };
|
|
3596
|
-
|
|
3597
|
-
var scopedSlot =
|
|
3598
|
-
!this.$scopedSlots.$hasNormal &&
|
|
3599
|
-
this.$scopedSlots.default &&
|
|
3600
|
-
this.$scopedSlots.default({
|
|
3601
|
-
href: href,
|
|
3602
|
-
route: route,
|
|
3603
|
-
navigate: handler,
|
|
3604
|
-
isActive: classes[activeClass],
|
|
3605
|
-
isExactActive: classes[exactActiveClass]
|
|
3606
|
-
});
|
|
3607
|
-
|
|
3608
|
-
if (scopedSlot) {
|
|
3609
|
-
if (false) {}
|
|
3610
|
-
if (scopedSlot.length === 1) {
|
|
3611
|
-
return scopedSlot[0]
|
|
3612
|
-
} else if (scopedSlot.length > 1 || !scopedSlot.length) {
|
|
3613
|
-
if (false) {}
|
|
3614
|
-
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
|
|
3615
|
-
}
|
|
3616
|
-
}
|
|
3617
|
-
|
|
3618
|
-
if (false) {}
|
|
3619
|
-
|
|
3620
|
-
if (this.tag === 'a') {
|
|
3621
|
-
data.on = on;
|
|
3622
|
-
data.attrs = { href: href, 'aria-current': ariaCurrentValue };
|
|
3623
|
-
} else {
|
|
3624
|
-
// find the first <a> child and apply listener and href
|
|
3625
|
-
var a = findAnchor(this.$slots.default);
|
|
3626
|
-
if (a) {
|
|
3627
|
-
// in case the <a> is a static node
|
|
3628
|
-
a.isStatic = false;
|
|
3629
|
-
var aData = (a.data = extend({}, a.data));
|
|
3630
|
-
aData.on = aData.on || {};
|
|
3631
|
-
// transform existing events in both objects into arrays so we can push later
|
|
3632
|
-
for (var event in aData.on) {
|
|
3633
|
-
var handler$1 = aData.on[event];
|
|
3634
|
-
if (event in on) {
|
|
3635
|
-
aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];
|
|
3636
|
-
}
|
|
3637
|
-
}
|
|
3638
|
-
// append new listeners for router-link
|
|
3639
|
-
for (var event$1 in on) {
|
|
3640
|
-
if (event$1 in aData.on) {
|
|
3641
|
-
// on[event] is always a function
|
|
3642
|
-
aData.on[event$1].push(on[event$1]);
|
|
3643
|
-
} else {
|
|
3644
|
-
aData.on[event$1] = handler;
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
|
|
3648
|
-
var aAttrs = (a.data.attrs = extend({}, a.data.attrs));
|
|
3649
|
-
aAttrs.href = href;
|
|
3650
|
-
aAttrs['aria-current'] = ariaCurrentValue;
|
|
3651
|
-
} else {
|
|
3652
|
-
// doesn't have <a> child, apply listener to self
|
|
3653
|
-
data.on = on;
|
|
3654
|
-
}
|
|
3655
|
-
}
|
|
3656
|
-
|
|
3657
|
-
return h(this.tag, data, this.$slots.default)
|
|
3658
|
-
}
|
|
3659
|
-
};
|
|
3660
|
-
|
|
3661
|
-
function guardEvent (e) {
|
|
3662
|
-
// don't redirect with control keys
|
|
3663
|
-
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }
|
|
3664
|
-
// don't redirect when preventDefault called
|
|
3665
|
-
if (e.defaultPrevented) { return }
|
|
3666
|
-
// don't redirect on right click
|
|
3667
|
-
if (e.button !== undefined && e.button !== 0) { return }
|
|
3668
|
-
// don't redirect if `target="_blank"`
|
|
3669
|
-
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
3670
|
-
var target = e.currentTarget.getAttribute('target');
|
|
3671
|
-
if (/\b_blank\b/i.test(target)) { return }
|
|
3672
|
-
}
|
|
3673
|
-
// this may be a Weex event which doesn't have this method
|
|
3674
|
-
if (e.preventDefault) {
|
|
3675
|
-
e.preventDefault();
|
|
3676
|
-
}
|
|
3677
|
-
return true
|
|
3678
|
-
}
|
|
3679
|
-
|
|
3680
|
-
function findAnchor (children) {
|
|
3681
|
-
if (children) {
|
|
3682
|
-
var child;
|
|
3683
|
-
for (var i = 0; i < children.length; i++) {
|
|
3684
|
-
child = children[i];
|
|
3685
|
-
if (child.tag === 'a') {
|
|
3686
|
-
return child
|
|
3687
|
-
}
|
|
3688
|
-
if (child.children && (child = findAnchor(child.children))) {
|
|
3689
|
-
return child
|
|
3690
|
-
}
|
|
3691
|
-
}
|
|
3692
|
-
}
|
|
3693
|
-
}
|
|
3694
|
-
|
|
3695
|
-
var _Vue;
|
|
3696
|
-
|
|
3697
|
-
function install (Vue) {
|
|
3698
|
-
if (install.installed && _Vue === Vue) { return }
|
|
3699
|
-
install.installed = true;
|
|
3700
|
-
|
|
3701
|
-
_Vue = Vue;
|
|
3702
|
-
|
|
3703
|
-
var isDef = function (v) { return v !== undefined; };
|
|
3704
|
-
|
|
3705
|
-
var registerInstance = function (vm, callVal) {
|
|
3706
|
-
var i = vm.$options._parentVnode;
|
|
3707
|
-
if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {
|
|
3708
|
-
i(vm, callVal);
|
|
3709
|
-
}
|
|
3710
|
-
};
|
|
3711
|
-
|
|
3712
|
-
Vue.mixin({
|
|
3713
|
-
beforeCreate: function beforeCreate () {
|
|
3714
|
-
if (isDef(this.$options.router)) {
|
|
3715
|
-
this._routerRoot = this;
|
|
3716
|
-
this._router = this.$options.router;
|
|
3717
|
-
this._router.init(this);
|
|
3718
|
-
Vue.util.defineReactive(this, '_route', this._router.history.current);
|
|
3719
|
-
} else {
|
|
3720
|
-
this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;
|
|
3721
|
-
}
|
|
3722
|
-
registerInstance(this, this);
|
|
3723
|
-
},
|
|
3724
|
-
destroyed: function destroyed () {
|
|
3725
|
-
registerInstance(this);
|
|
3726
|
-
}
|
|
3727
|
-
});
|
|
3728
|
-
|
|
3729
|
-
Object.defineProperty(Vue.prototype, '$router', {
|
|
3730
|
-
get: function get () { return this._routerRoot._router }
|
|
3731
|
-
});
|
|
3732
|
-
|
|
3733
|
-
Object.defineProperty(Vue.prototype, '$route', {
|
|
3734
|
-
get: function get () { return this._routerRoot._route }
|
|
3735
|
-
});
|
|
3736
|
-
|
|
3737
|
-
Vue.component('RouterView', View);
|
|
3738
|
-
Vue.component('RouterLink', Link);
|
|
3739
|
-
|
|
3740
|
-
var strats = Vue.config.optionMergeStrategies;
|
|
3741
|
-
// use the same hook merging strategy for route hooks
|
|
3742
|
-
strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;
|
|
3743
|
-
}
|
|
3744
|
-
|
|
3745
|
-
/* */
|
|
3746
|
-
|
|
3747
|
-
var inBrowser = typeof window !== 'undefined';
|
|
3748
|
-
|
|
3749
|
-
/* */
|
|
3750
|
-
|
|
3751
|
-
function createRouteMap (
|
|
3752
|
-
routes,
|
|
3753
|
-
oldPathList,
|
|
3754
|
-
oldPathMap,
|
|
3755
|
-
oldNameMap,
|
|
3756
|
-
parentRoute
|
|
3757
|
-
) {
|
|
3758
|
-
// the path list is used to control path matching priority
|
|
3759
|
-
var pathList = oldPathList || [];
|
|
3760
|
-
// $flow-disable-line
|
|
3761
|
-
var pathMap = oldPathMap || Object.create(null);
|
|
3762
|
-
// $flow-disable-line
|
|
3763
|
-
var nameMap = oldNameMap || Object.create(null);
|
|
3764
|
-
|
|
3765
|
-
routes.forEach(function (route) {
|
|
3766
|
-
addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);
|
|
3767
|
-
});
|
|
3768
|
-
|
|
3769
|
-
// ensure wildcard routes are always at the end
|
|
3770
|
-
for (var i = 0, l = pathList.length; i < l; i++) {
|
|
3771
|
-
if (pathList[i] === '*') {
|
|
3772
|
-
pathList.push(pathList.splice(i, 1)[0]);
|
|
3773
|
-
l--;
|
|
3774
|
-
i--;
|
|
3775
|
-
}
|
|
3776
|
-
}
|
|
3777
|
-
|
|
3778
|
-
if (false) { var pathNames, found; }
|
|
3779
|
-
|
|
3780
|
-
return {
|
|
3781
|
-
pathList: pathList,
|
|
3782
|
-
pathMap: pathMap,
|
|
3783
|
-
nameMap: nameMap
|
|
3784
|
-
}
|
|
3785
|
-
}
|
|
3786
|
-
|
|
3787
|
-
function addRouteRecord (
|
|
3788
|
-
pathList,
|
|
3789
|
-
pathMap,
|
|
3790
|
-
nameMap,
|
|
3791
|
-
route,
|
|
3792
|
-
parent,
|
|
3793
|
-
matchAs
|
|
3794
|
-
) {
|
|
3795
|
-
var path = route.path;
|
|
3796
|
-
var name = route.name;
|
|
3797
|
-
if (false) {}
|
|
3798
|
-
|
|
3799
|
-
var pathToRegexpOptions =
|
|
3800
|
-
route.pathToRegexpOptions || {};
|
|
3801
|
-
var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);
|
|
3802
|
-
|
|
3803
|
-
if (typeof route.caseSensitive === 'boolean') {
|
|
3804
|
-
pathToRegexpOptions.sensitive = route.caseSensitive;
|
|
3805
|
-
}
|
|
3806
|
-
|
|
3807
|
-
var record = {
|
|
3808
|
-
path: normalizedPath,
|
|
3809
|
-
regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
|
|
3810
|
-
components: route.components || { default: route.component },
|
|
3811
|
-
alias: route.alias
|
|
3812
|
-
? typeof route.alias === 'string'
|
|
3813
|
-
? [route.alias]
|
|
3814
|
-
: route.alias
|
|
3815
|
-
: [],
|
|
3816
|
-
instances: {},
|
|
3817
|
-
enteredCbs: {},
|
|
3818
|
-
name: name,
|
|
3819
|
-
parent: parent,
|
|
3820
|
-
matchAs: matchAs,
|
|
3821
|
-
redirect: route.redirect,
|
|
3822
|
-
beforeEnter: route.beforeEnter,
|
|
3823
|
-
meta: route.meta || {},
|
|
3824
|
-
props:
|
|
3825
|
-
route.props == null
|
|
3826
|
-
? {}
|
|
3827
|
-
: route.components
|
|
3828
|
-
? route.props
|
|
3829
|
-
: { default: route.props }
|
|
3830
|
-
};
|
|
3831
|
-
|
|
3832
|
-
if (route.children) {
|
|
3833
|
-
// Warn if route is named, does not redirect and has a default child route.
|
|
3834
|
-
// If users navigate to this route by name, the default child will
|
|
3835
|
-
// not be rendered (GH Issue #629)
|
|
3836
|
-
if (false) {}
|
|
3837
|
-
route.children.forEach(function (child) {
|
|
3838
|
-
var childMatchAs = matchAs
|
|
3839
|
-
? cleanPath((matchAs + "/" + (child.path)))
|
|
3840
|
-
: undefined;
|
|
3841
|
-
addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);
|
|
3842
|
-
});
|
|
3843
|
-
}
|
|
3844
|
-
|
|
3845
|
-
if (!pathMap[record.path]) {
|
|
3846
|
-
pathList.push(record.path);
|
|
3847
|
-
pathMap[record.path] = record;
|
|
3848
|
-
}
|
|
3849
|
-
|
|
3850
|
-
if (route.alias !== undefined) {
|
|
3851
|
-
var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];
|
|
3852
|
-
for (var i = 0; i < aliases.length; ++i) {
|
|
3853
|
-
var alias = aliases[i];
|
|
3854
|
-
if (false) {}
|
|
3855
|
-
|
|
3856
|
-
var aliasRoute = {
|
|
3857
|
-
path: alias,
|
|
3858
|
-
children: route.children
|
|
3859
|
-
};
|
|
3860
|
-
addRouteRecord(
|
|
3861
|
-
pathList,
|
|
3862
|
-
pathMap,
|
|
3863
|
-
nameMap,
|
|
3864
|
-
aliasRoute,
|
|
3865
|
-
parent,
|
|
3866
|
-
record.path || '/' // matchAs
|
|
3867
|
-
);
|
|
3868
|
-
}
|
|
3869
|
-
}
|
|
3870
|
-
|
|
3871
|
-
if (name) {
|
|
3872
|
-
if (!nameMap[name]) {
|
|
3873
|
-
nameMap[name] = record;
|
|
3874
|
-
} else if (false) {}
|
|
3875
|
-
}
|
|
3876
|
-
}
|
|
3877
|
-
|
|
3878
|
-
function compileRouteRegex (
|
|
3879
|
-
path,
|
|
3880
|
-
pathToRegexpOptions
|
|
3881
|
-
) {
|
|
3882
|
-
var regex = pathToRegexp_1(path, [], pathToRegexpOptions);
|
|
3883
|
-
if (false) { var keys; }
|
|
3884
|
-
return regex
|
|
3885
|
-
}
|
|
3886
|
-
|
|
3887
|
-
function normalizePath (
|
|
3888
|
-
path,
|
|
3889
|
-
parent,
|
|
3890
|
-
strict
|
|
3891
|
-
) {
|
|
3892
|
-
if (!strict) { path = path.replace(/\/$/, ''); }
|
|
3893
|
-
if (path[0] === '/') { return path }
|
|
3894
|
-
if (parent == null) { return path }
|
|
3895
|
-
return cleanPath(((parent.path) + "/" + path))
|
|
3896
|
-
}
|
|
3897
|
-
|
|
3898
|
-
/* */
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
function createMatcher (
|
|
3903
|
-
routes,
|
|
3904
|
-
router
|
|
3905
|
-
) {
|
|
3906
|
-
var ref = createRouteMap(routes);
|
|
3907
|
-
var pathList = ref.pathList;
|
|
3908
|
-
var pathMap = ref.pathMap;
|
|
3909
|
-
var nameMap = ref.nameMap;
|
|
3910
|
-
|
|
3911
|
-
function addRoutes (routes) {
|
|
3912
|
-
createRouteMap(routes, pathList, pathMap, nameMap);
|
|
3913
|
-
}
|
|
3914
|
-
|
|
3915
|
-
function addRoute (parentOrRoute, route) {
|
|
3916
|
-
var parent = (typeof parentOrRoute !== 'object') ? nameMap[parentOrRoute] : undefined;
|
|
3917
|
-
// $flow-disable-line
|
|
3918
|
-
createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
|
|
3919
|
-
|
|
3920
|
-
// add aliases of parent
|
|
3921
|
-
if (parent && parent.alias.length) {
|
|
3922
|
-
createRouteMap(
|
|
3923
|
-
// $flow-disable-line route is defined if parent is
|
|
3924
|
-
parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),
|
|
3925
|
-
pathList,
|
|
3926
|
-
pathMap,
|
|
3927
|
-
nameMap,
|
|
3928
|
-
parent
|
|
3929
|
-
);
|
|
3930
|
-
}
|
|
3931
|
-
}
|
|
3932
|
-
|
|
3933
|
-
function getRoutes () {
|
|
3934
|
-
return pathList.map(function (path) { return pathMap[path]; })
|
|
3935
|
-
}
|
|
3936
|
-
|
|
3937
|
-
function match (
|
|
3938
|
-
raw,
|
|
3939
|
-
currentRoute,
|
|
3940
|
-
redirectedFrom
|
|
3941
|
-
) {
|
|
3942
|
-
var location = normalizeLocation(raw, currentRoute, false, router);
|
|
3943
|
-
var name = location.name;
|
|
3944
|
-
|
|
3945
|
-
if (name) {
|
|
3946
|
-
var record = nameMap[name];
|
|
3947
|
-
if (false) {}
|
|
3948
|
-
if (!record) { return _createRoute(null, location) }
|
|
3949
|
-
var paramNames = record.regex.keys
|
|
3950
|
-
.filter(function (key) { return !key.optional; })
|
|
3951
|
-
.map(function (key) { return key.name; });
|
|
3952
|
-
|
|
3953
|
-
if (typeof location.params !== 'object') {
|
|
3954
|
-
location.params = {};
|
|
3955
|
-
}
|
|
3956
|
-
|
|
3957
|
-
if (currentRoute && typeof currentRoute.params === 'object') {
|
|
3958
|
-
for (var key in currentRoute.params) {
|
|
3959
|
-
if (!(key in location.params) && paramNames.indexOf(key) > -1) {
|
|
3960
|
-
location.params[key] = currentRoute.params[key];
|
|
3961
|
-
}
|
|
3962
|
-
}
|
|
3963
|
-
}
|
|
3964
|
-
|
|
3965
|
-
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
|
|
3966
|
-
return _createRoute(record, location, redirectedFrom)
|
|
3967
|
-
} else if (location.path) {
|
|
3968
|
-
location.params = {};
|
|
3969
|
-
for (var i = 0; i < pathList.length; i++) {
|
|
3970
|
-
var path = pathList[i];
|
|
3971
|
-
var record$1 = pathMap[path];
|
|
3972
|
-
if (matchRoute(record$1.regex, location.path, location.params)) {
|
|
3973
|
-
return _createRoute(record$1, location, redirectedFrom)
|
|
3974
|
-
}
|
|
3975
|
-
}
|
|
3976
|
-
}
|
|
3977
|
-
// no match
|
|
3978
|
-
return _createRoute(null, location)
|
|
3979
|
-
}
|
|
3980
|
-
|
|
3981
|
-
function redirect (
|
|
3982
|
-
record,
|
|
3983
|
-
location
|
|
3984
|
-
) {
|
|
3985
|
-
var originalRedirect = record.redirect;
|
|
3986
|
-
var redirect = typeof originalRedirect === 'function'
|
|
3987
|
-
? originalRedirect(createRoute(record, location, null, router))
|
|
3988
|
-
: originalRedirect;
|
|
3989
|
-
|
|
3990
|
-
if (typeof redirect === 'string') {
|
|
3991
|
-
redirect = { path: redirect };
|
|
3992
|
-
}
|
|
3993
|
-
|
|
3994
|
-
if (!redirect || typeof redirect !== 'object') {
|
|
3995
|
-
if (false) {}
|
|
3996
|
-
return _createRoute(null, location)
|
|
3997
|
-
}
|
|
3998
|
-
|
|
3999
|
-
var re = redirect;
|
|
4000
|
-
var name = re.name;
|
|
4001
|
-
var path = re.path;
|
|
4002
|
-
var query = location.query;
|
|
4003
|
-
var hash = location.hash;
|
|
4004
|
-
var params = location.params;
|
|
4005
|
-
query = re.hasOwnProperty('query') ? re.query : query;
|
|
4006
|
-
hash = re.hasOwnProperty('hash') ? re.hash : hash;
|
|
4007
|
-
params = re.hasOwnProperty('params') ? re.params : params;
|
|
4008
|
-
|
|
4009
|
-
if (name) {
|
|
4010
|
-
// resolved named direct
|
|
4011
|
-
var targetRecord = nameMap[name];
|
|
4012
|
-
if (false) {}
|
|
4013
|
-
return match({
|
|
4014
|
-
_normalized: true,
|
|
4015
|
-
name: name,
|
|
4016
|
-
query: query,
|
|
4017
|
-
hash: hash,
|
|
4018
|
-
params: params
|
|
4019
|
-
}, undefined, location)
|
|
4020
|
-
} else if (path) {
|
|
4021
|
-
// 1. resolve relative redirect
|
|
4022
|
-
var rawPath = resolveRecordPath(path, record);
|
|
4023
|
-
// 2. resolve params
|
|
4024
|
-
var resolvedPath = fillParams(rawPath, params, ("redirect route with path \"" + rawPath + "\""));
|
|
4025
|
-
// 3. rematch with existing query and hash
|
|
4026
|
-
return match({
|
|
4027
|
-
_normalized: true,
|
|
4028
|
-
path: resolvedPath,
|
|
4029
|
-
query: query,
|
|
4030
|
-
hash: hash
|
|
4031
|
-
}, undefined, location)
|
|
4032
|
-
} else {
|
|
4033
|
-
if (false) {}
|
|
4034
|
-
return _createRoute(null, location)
|
|
4035
|
-
}
|
|
4036
|
-
}
|
|
4037
|
-
|
|
4038
|
-
function alias (
|
|
4039
|
-
record,
|
|
4040
|
-
location,
|
|
4041
|
-
matchAs
|
|
4042
|
-
) {
|
|
4043
|
-
var aliasedPath = fillParams(matchAs, location.params, ("aliased route with path \"" + matchAs + "\""));
|
|
4044
|
-
var aliasedMatch = match({
|
|
4045
|
-
_normalized: true,
|
|
4046
|
-
path: aliasedPath
|
|
4047
|
-
});
|
|
4048
|
-
if (aliasedMatch) {
|
|
4049
|
-
var matched = aliasedMatch.matched;
|
|
4050
|
-
var aliasedRecord = matched[matched.length - 1];
|
|
4051
|
-
location.params = aliasedMatch.params;
|
|
4052
|
-
return _createRoute(aliasedRecord, location)
|
|
4053
|
-
}
|
|
4054
|
-
return _createRoute(null, location)
|
|
4055
|
-
}
|
|
4056
|
-
|
|
4057
|
-
function _createRoute (
|
|
4058
|
-
record,
|
|
4059
|
-
location,
|
|
4060
|
-
redirectedFrom
|
|
4061
|
-
) {
|
|
4062
|
-
if (record && record.redirect) {
|
|
4063
|
-
return redirect(record, redirectedFrom || location)
|
|
4064
|
-
}
|
|
4065
|
-
if (record && record.matchAs) {
|
|
4066
|
-
return alias(record, location, record.matchAs)
|
|
4067
|
-
}
|
|
4068
|
-
return createRoute(record, location, redirectedFrom, router)
|
|
4069
|
-
}
|
|
4070
|
-
|
|
4071
|
-
return {
|
|
4072
|
-
match: match,
|
|
4073
|
-
addRoute: addRoute,
|
|
4074
|
-
getRoutes: getRoutes,
|
|
4075
|
-
addRoutes: addRoutes
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
|
|
4079
|
-
function matchRoute (
|
|
4080
|
-
regex,
|
|
4081
|
-
path,
|
|
4082
|
-
params
|
|
4083
|
-
) {
|
|
4084
|
-
var m = path.match(regex);
|
|
4085
|
-
|
|
4086
|
-
if (!m) {
|
|
4087
|
-
return false
|
|
4088
|
-
} else if (!params) {
|
|
4089
|
-
return true
|
|
4090
|
-
}
|
|
4091
|
-
|
|
4092
|
-
for (var i = 1, len = m.length; i < len; ++i) {
|
|
4093
|
-
var key = regex.keys[i - 1];
|
|
4094
|
-
if (key) {
|
|
4095
|
-
// Fix #1994: using * with props: true generates a param named 0
|
|
4096
|
-
params[key.name || 'pathMatch'] = typeof m[i] === 'string' ? decode(m[i]) : m[i];
|
|
4097
|
-
}
|
|
4098
|
-
}
|
|
4099
|
-
|
|
4100
|
-
return true
|
|
4101
|
-
}
|
|
4102
|
-
|
|
4103
|
-
function resolveRecordPath (path, record) {
|
|
4104
|
-
return resolvePath(path, record.parent ? record.parent.path : '/', true)
|
|
4105
|
-
}
|
|
4106
|
-
|
|
4107
|
-
/* */
|
|
4108
|
-
|
|
4109
|
-
// use User Timing api (if present) for more accurate key precision
|
|
4110
|
-
var Time =
|
|
4111
|
-
inBrowser && window.performance && window.performance.now
|
|
4112
|
-
? window.performance
|
|
4113
|
-
: Date;
|
|
4114
|
-
|
|
4115
|
-
function genStateKey () {
|
|
4116
|
-
return Time.now().toFixed(3)
|
|
4117
|
-
}
|
|
4118
|
-
|
|
4119
|
-
var _key = genStateKey();
|
|
4120
|
-
|
|
4121
|
-
function getStateKey () {
|
|
4122
|
-
return _key
|
|
4123
|
-
}
|
|
4124
|
-
|
|
4125
|
-
function setStateKey (key) {
|
|
4126
|
-
return (_key = key)
|
|
4127
|
-
}
|
|
4128
|
-
|
|
4129
|
-
/* */
|
|
4130
|
-
|
|
4131
|
-
var positionStore = Object.create(null);
|
|
4132
|
-
|
|
4133
|
-
function setupScroll () {
|
|
4134
|
-
// Prevent browser scroll behavior on History popstate
|
|
4135
|
-
if ('scrollRestoration' in window.history) {
|
|
4136
|
-
window.history.scrollRestoration = 'manual';
|
|
4137
|
-
}
|
|
4138
|
-
// Fix for #1585 for Firefox
|
|
4139
|
-
// Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678
|
|
4140
|
-
// Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with
|
|
4141
|
-
// window.location.protocol + '//' + window.location.host
|
|
4142
|
-
// location.host contains the port and location.hostname doesn't
|
|
4143
|
-
var protocolAndPath = window.location.protocol + '//' + window.location.host;
|
|
4144
|
-
var absolutePath = window.location.href.replace(protocolAndPath, '');
|
|
4145
|
-
// preserve existing history state as it could be overriden by the user
|
|
4146
|
-
var stateCopy = extend({}, window.history.state);
|
|
4147
|
-
stateCopy.key = getStateKey();
|
|
4148
|
-
window.history.replaceState(stateCopy, '', absolutePath);
|
|
4149
|
-
window.addEventListener('popstate', handlePopState);
|
|
4150
|
-
return function () {
|
|
4151
|
-
window.removeEventListener('popstate', handlePopState);
|
|
4152
|
-
}
|
|
4153
|
-
}
|
|
4154
|
-
|
|
4155
|
-
function handleScroll (
|
|
4156
|
-
router,
|
|
4157
|
-
to,
|
|
4158
|
-
from,
|
|
4159
|
-
isPop
|
|
4160
|
-
) {
|
|
4161
|
-
if (!router.app) {
|
|
4162
|
-
return
|
|
4163
|
-
}
|
|
4164
|
-
|
|
4165
|
-
var behavior = router.options.scrollBehavior;
|
|
4166
|
-
if (!behavior) {
|
|
4167
|
-
return
|
|
4168
|
-
}
|
|
4169
|
-
|
|
4170
|
-
if (false) {}
|
|
4171
|
-
|
|
4172
|
-
// wait until re-render finishes before scrolling
|
|
4173
|
-
router.app.$nextTick(function () {
|
|
4174
|
-
var position = getScrollPosition();
|
|
4175
|
-
var shouldScroll = behavior.call(
|
|
4176
|
-
router,
|
|
4177
|
-
to,
|
|
4178
|
-
from,
|
|
4179
|
-
isPop ? position : null
|
|
4180
|
-
);
|
|
4181
|
-
|
|
4182
|
-
if (!shouldScroll) {
|
|
4183
|
-
return
|
|
4184
|
-
}
|
|
4185
|
-
|
|
4186
|
-
if (typeof shouldScroll.then === 'function') {
|
|
4187
|
-
shouldScroll
|
|
4188
|
-
.then(function (shouldScroll) {
|
|
4189
|
-
scrollToPosition((shouldScroll), position);
|
|
4190
|
-
})
|
|
4191
|
-
.catch(function (err) {
|
|
4192
|
-
if (false) {}
|
|
4193
|
-
});
|
|
4194
|
-
} else {
|
|
4195
|
-
scrollToPosition(shouldScroll, position);
|
|
4196
|
-
}
|
|
4197
|
-
});
|
|
4198
|
-
}
|
|
4199
|
-
|
|
4200
|
-
function saveScrollPosition () {
|
|
4201
|
-
var key = getStateKey();
|
|
4202
|
-
if (key) {
|
|
4203
|
-
positionStore[key] = {
|
|
4204
|
-
x: window.pageXOffset,
|
|
4205
|
-
y: window.pageYOffset
|
|
4206
|
-
};
|
|
4207
|
-
}
|
|
4208
|
-
}
|
|
4209
|
-
|
|
4210
|
-
function handlePopState (e) {
|
|
4211
|
-
saveScrollPosition();
|
|
4212
|
-
if (e.state && e.state.key) {
|
|
4213
|
-
setStateKey(e.state.key);
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
|
|
4217
|
-
function getScrollPosition () {
|
|
4218
|
-
var key = getStateKey();
|
|
4219
|
-
if (key) {
|
|
4220
|
-
return positionStore[key]
|
|
4221
|
-
}
|
|
4222
|
-
}
|
|
4223
|
-
|
|
4224
|
-
function getElementPosition (el, offset) {
|
|
4225
|
-
var docEl = document.documentElement;
|
|
4226
|
-
var docRect = docEl.getBoundingClientRect();
|
|
4227
|
-
var elRect = el.getBoundingClientRect();
|
|
4228
|
-
return {
|
|
4229
|
-
x: elRect.left - docRect.left - offset.x,
|
|
4230
|
-
y: elRect.top - docRect.top - offset.y
|
|
4231
|
-
}
|
|
4232
|
-
}
|
|
4233
|
-
|
|
4234
|
-
function isValidPosition (obj) {
|
|
4235
|
-
return isNumber(obj.x) || isNumber(obj.y)
|
|
4236
|
-
}
|
|
4237
|
-
|
|
4238
|
-
function normalizePosition (obj) {
|
|
4239
|
-
return {
|
|
4240
|
-
x: isNumber(obj.x) ? obj.x : window.pageXOffset,
|
|
4241
|
-
y: isNumber(obj.y) ? obj.y : window.pageYOffset
|
|
4242
|
-
}
|
|
4243
|
-
}
|
|
4244
|
-
|
|
4245
|
-
function normalizeOffset (obj) {
|
|
4246
|
-
return {
|
|
4247
|
-
x: isNumber(obj.x) ? obj.x : 0,
|
|
4248
|
-
y: isNumber(obj.y) ? obj.y : 0
|
|
4249
|
-
}
|
|
4250
|
-
}
|
|
4251
|
-
|
|
4252
|
-
function isNumber (v) {
|
|
4253
|
-
return typeof v === 'number'
|
|
4254
|
-
}
|
|
4255
|
-
|
|
4256
|
-
var hashStartsWithNumberRE = /^#\d/;
|
|
4257
|
-
|
|
4258
|
-
function scrollToPosition (shouldScroll, position) {
|
|
4259
|
-
var isObject = typeof shouldScroll === 'object';
|
|
4260
|
-
if (isObject && typeof shouldScroll.selector === 'string') {
|
|
4261
|
-
// getElementById would still fail if the selector contains a more complicated query like #main[data-attr]
|
|
4262
|
-
// but at the same time, it doesn't make much sense to select an element with an id and an extra selector
|
|
4263
|
-
var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line
|
|
4264
|
-
? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line
|
|
4265
|
-
: document.querySelector(shouldScroll.selector);
|
|
4266
|
-
|
|
4267
|
-
if (el) {
|
|
4268
|
-
var offset =
|
|
4269
|
-
shouldScroll.offset && typeof shouldScroll.offset === 'object'
|
|
4270
|
-
? shouldScroll.offset
|
|
4271
|
-
: {};
|
|
4272
|
-
offset = normalizeOffset(offset);
|
|
4273
|
-
position = getElementPosition(el, offset);
|
|
4274
|
-
} else if (isValidPosition(shouldScroll)) {
|
|
4275
|
-
position = normalizePosition(shouldScroll);
|
|
4276
|
-
}
|
|
4277
|
-
} else if (isObject && isValidPosition(shouldScroll)) {
|
|
4278
|
-
position = normalizePosition(shouldScroll);
|
|
4279
|
-
}
|
|
4280
|
-
|
|
4281
|
-
if (position) {
|
|
4282
|
-
// $flow-disable-line
|
|
4283
|
-
if ('scrollBehavior' in document.documentElement.style) {
|
|
4284
|
-
window.scrollTo({
|
|
4285
|
-
left: position.x,
|
|
4286
|
-
top: position.y,
|
|
4287
|
-
// $flow-disable-line
|
|
4288
|
-
behavior: shouldScroll.behavior
|
|
4289
|
-
});
|
|
4290
|
-
} else {
|
|
4291
|
-
window.scrollTo(position.x, position.y);
|
|
4292
|
-
}
|
|
4293
|
-
}
|
|
4294
|
-
}
|
|
4295
|
-
|
|
4296
|
-
/* */
|
|
4297
|
-
|
|
4298
|
-
var supportsPushState =
|
|
4299
|
-
inBrowser &&
|
|
4300
|
-
(function () {
|
|
4301
|
-
var ua = window.navigator.userAgent;
|
|
4302
|
-
|
|
4303
|
-
if (
|
|
4304
|
-
(ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&
|
|
4305
|
-
ua.indexOf('Mobile Safari') !== -1 &&
|
|
4306
|
-
ua.indexOf('Chrome') === -1 &&
|
|
4307
|
-
ua.indexOf('Windows Phone') === -1
|
|
4308
|
-
) {
|
|
4309
|
-
return false
|
|
4310
|
-
}
|
|
4311
|
-
|
|
4312
|
-
return window.history && typeof window.history.pushState === 'function'
|
|
4313
|
-
})();
|
|
4314
|
-
|
|
4315
|
-
function pushState (url, replace) {
|
|
4316
|
-
saveScrollPosition();
|
|
4317
|
-
// try...catch the pushState call to get around Safari
|
|
4318
|
-
// DOM Exception 18 where it limits to 100 pushState calls
|
|
4319
|
-
var history = window.history;
|
|
4320
|
-
try {
|
|
4321
|
-
if (replace) {
|
|
4322
|
-
// preserve existing history state as it could be overriden by the user
|
|
4323
|
-
var stateCopy = extend({}, history.state);
|
|
4324
|
-
stateCopy.key = getStateKey();
|
|
4325
|
-
history.replaceState(stateCopy, '', url);
|
|
4326
|
-
} else {
|
|
4327
|
-
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
|
|
4328
|
-
}
|
|
4329
|
-
} catch (e) {
|
|
4330
|
-
window.location[replace ? 'replace' : 'assign'](url);
|
|
4331
|
-
}
|
|
4332
|
-
}
|
|
4333
|
-
|
|
4334
|
-
function replaceState (url) {
|
|
4335
|
-
pushState(url, true);
|
|
4336
|
-
}
|
|
4337
|
-
|
|
4338
|
-
// When changing thing, also edit router.d.ts
|
|
4339
|
-
var NavigationFailureType = {
|
|
4340
|
-
redirected: 2,
|
|
4341
|
-
aborted: 4,
|
|
4342
|
-
cancelled: 8,
|
|
4343
|
-
duplicated: 16
|
|
4344
|
-
};
|
|
4345
|
-
|
|
4346
|
-
function createNavigationRedirectedError (from, to) {
|
|
4347
|
-
return createRouterError(
|
|
4348
|
-
from,
|
|
4349
|
-
to,
|
|
4350
|
-
NavigationFailureType.redirected,
|
|
4351
|
-
("Redirected when going from \"" + (from.fullPath) + "\" to \"" + (stringifyRoute(
|
|
4352
|
-
to
|
|
4353
|
-
)) + "\" via a navigation guard.")
|
|
4354
|
-
)
|
|
4355
|
-
}
|
|
4356
|
-
|
|
4357
|
-
function createNavigationDuplicatedError (from, to) {
|
|
4358
|
-
var error = createRouterError(
|
|
4359
|
-
from,
|
|
4360
|
-
to,
|
|
4361
|
-
NavigationFailureType.duplicated,
|
|
4362
|
-
("Avoided redundant navigation to current location: \"" + (from.fullPath) + "\".")
|
|
4363
|
-
);
|
|
4364
|
-
// backwards compatible with the first introduction of Errors
|
|
4365
|
-
error.name = 'NavigationDuplicated';
|
|
4366
|
-
return error
|
|
4367
|
-
}
|
|
4368
|
-
|
|
4369
|
-
function createNavigationCancelledError (from, to) {
|
|
4370
|
-
return createRouterError(
|
|
4371
|
-
from,
|
|
4372
|
-
to,
|
|
4373
|
-
NavigationFailureType.cancelled,
|
|
4374
|
-
("Navigation cancelled from \"" + (from.fullPath) + "\" to \"" + (to.fullPath) + "\" with a new navigation.")
|
|
4375
|
-
)
|
|
4376
|
-
}
|
|
4377
|
-
|
|
4378
|
-
function createNavigationAbortedError (from, to) {
|
|
4379
|
-
return createRouterError(
|
|
4380
|
-
from,
|
|
4381
|
-
to,
|
|
4382
|
-
NavigationFailureType.aborted,
|
|
4383
|
-
("Navigation aborted from \"" + (from.fullPath) + "\" to \"" + (to.fullPath) + "\" via a navigation guard.")
|
|
4384
|
-
)
|
|
4385
|
-
}
|
|
4386
|
-
|
|
4387
|
-
function createRouterError (from, to, type, message) {
|
|
4388
|
-
var error = new Error(message);
|
|
4389
|
-
error._isRouter = true;
|
|
4390
|
-
error.from = from;
|
|
4391
|
-
error.to = to;
|
|
4392
|
-
error.type = type;
|
|
4393
|
-
|
|
4394
|
-
return error
|
|
4395
|
-
}
|
|
4396
|
-
|
|
4397
|
-
var propertiesToLog = ['params', 'query', 'hash'];
|
|
4398
|
-
|
|
4399
|
-
function stringifyRoute (to) {
|
|
4400
|
-
if (typeof to === 'string') { return to }
|
|
4401
|
-
if ('path' in to) { return to.path }
|
|
4402
|
-
var location = {};
|
|
4403
|
-
propertiesToLog.forEach(function (key) {
|
|
4404
|
-
if (key in to) { location[key] = to[key]; }
|
|
4405
|
-
});
|
|
4406
|
-
return JSON.stringify(location, null, 2)
|
|
4407
|
-
}
|
|
4408
|
-
|
|
4409
|
-
function isError (err) {
|
|
4410
|
-
return Object.prototype.toString.call(err).indexOf('Error') > -1
|
|
4411
|
-
}
|
|
4412
|
-
|
|
4413
|
-
function isNavigationFailure (err, errorType) {
|
|
4414
|
-
return (
|
|
4415
|
-
isError(err) &&
|
|
4416
|
-
err._isRouter &&
|
|
4417
|
-
(errorType == null || err.type === errorType)
|
|
4418
|
-
)
|
|
4419
|
-
}
|
|
4420
|
-
|
|
4421
|
-
/* */
|
|
4422
|
-
|
|
4423
|
-
function runQueue (queue, fn, cb) {
|
|
4424
|
-
var step = function (index) {
|
|
4425
|
-
if (index >= queue.length) {
|
|
4426
|
-
cb();
|
|
4427
|
-
} else {
|
|
4428
|
-
if (queue[index]) {
|
|
4429
|
-
fn(queue[index], function () {
|
|
4430
|
-
step(index + 1);
|
|
4431
|
-
});
|
|
4432
|
-
} else {
|
|
4433
|
-
step(index + 1);
|
|
4434
|
-
}
|
|
4435
|
-
}
|
|
4436
|
-
};
|
|
4437
|
-
step(0);
|
|
4438
|
-
}
|
|
4439
|
-
|
|
4440
|
-
/* */
|
|
4441
|
-
|
|
4442
|
-
function resolveAsyncComponents (matched) {
|
|
4443
|
-
return function (to, from, next) {
|
|
4444
|
-
var hasAsync = false;
|
|
4445
|
-
var pending = 0;
|
|
4446
|
-
var error = null;
|
|
4447
|
-
|
|
4448
|
-
flatMapComponents(matched, function (def, _, match, key) {
|
|
4449
|
-
// if it's a function and doesn't have cid attached,
|
|
4450
|
-
// assume it's an async component resolve function.
|
|
4451
|
-
// we are not using Vue's default async resolving mechanism because
|
|
4452
|
-
// we want to halt the navigation until the incoming component has been
|
|
4453
|
-
// resolved.
|
|
4454
|
-
if (typeof def === 'function' && def.cid === undefined) {
|
|
4455
|
-
hasAsync = true;
|
|
4456
|
-
pending++;
|
|
4457
|
-
|
|
4458
|
-
var resolve = once(function (resolvedDef) {
|
|
4459
|
-
if (isESModule(resolvedDef)) {
|
|
4460
|
-
resolvedDef = resolvedDef.default;
|
|
4461
|
-
}
|
|
4462
|
-
// save resolved on async factory in case it's used elsewhere
|
|
4463
|
-
def.resolved = typeof resolvedDef === 'function'
|
|
4464
|
-
? resolvedDef
|
|
4465
|
-
: _Vue.extend(resolvedDef);
|
|
4466
|
-
match.components[key] = resolvedDef;
|
|
4467
|
-
pending--;
|
|
4468
|
-
if (pending <= 0) {
|
|
4469
|
-
next();
|
|
4470
|
-
}
|
|
4471
|
-
});
|
|
4472
|
-
|
|
4473
|
-
var reject = once(function (reason) {
|
|
4474
|
-
var msg = "Failed to resolve async component " + key + ": " + reason;
|
|
4475
|
-
"production" !== 'production' && warn(false, msg);
|
|
4476
|
-
if (!error) {
|
|
4477
|
-
error = isError(reason)
|
|
4478
|
-
? reason
|
|
4479
|
-
: new Error(msg);
|
|
4480
|
-
next(error);
|
|
4481
|
-
}
|
|
4482
|
-
});
|
|
4483
|
-
|
|
4484
|
-
var res;
|
|
4485
|
-
try {
|
|
4486
|
-
res = def(resolve, reject);
|
|
4487
|
-
} catch (e) {
|
|
4488
|
-
reject(e);
|
|
4489
|
-
}
|
|
4490
|
-
if (res) {
|
|
4491
|
-
if (typeof res.then === 'function') {
|
|
4492
|
-
res.then(resolve, reject);
|
|
4493
|
-
} else {
|
|
4494
|
-
// new syntax in Vue 2.3
|
|
4495
|
-
var comp = res.component;
|
|
4496
|
-
if (comp && typeof comp.then === 'function') {
|
|
4497
|
-
comp.then(resolve, reject);
|
|
4498
|
-
}
|
|
4499
|
-
}
|
|
4500
|
-
}
|
|
4501
|
-
}
|
|
4502
|
-
});
|
|
4503
|
-
|
|
4504
|
-
if (!hasAsync) { next(); }
|
|
4505
|
-
}
|
|
4506
|
-
}
|
|
4507
|
-
|
|
4508
|
-
function flatMapComponents (
|
|
4509
|
-
matched,
|
|
4510
|
-
fn
|
|
4511
|
-
) {
|
|
4512
|
-
return flatten(matched.map(function (m) {
|
|
4513
|
-
return Object.keys(m.components).map(function (key) { return fn(
|
|
4514
|
-
m.components[key],
|
|
4515
|
-
m.instances[key],
|
|
4516
|
-
m, key
|
|
4517
|
-
); })
|
|
4518
|
-
}))
|
|
4519
|
-
}
|
|
4520
|
-
|
|
4521
|
-
function flatten (arr) {
|
|
4522
|
-
return Array.prototype.concat.apply([], arr)
|
|
4523
|
-
}
|
|
4524
|
-
|
|
4525
|
-
var hasSymbol =
|
|
4526
|
-
typeof Symbol === 'function' &&
|
|
4527
|
-
typeof Symbol.toStringTag === 'symbol';
|
|
4528
|
-
|
|
4529
|
-
function isESModule (obj) {
|
|
4530
|
-
return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')
|
|
4531
|
-
}
|
|
4532
|
-
|
|
4533
|
-
// in Webpack 2, require.ensure now also returns a Promise
|
|
4534
|
-
// so the resolve/reject functions may get called an extra time
|
|
4535
|
-
// if the user uses an arrow function shorthand that happens to
|
|
4536
|
-
// return that Promise.
|
|
4537
|
-
function once (fn) {
|
|
4538
|
-
var called = false;
|
|
4539
|
-
return function () {
|
|
4540
|
-
var args = [], len = arguments.length;
|
|
4541
|
-
while ( len-- ) args[ len ] = arguments[ len ];
|
|
4542
|
-
|
|
4543
|
-
if (called) { return }
|
|
4544
|
-
called = true;
|
|
4545
|
-
return fn.apply(this, args)
|
|
4546
|
-
}
|
|
4547
|
-
}
|
|
4548
|
-
|
|
4549
|
-
/* */
|
|
4550
|
-
|
|
4551
|
-
var History = function History (router, base) {
|
|
4552
|
-
this.router = router;
|
|
4553
|
-
this.base = normalizeBase(base);
|
|
4554
|
-
// start with a route object that stands for "nowhere"
|
|
4555
|
-
this.current = START;
|
|
4556
|
-
this.pending = null;
|
|
4557
|
-
this.ready = false;
|
|
4558
|
-
this.readyCbs = [];
|
|
4559
|
-
this.readyErrorCbs = [];
|
|
4560
|
-
this.errorCbs = [];
|
|
4561
|
-
this.listeners = [];
|
|
4562
|
-
};
|
|
4563
|
-
|
|
4564
|
-
History.prototype.listen = function listen (cb) {
|
|
4565
|
-
this.cb = cb;
|
|
4566
|
-
};
|
|
4567
|
-
|
|
4568
|
-
History.prototype.onReady = function onReady (cb, errorCb) {
|
|
4569
|
-
if (this.ready) {
|
|
4570
|
-
cb();
|
|
4571
|
-
} else {
|
|
4572
|
-
this.readyCbs.push(cb);
|
|
4573
|
-
if (errorCb) {
|
|
4574
|
-
this.readyErrorCbs.push(errorCb);
|
|
4575
|
-
}
|
|
4576
|
-
}
|
|
4577
|
-
};
|
|
4578
|
-
|
|
4579
|
-
History.prototype.onError = function onError (errorCb) {
|
|
4580
|
-
this.errorCbs.push(errorCb);
|
|
4581
|
-
};
|
|
4582
|
-
|
|
4583
|
-
History.prototype.transitionTo = function transitionTo (
|
|
4584
|
-
location,
|
|
4585
|
-
onComplete,
|
|
4586
|
-
onAbort
|
|
4587
|
-
) {
|
|
4588
|
-
var this$1$1 = this;
|
|
4589
|
-
|
|
4590
|
-
var route;
|
|
4591
|
-
// catch redirect option https://github.com/vuejs/vue-router/issues/3201
|
|
4592
|
-
try {
|
|
4593
|
-
route = this.router.match(location, this.current);
|
|
4594
|
-
} catch (e) {
|
|
4595
|
-
this.errorCbs.forEach(function (cb) {
|
|
4596
|
-
cb(e);
|
|
4597
|
-
});
|
|
4598
|
-
// Exception should still be thrown
|
|
4599
|
-
throw e
|
|
4600
|
-
}
|
|
4601
|
-
var prev = this.current;
|
|
4602
|
-
this.confirmTransition(
|
|
4603
|
-
route,
|
|
4604
|
-
function () {
|
|
4605
|
-
this$1$1.updateRoute(route);
|
|
4606
|
-
onComplete && onComplete(route);
|
|
4607
|
-
this$1$1.ensureURL();
|
|
4608
|
-
this$1$1.router.afterHooks.forEach(function (hook) {
|
|
4609
|
-
hook && hook(route, prev);
|
|
4610
|
-
});
|
|
4611
|
-
|
|
4612
|
-
// fire ready cbs once
|
|
4613
|
-
if (!this$1$1.ready) {
|
|
4614
|
-
this$1$1.ready = true;
|
|
4615
|
-
this$1$1.readyCbs.forEach(function (cb) {
|
|
4616
|
-
cb(route);
|
|
4617
|
-
});
|
|
4618
|
-
}
|
|
4619
|
-
},
|
|
4620
|
-
function (err) {
|
|
4621
|
-
if (onAbort) {
|
|
4622
|
-
onAbort(err);
|
|
4623
|
-
}
|
|
4624
|
-
if (err && !this$1$1.ready) {
|
|
4625
|
-
// Initial redirection should not mark the history as ready yet
|
|
4626
|
-
// because it's triggered by the redirection instead
|
|
4627
|
-
// https://github.com/vuejs/vue-router/issues/3225
|
|
4628
|
-
// https://github.com/vuejs/vue-router/issues/3331
|
|
4629
|
-
if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {
|
|
4630
|
-
this$1$1.ready = true;
|
|
4631
|
-
this$1$1.readyErrorCbs.forEach(function (cb) {
|
|
4632
|
-
cb(err);
|
|
4633
|
-
});
|
|
4634
|
-
}
|
|
4635
|
-
}
|
|
4636
|
-
}
|
|
4637
|
-
);
|
|
4638
|
-
};
|
|
4639
|
-
|
|
4640
|
-
History.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {
|
|
4641
|
-
var this$1$1 = this;
|
|
4642
|
-
|
|
4643
|
-
var current = this.current;
|
|
4644
|
-
this.pending = route;
|
|
4645
|
-
var abort = function (err) {
|
|
4646
|
-
// changed after adding errors with
|
|
4647
|
-
// https://github.com/vuejs/vue-router/pull/3047 before that change,
|
|
4648
|
-
// redirect and aborted navigation would produce an err == null
|
|
4649
|
-
if (!isNavigationFailure(err) && isError(err)) {
|
|
4650
|
-
if (this$1$1.errorCbs.length) {
|
|
4651
|
-
this$1$1.errorCbs.forEach(function (cb) {
|
|
4652
|
-
cb(err);
|
|
4653
|
-
});
|
|
4654
|
-
} else {
|
|
4655
|
-
if (false) {}
|
|
4656
|
-
console.error(err);
|
|
4657
|
-
}
|
|
4658
|
-
}
|
|
4659
|
-
onAbort && onAbort(err);
|
|
4660
|
-
};
|
|
4661
|
-
var lastRouteIndex = route.matched.length - 1;
|
|
4662
|
-
var lastCurrentIndex = current.matched.length - 1;
|
|
4663
|
-
if (
|
|
4664
|
-
isSameRoute(route, current) &&
|
|
4665
|
-
// in the case the route map has been dynamically appended to
|
|
4666
|
-
lastRouteIndex === lastCurrentIndex &&
|
|
4667
|
-
route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]
|
|
4668
|
-
) {
|
|
4669
|
-
this.ensureURL();
|
|
4670
|
-
if (route.hash) {
|
|
4671
|
-
handleScroll(this.router, current, route, false);
|
|
4672
|
-
}
|
|
4673
|
-
return abort(createNavigationDuplicatedError(current, route))
|
|
4674
|
-
}
|
|
4675
|
-
|
|
4676
|
-
var ref = resolveQueue(
|
|
4677
|
-
this.current.matched,
|
|
4678
|
-
route.matched
|
|
4679
|
-
);
|
|
4680
|
-
var updated = ref.updated;
|
|
4681
|
-
var deactivated = ref.deactivated;
|
|
4682
|
-
var activated = ref.activated;
|
|
4683
|
-
|
|
4684
|
-
var queue = [].concat(
|
|
4685
|
-
// in-component leave guards
|
|
4686
|
-
extractLeaveGuards(deactivated),
|
|
4687
|
-
// global before hooks
|
|
4688
|
-
this.router.beforeHooks,
|
|
4689
|
-
// in-component update hooks
|
|
4690
|
-
extractUpdateHooks(updated),
|
|
4691
|
-
// in-config enter guards
|
|
4692
|
-
activated.map(function (m) { return m.beforeEnter; }),
|
|
4693
|
-
// async components
|
|
4694
|
-
resolveAsyncComponents(activated)
|
|
4695
|
-
);
|
|
4696
|
-
|
|
4697
|
-
var iterator = function (hook, next) {
|
|
4698
|
-
if (this$1$1.pending !== route) {
|
|
4699
|
-
return abort(createNavigationCancelledError(current, route))
|
|
4700
|
-
}
|
|
4701
|
-
try {
|
|
4702
|
-
hook(route, current, function (to) {
|
|
4703
|
-
if (to === false) {
|
|
4704
|
-
// next(false) -> abort navigation, ensure current URL
|
|
4705
|
-
this$1$1.ensureURL(true);
|
|
4706
|
-
abort(createNavigationAbortedError(current, route));
|
|
4707
|
-
} else if (isError(to)) {
|
|
4708
|
-
this$1$1.ensureURL(true);
|
|
4709
|
-
abort(to);
|
|
4710
|
-
} else if (
|
|
4711
|
-
typeof to === 'string' ||
|
|
4712
|
-
(typeof to === 'object' &&
|
|
4713
|
-
(typeof to.path === 'string' || typeof to.name === 'string'))
|
|
4714
|
-
) {
|
|
4715
|
-
// next('/') or next({ path: '/' }) -> redirect
|
|
4716
|
-
abort(createNavigationRedirectedError(current, route));
|
|
4717
|
-
if (typeof to === 'object' && to.replace) {
|
|
4718
|
-
this$1$1.replace(to);
|
|
4719
|
-
} else {
|
|
4720
|
-
this$1$1.push(to);
|
|
4721
|
-
}
|
|
4722
|
-
} else {
|
|
4723
|
-
// confirm transition and pass on the value
|
|
4724
|
-
next(to);
|
|
4725
|
-
}
|
|
4726
|
-
});
|
|
4727
|
-
} catch (e) {
|
|
4728
|
-
abort(e);
|
|
4729
|
-
}
|
|
4730
|
-
};
|
|
4731
|
-
|
|
4732
|
-
runQueue(queue, iterator, function () {
|
|
4733
|
-
// wait until async components are resolved before
|
|
4734
|
-
// extracting in-component enter guards
|
|
4735
|
-
var enterGuards = extractEnterGuards(activated);
|
|
4736
|
-
var queue = enterGuards.concat(this$1$1.router.resolveHooks);
|
|
4737
|
-
runQueue(queue, iterator, function () {
|
|
4738
|
-
if (this$1$1.pending !== route) {
|
|
4739
|
-
return abort(createNavigationCancelledError(current, route))
|
|
4740
|
-
}
|
|
4741
|
-
this$1$1.pending = null;
|
|
4742
|
-
onComplete(route);
|
|
4743
|
-
if (this$1$1.router.app) {
|
|
4744
|
-
this$1$1.router.app.$nextTick(function () {
|
|
4745
|
-
handleRouteEntered(route);
|
|
4746
|
-
});
|
|
4747
|
-
}
|
|
4748
|
-
});
|
|
4749
|
-
});
|
|
4750
|
-
};
|
|
4751
|
-
|
|
4752
|
-
History.prototype.updateRoute = function updateRoute (route) {
|
|
4753
|
-
this.current = route;
|
|
4754
|
-
this.cb && this.cb(route);
|
|
4755
|
-
};
|
|
4756
|
-
|
|
4757
|
-
History.prototype.setupListeners = function setupListeners () {
|
|
4758
|
-
// Default implementation is empty
|
|
4759
|
-
};
|
|
4760
|
-
|
|
4761
|
-
History.prototype.teardown = function teardown () {
|
|
4762
|
-
// clean up event listeners
|
|
4763
|
-
// https://github.com/vuejs/vue-router/issues/2341
|
|
4764
|
-
this.listeners.forEach(function (cleanupListener) {
|
|
4765
|
-
cleanupListener();
|
|
4766
|
-
});
|
|
4767
|
-
this.listeners = [];
|
|
4768
|
-
|
|
4769
|
-
// reset current history route
|
|
4770
|
-
// https://github.com/vuejs/vue-router/issues/3294
|
|
4771
|
-
this.current = START;
|
|
4772
|
-
this.pending = null;
|
|
4773
|
-
};
|
|
4774
|
-
|
|
4775
|
-
function normalizeBase (base) {
|
|
4776
|
-
if (!base) {
|
|
4777
|
-
if (inBrowser) {
|
|
4778
|
-
// respect <base> tag
|
|
4779
|
-
var baseEl = document.querySelector('base');
|
|
4780
|
-
base = (baseEl && baseEl.getAttribute('href')) || '/';
|
|
4781
|
-
// strip full URL origin
|
|
4782
|
-
base = base.replace(/^https?:\/\/[^\/]+/, '');
|
|
4783
|
-
} else {
|
|
4784
|
-
base = '/';
|
|
4785
|
-
}
|
|
4786
|
-
}
|
|
4787
|
-
// make sure there's the starting slash
|
|
4788
|
-
if (base.charAt(0) !== '/') {
|
|
4789
|
-
base = '/' + base;
|
|
4790
|
-
}
|
|
4791
|
-
// remove trailing slash
|
|
4792
|
-
return base.replace(/\/$/, '')
|
|
4793
|
-
}
|
|
4794
|
-
|
|
4795
|
-
function resolveQueue (
|
|
4796
|
-
current,
|
|
4797
|
-
next
|
|
4798
|
-
) {
|
|
4799
|
-
var i;
|
|
4800
|
-
var max = Math.max(current.length, next.length);
|
|
4801
|
-
for (i = 0; i < max; i++) {
|
|
4802
|
-
if (current[i] !== next[i]) {
|
|
4803
|
-
break
|
|
4804
|
-
}
|
|
4805
|
-
}
|
|
4806
|
-
return {
|
|
4807
|
-
updated: next.slice(0, i),
|
|
4808
|
-
activated: next.slice(i),
|
|
4809
|
-
deactivated: current.slice(i)
|
|
4810
|
-
}
|
|
4811
|
-
}
|
|
4812
|
-
|
|
4813
|
-
function extractGuards (
|
|
4814
|
-
records,
|
|
4815
|
-
name,
|
|
4816
|
-
bind,
|
|
4817
|
-
reverse
|
|
4818
|
-
) {
|
|
4819
|
-
var guards = flatMapComponents(records, function (def, instance, match, key) {
|
|
4820
|
-
var guard = extractGuard(def, name);
|
|
4821
|
-
if (guard) {
|
|
4822
|
-
return Array.isArray(guard)
|
|
4823
|
-
? guard.map(function (guard) { return bind(guard, instance, match, key); })
|
|
4824
|
-
: bind(guard, instance, match, key)
|
|
4825
|
-
}
|
|
4826
|
-
});
|
|
4827
|
-
return flatten(reverse ? guards.reverse() : guards)
|
|
4828
|
-
}
|
|
4829
|
-
|
|
4830
|
-
function extractGuard (
|
|
4831
|
-
def,
|
|
4832
|
-
key
|
|
4833
|
-
) {
|
|
4834
|
-
if (typeof def !== 'function') {
|
|
4835
|
-
// extend now so that global mixins are applied.
|
|
4836
|
-
def = _Vue.extend(def);
|
|
4837
|
-
}
|
|
4838
|
-
return def.options[key]
|
|
4839
|
-
}
|
|
4840
|
-
|
|
4841
|
-
function extractLeaveGuards (deactivated) {
|
|
4842
|
-
return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)
|
|
4843
|
-
}
|
|
4844
|
-
|
|
4845
|
-
function extractUpdateHooks (updated) {
|
|
4846
|
-
return extractGuards(updated, 'beforeRouteUpdate', bindGuard)
|
|
4847
|
-
}
|
|
4848
|
-
|
|
4849
|
-
function bindGuard (guard, instance) {
|
|
4850
|
-
if (instance) {
|
|
4851
|
-
return function boundRouteGuard () {
|
|
4852
|
-
return guard.apply(instance, arguments)
|
|
4853
|
-
}
|
|
4854
|
-
}
|
|
4855
|
-
}
|
|
4856
|
-
|
|
4857
|
-
function extractEnterGuards (
|
|
4858
|
-
activated
|
|
4859
|
-
) {
|
|
4860
|
-
return extractGuards(
|
|
4861
|
-
activated,
|
|
4862
|
-
'beforeRouteEnter',
|
|
4863
|
-
function (guard, _, match, key) {
|
|
4864
|
-
return bindEnterGuard(guard, match, key)
|
|
4865
|
-
}
|
|
4866
|
-
)
|
|
4867
|
-
}
|
|
4868
|
-
|
|
4869
|
-
function bindEnterGuard (
|
|
4870
|
-
guard,
|
|
4871
|
-
match,
|
|
4872
|
-
key
|
|
4873
|
-
) {
|
|
4874
|
-
return function routeEnterGuard (to, from, next) {
|
|
4875
|
-
return guard(to, from, function (cb) {
|
|
4876
|
-
if (typeof cb === 'function') {
|
|
4877
|
-
if (!match.enteredCbs[key]) {
|
|
4878
|
-
match.enteredCbs[key] = [];
|
|
4879
|
-
}
|
|
4880
|
-
match.enteredCbs[key].push(cb);
|
|
4881
|
-
}
|
|
4882
|
-
next(cb);
|
|
4883
|
-
})
|
|
4884
|
-
}
|
|
4885
|
-
}
|
|
4886
|
-
|
|
4887
|
-
/* */
|
|
4888
|
-
|
|
4889
|
-
var HTML5History = /*@__PURE__*/(function (History) {
|
|
4890
|
-
function HTML5History (router, base) {
|
|
4891
|
-
History.call(this, router, base);
|
|
4892
|
-
|
|
4893
|
-
this._startLocation = getLocation(this.base);
|
|
4894
|
-
}
|
|
4895
|
-
|
|
4896
|
-
if ( History ) HTML5History.__proto__ = History;
|
|
4897
|
-
HTML5History.prototype = Object.create( History && History.prototype );
|
|
4898
|
-
HTML5History.prototype.constructor = HTML5History;
|
|
4899
|
-
|
|
4900
|
-
HTML5History.prototype.setupListeners = function setupListeners () {
|
|
4901
|
-
var this$1$1 = this;
|
|
4902
|
-
|
|
4903
|
-
if (this.listeners.length > 0) {
|
|
4904
|
-
return
|
|
4905
|
-
}
|
|
4906
|
-
|
|
4907
|
-
var router = this.router;
|
|
4908
|
-
var expectScroll = router.options.scrollBehavior;
|
|
4909
|
-
var supportsScroll = supportsPushState && expectScroll;
|
|
4910
|
-
|
|
4911
|
-
if (supportsScroll) {
|
|
4912
|
-
this.listeners.push(setupScroll());
|
|
4913
|
-
}
|
|
4914
|
-
|
|
4915
|
-
var handleRoutingEvent = function () {
|
|
4916
|
-
var current = this$1$1.current;
|
|
4917
|
-
|
|
4918
|
-
// Avoiding first `popstate` event dispatched in some browsers but first
|
|
4919
|
-
// history route not updated since async guard at the same time.
|
|
4920
|
-
var location = getLocation(this$1$1.base);
|
|
4921
|
-
if (this$1$1.current === START && location === this$1$1._startLocation) {
|
|
4922
|
-
return
|
|
4923
|
-
}
|
|
4924
|
-
|
|
4925
|
-
this$1$1.transitionTo(location, function (route) {
|
|
4926
|
-
if (supportsScroll) {
|
|
4927
|
-
handleScroll(router, route, current, true);
|
|
4928
|
-
}
|
|
4929
|
-
});
|
|
4930
|
-
};
|
|
4931
|
-
window.addEventListener('popstate', handleRoutingEvent);
|
|
4932
|
-
this.listeners.push(function () {
|
|
4933
|
-
window.removeEventListener('popstate', handleRoutingEvent);
|
|
4934
|
-
});
|
|
4935
|
-
};
|
|
4936
|
-
|
|
4937
|
-
HTML5History.prototype.go = function go (n) {
|
|
4938
|
-
window.history.go(n);
|
|
4939
|
-
};
|
|
4940
|
-
|
|
4941
|
-
HTML5History.prototype.push = function push (location, onComplete, onAbort) {
|
|
4942
|
-
var this$1$1 = this;
|
|
4943
|
-
|
|
4944
|
-
var ref = this;
|
|
4945
|
-
var fromRoute = ref.current;
|
|
4946
|
-
this.transitionTo(location, function (route) {
|
|
4947
|
-
pushState(cleanPath(this$1$1.base + route.fullPath));
|
|
4948
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
4949
|
-
onComplete && onComplete(route);
|
|
4950
|
-
}, onAbort);
|
|
4951
|
-
};
|
|
4952
|
-
|
|
4953
|
-
HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {
|
|
4954
|
-
var this$1$1 = this;
|
|
4955
|
-
|
|
4956
|
-
var ref = this;
|
|
4957
|
-
var fromRoute = ref.current;
|
|
4958
|
-
this.transitionTo(location, function (route) {
|
|
4959
|
-
replaceState(cleanPath(this$1$1.base + route.fullPath));
|
|
4960
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
4961
|
-
onComplete && onComplete(route);
|
|
4962
|
-
}, onAbort);
|
|
4963
|
-
};
|
|
4964
|
-
|
|
4965
|
-
HTML5History.prototype.ensureURL = function ensureURL (push) {
|
|
4966
|
-
if (getLocation(this.base) !== this.current.fullPath) {
|
|
4967
|
-
var current = cleanPath(this.base + this.current.fullPath);
|
|
4968
|
-
push ? pushState(current) : replaceState(current);
|
|
4969
|
-
}
|
|
4970
|
-
};
|
|
4971
|
-
|
|
4972
|
-
HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {
|
|
4973
|
-
return getLocation(this.base)
|
|
4974
|
-
};
|
|
4975
|
-
|
|
4976
|
-
return HTML5History;
|
|
4977
|
-
}(History));
|
|
4978
|
-
|
|
4979
|
-
function getLocation (base) {
|
|
4980
|
-
var path = window.location.pathname;
|
|
4981
|
-
var pathLowerCase = path.toLowerCase();
|
|
4982
|
-
var baseLowerCase = base.toLowerCase();
|
|
4983
|
-
// base="/a" shouldn't turn path="/app" into "/a/pp"
|
|
4984
|
-
// https://github.com/vuejs/vue-router/issues/3555
|
|
4985
|
-
// so we ensure the trailing slash in the base
|
|
4986
|
-
if (base && ((pathLowerCase === baseLowerCase) ||
|
|
4987
|
-
(pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {
|
|
4988
|
-
path = path.slice(base.length);
|
|
4989
|
-
}
|
|
4990
|
-
return (path || '/') + window.location.search + window.location.hash
|
|
4991
|
-
}
|
|
4992
|
-
|
|
4993
|
-
/* */
|
|
4994
|
-
|
|
4995
|
-
var HashHistory = /*@__PURE__*/(function (History) {
|
|
4996
|
-
function HashHistory (router, base, fallback) {
|
|
4997
|
-
History.call(this, router, base);
|
|
4998
|
-
// check history fallback deeplinking
|
|
4999
|
-
if (fallback && checkFallback(this.base)) {
|
|
5000
|
-
return
|
|
5001
|
-
}
|
|
5002
|
-
ensureSlash();
|
|
5003
|
-
}
|
|
5004
|
-
|
|
5005
|
-
if ( History ) HashHistory.__proto__ = History;
|
|
5006
|
-
HashHistory.prototype = Object.create( History && History.prototype );
|
|
5007
|
-
HashHistory.prototype.constructor = HashHistory;
|
|
5008
|
-
|
|
5009
|
-
// this is delayed until the app mounts
|
|
5010
|
-
// to avoid the hashchange listener being fired too early
|
|
5011
|
-
HashHistory.prototype.setupListeners = function setupListeners () {
|
|
5012
|
-
var this$1$1 = this;
|
|
5013
|
-
|
|
5014
|
-
if (this.listeners.length > 0) {
|
|
5015
|
-
return
|
|
5016
|
-
}
|
|
5017
|
-
|
|
5018
|
-
var router = this.router;
|
|
5019
|
-
var expectScroll = router.options.scrollBehavior;
|
|
5020
|
-
var supportsScroll = supportsPushState && expectScroll;
|
|
5021
|
-
|
|
5022
|
-
if (supportsScroll) {
|
|
5023
|
-
this.listeners.push(setupScroll());
|
|
5024
|
-
}
|
|
5025
|
-
|
|
5026
|
-
var handleRoutingEvent = function () {
|
|
5027
|
-
var current = this$1$1.current;
|
|
5028
|
-
if (!ensureSlash()) {
|
|
5029
|
-
return
|
|
5030
|
-
}
|
|
5031
|
-
this$1$1.transitionTo(getHash(), function (route) {
|
|
5032
|
-
if (supportsScroll) {
|
|
5033
|
-
handleScroll(this$1$1.router, route, current, true);
|
|
5034
|
-
}
|
|
5035
|
-
if (!supportsPushState) {
|
|
5036
|
-
replaceHash(route.fullPath);
|
|
5037
|
-
}
|
|
5038
|
-
});
|
|
5039
|
-
};
|
|
5040
|
-
var eventType = supportsPushState ? 'popstate' : 'hashchange';
|
|
5041
|
-
window.addEventListener(
|
|
5042
|
-
eventType,
|
|
5043
|
-
handleRoutingEvent
|
|
5044
|
-
);
|
|
5045
|
-
this.listeners.push(function () {
|
|
5046
|
-
window.removeEventListener(eventType, handleRoutingEvent);
|
|
5047
|
-
});
|
|
5048
|
-
};
|
|
5049
|
-
|
|
5050
|
-
HashHistory.prototype.push = function push (location, onComplete, onAbort) {
|
|
5051
|
-
var this$1$1 = this;
|
|
5052
|
-
|
|
5053
|
-
var ref = this;
|
|
5054
|
-
var fromRoute = ref.current;
|
|
5055
|
-
this.transitionTo(
|
|
5056
|
-
location,
|
|
5057
|
-
function (route) {
|
|
5058
|
-
pushHash(route.fullPath);
|
|
5059
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
5060
|
-
onComplete && onComplete(route);
|
|
5061
|
-
},
|
|
5062
|
-
onAbort
|
|
5063
|
-
);
|
|
5064
|
-
};
|
|
5065
|
-
|
|
5066
|
-
HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {
|
|
5067
|
-
var this$1$1 = this;
|
|
5068
|
-
|
|
5069
|
-
var ref = this;
|
|
5070
|
-
var fromRoute = ref.current;
|
|
5071
|
-
this.transitionTo(
|
|
5072
|
-
location,
|
|
5073
|
-
function (route) {
|
|
5074
|
-
replaceHash(route.fullPath);
|
|
5075
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
5076
|
-
onComplete && onComplete(route);
|
|
5077
|
-
},
|
|
5078
|
-
onAbort
|
|
5079
|
-
);
|
|
5080
|
-
};
|
|
5081
|
-
|
|
5082
|
-
HashHistory.prototype.go = function go (n) {
|
|
5083
|
-
window.history.go(n);
|
|
5084
|
-
};
|
|
5085
|
-
|
|
5086
|
-
HashHistory.prototype.ensureURL = function ensureURL (push) {
|
|
5087
|
-
var current = this.current.fullPath;
|
|
5088
|
-
if (getHash() !== current) {
|
|
5089
|
-
push ? pushHash(current) : replaceHash(current);
|
|
5090
|
-
}
|
|
5091
|
-
};
|
|
5092
|
-
|
|
5093
|
-
HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {
|
|
5094
|
-
return getHash()
|
|
5095
|
-
};
|
|
5096
|
-
|
|
5097
|
-
return HashHistory;
|
|
5098
|
-
}(History));
|
|
5099
|
-
|
|
5100
|
-
function checkFallback (base) {
|
|
5101
|
-
var location = getLocation(base);
|
|
5102
|
-
if (!/^\/#/.test(location)) {
|
|
5103
|
-
window.location.replace(cleanPath(base + '/#' + location));
|
|
5104
|
-
return true
|
|
5105
|
-
}
|
|
5106
|
-
}
|
|
5107
|
-
|
|
5108
|
-
function ensureSlash () {
|
|
5109
|
-
var path = getHash();
|
|
5110
|
-
if (path.charAt(0) === '/') {
|
|
5111
|
-
return true
|
|
5112
|
-
}
|
|
5113
|
-
replaceHash('/' + path);
|
|
5114
|
-
return false
|
|
5115
|
-
}
|
|
5116
|
-
|
|
5117
|
-
function getHash () {
|
|
5118
|
-
// We can't use window.location.hash here because it's not
|
|
5119
|
-
// consistent across browsers - Firefox will pre-decode it!
|
|
5120
|
-
var href = window.location.href;
|
|
5121
|
-
var index = href.indexOf('#');
|
|
5122
|
-
// empty path
|
|
5123
|
-
if (index < 0) { return '' }
|
|
5124
|
-
|
|
5125
|
-
href = href.slice(index + 1);
|
|
5126
|
-
|
|
5127
|
-
return href
|
|
5128
|
-
}
|
|
5129
|
-
|
|
5130
|
-
function getUrl (path) {
|
|
5131
|
-
var href = window.location.href;
|
|
5132
|
-
var i = href.indexOf('#');
|
|
5133
|
-
var base = i >= 0 ? href.slice(0, i) : href;
|
|
5134
|
-
return (base + "#" + path)
|
|
5135
|
-
}
|
|
5136
|
-
|
|
5137
|
-
function pushHash (path) {
|
|
5138
|
-
if (supportsPushState) {
|
|
5139
|
-
pushState(getUrl(path));
|
|
5140
|
-
} else {
|
|
5141
|
-
window.location.hash = path;
|
|
5142
|
-
}
|
|
5143
|
-
}
|
|
5144
|
-
|
|
5145
|
-
function replaceHash (path) {
|
|
5146
|
-
if (supportsPushState) {
|
|
5147
|
-
replaceState(getUrl(path));
|
|
5148
|
-
} else {
|
|
5149
|
-
window.location.replace(getUrl(path));
|
|
5150
|
-
}
|
|
5151
|
-
}
|
|
5152
|
-
|
|
5153
|
-
/* */
|
|
5154
|
-
|
|
5155
|
-
var AbstractHistory = /*@__PURE__*/(function (History) {
|
|
5156
|
-
function AbstractHistory (router, base) {
|
|
5157
|
-
History.call(this, router, base);
|
|
5158
|
-
this.stack = [];
|
|
5159
|
-
this.index = -1;
|
|
5160
|
-
}
|
|
5161
|
-
|
|
5162
|
-
if ( History ) AbstractHistory.__proto__ = History;
|
|
5163
|
-
AbstractHistory.prototype = Object.create( History && History.prototype );
|
|
5164
|
-
AbstractHistory.prototype.constructor = AbstractHistory;
|
|
5165
|
-
|
|
5166
|
-
AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {
|
|
5167
|
-
var this$1$1 = this;
|
|
5168
|
-
|
|
5169
|
-
this.transitionTo(
|
|
5170
|
-
location,
|
|
5171
|
-
function (route) {
|
|
5172
|
-
this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);
|
|
5173
|
-
this$1$1.index++;
|
|
5174
|
-
onComplete && onComplete(route);
|
|
5175
|
-
},
|
|
5176
|
-
onAbort
|
|
5177
|
-
);
|
|
5178
|
-
};
|
|
5179
|
-
|
|
5180
|
-
AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {
|
|
5181
|
-
var this$1$1 = this;
|
|
5182
|
-
|
|
5183
|
-
this.transitionTo(
|
|
5184
|
-
location,
|
|
5185
|
-
function (route) {
|
|
5186
|
-
this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);
|
|
5187
|
-
onComplete && onComplete(route);
|
|
5188
|
-
},
|
|
5189
|
-
onAbort
|
|
5190
|
-
);
|
|
5191
|
-
};
|
|
5192
|
-
|
|
5193
|
-
AbstractHistory.prototype.go = function go (n) {
|
|
5194
|
-
var this$1$1 = this;
|
|
5195
|
-
|
|
5196
|
-
var targetIndex = this.index + n;
|
|
5197
|
-
if (targetIndex < 0 || targetIndex >= this.stack.length) {
|
|
5198
|
-
return
|
|
5199
|
-
}
|
|
5200
|
-
var route = this.stack[targetIndex];
|
|
5201
|
-
this.confirmTransition(
|
|
5202
|
-
route,
|
|
5203
|
-
function () {
|
|
5204
|
-
var prev = this$1$1.current;
|
|
5205
|
-
this$1$1.index = targetIndex;
|
|
5206
|
-
this$1$1.updateRoute(route);
|
|
5207
|
-
this$1$1.router.afterHooks.forEach(function (hook) {
|
|
5208
|
-
hook && hook(route, prev);
|
|
5209
|
-
});
|
|
5210
|
-
},
|
|
5211
|
-
function (err) {
|
|
5212
|
-
if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
|
|
5213
|
-
this$1$1.index = targetIndex;
|
|
5214
|
-
}
|
|
5215
|
-
}
|
|
5216
|
-
);
|
|
5217
|
-
};
|
|
5218
|
-
|
|
5219
|
-
AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {
|
|
5220
|
-
var current = this.stack[this.stack.length - 1];
|
|
5221
|
-
return current ? current.fullPath : '/'
|
|
5222
|
-
};
|
|
5223
|
-
|
|
5224
|
-
AbstractHistory.prototype.ensureURL = function ensureURL () {
|
|
5225
|
-
// noop
|
|
5226
|
-
};
|
|
5227
|
-
|
|
5228
|
-
return AbstractHistory;
|
|
5229
|
-
}(History));
|
|
5230
|
-
|
|
5231
|
-
/* */
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
var VueRouter = function VueRouter (options) {
|
|
5236
|
-
if ( options === void 0 ) options = {};
|
|
5237
|
-
|
|
5238
|
-
if (false) {}
|
|
5239
|
-
this.app = null;
|
|
5240
|
-
this.apps = [];
|
|
5241
|
-
this.options = options;
|
|
5242
|
-
this.beforeHooks = [];
|
|
5243
|
-
this.resolveHooks = [];
|
|
5244
|
-
this.afterHooks = [];
|
|
5245
|
-
this.matcher = createMatcher(options.routes || [], this);
|
|
5246
|
-
|
|
5247
|
-
var mode = options.mode || 'hash';
|
|
5248
|
-
this.fallback =
|
|
5249
|
-
mode === 'history' && !supportsPushState && options.fallback !== false;
|
|
5250
|
-
if (this.fallback) {
|
|
5251
|
-
mode = 'hash';
|
|
5252
|
-
}
|
|
5253
|
-
if (!inBrowser) {
|
|
5254
|
-
mode = 'abstract';
|
|
5255
|
-
}
|
|
5256
|
-
this.mode = mode;
|
|
5257
|
-
|
|
5258
|
-
switch (mode) {
|
|
5259
|
-
case 'history':
|
|
5260
|
-
this.history = new HTML5History(this, options.base);
|
|
5261
|
-
break
|
|
5262
|
-
case 'hash':
|
|
5263
|
-
this.history = new HashHistory(this, options.base, this.fallback);
|
|
5264
|
-
break
|
|
5265
|
-
case 'abstract':
|
|
5266
|
-
this.history = new AbstractHistory(this, options.base);
|
|
5267
|
-
break
|
|
5268
|
-
default:
|
|
5269
|
-
if (false) {}
|
|
5270
|
-
}
|
|
5271
|
-
};
|
|
5272
|
-
|
|
5273
|
-
var prototypeAccessors = { currentRoute: { configurable: true } };
|
|
5274
|
-
|
|
5275
|
-
VueRouter.prototype.match = function match (raw, current, redirectedFrom) {
|
|
5276
|
-
return this.matcher.match(raw, current, redirectedFrom)
|
|
5277
|
-
};
|
|
5278
|
-
|
|
5279
|
-
prototypeAccessors.currentRoute.get = function () {
|
|
5280
|
-
return this.history && this.history.current
|
|
5281
|
-
};
|
|
5282
|
-
|
|
5283
|
-
VueRouter.prototype.init = function init (app /* Vue component instance */) {
|
|
5284
|
-
var this$1$1 = this;
|
|
5285
|
-
|
|
5286
|
-
"production" !== 'production' &&
|
|
5287
|
-
assert(
|
|
5288
|
-
install.installed,
|
|
5289
|
-
"not installed. Make sure to call `Vue.use(VueRouter)` " +
|
|
5290
|
-
"before creating root instance."
|
|
5291
|
-
);
|
|
5292
|
-
|
|
5293
|
-
this.apps.push(app);
|
|
5294
|
-
|
|
5295
|
-
// set up app destroyed handler
|
|
5296
|
-
// https://github.com/vuejs/vue-router/issues/2639
|
|
5297
|
-
app.$once('hook:destroyed', function () {
|
|
5298
|
-
// clean out app from this.apps array once destroyed
|
|
5299
|
-
var index = this$1$1.apps.indexOf(app);
|
|
5300
|
-
if (index > -1) { this$1$1.apps.splice(index, 1); }
|
|
5301
|
-
// ensure we still have a main app or null if no apps
|
|
5302
|
-
// we do not release the router so it can be reused
|
|
5303
|
-
if (this$1$1.app === app) { this$1$1.app = this$1$1.apps[0] || null; }
|
|
5304
|
-
|
|
5305
|
-
if (!this$1$1.app) { this$1$1.history.teardown(); }
|
|
5306
|
-
});
|
|
5307
|
-
|
|
5308
|
-
// main app previously initialized
|
|
5309
|
-
// return as we don't need to set up new history listener
|
|
5310
|
-
if (this.app) {
|
|
5311
|
-
return
|
|
5312
|
-
}
|
|
5313
|
-
|
|
5314
|
-
this.app = app;
|
|
5315
|
-
|
|
5316
|
-
var history = this.history;
|
|
5317
|
-
|
|
5318
|
-
if (history instanceof HTML5History || history instanceof HashHistory) {
|
|
5319
|
-
var handleInitialScroll = function (routeOrError) {
|
|
5320
|
-
var from = history.current;
|
|
5321
|
-
var expectScroll = this$1$1.options.scrollBehavior;
|
|
5322
|
-
var supportsScroll = supportsPushState && expectScroll;
|
|
5323
|
-
|
|
5324
|
-
if (supportsScroll && 'fullPath' in routeOrError) {
|
|
5325
|
-
handleScroll(this$1$1, routeOrError, from, false);
|
|
5326
|
-
}
|
|
5327
|
-
};
|
|
5328
|
-
var setupListeners = function (routeOrError) {
|
|
5329
|
-
history.setupListeners();
|
|
5330
|
-
handleInitialScroll(routeOrError);
|
|
5331
|
-
};
|
|
5332
|
-
history.transitionTo(
|
|
5333
|
-
history.getCurrentLocation(),
|
|
5334
|
-
setupListeners,
|
|
5335
|
-
setupListeners
|
|
5336
|
-
);
|
|
5337
|
-
}
|
|
5338
|
-
|
|
5339
|
-
history.listen(function (route) {
|
|
5340
|
-
this$1$1.apps.forEach(function (app) {
|
|
5341
|
-
app._route = route;
|
|
5342
|
-
});
|
|
5343
|
-
});
|
|
5344
|
-
};
|
|
5345
|
-
|
|
5346
|
-
VueRouter.prototype.beforeEach = function beforeEach (fn) {
|
|
5347
|
-
return registerHook(this.beforeHooks, fn)
|
|
5348
|
-
};
|
|
5349
|
-
|
|
5350
|
-
VueRouter.prototype.beforeResolve = function beforeResolve (fn) {
|
|
5351
|
-
return registerHook(this.resolveHooks, fn)
|
|
5352
|
-
};
|
|
5353
|
-
|
|
5354
|
-
VueRouter.prototype.afterEach = function afterEach (fn) {
|
|
5355
|
-
return registerHook(this.afterHooks, fn)
|
|
5356
|
-
};
|
|
5357
|
-
|
|
5358
|
-
VueRouter.prototype.onReady = function onReady (cb, errorCb) {
|
|
5359
|
-
this.history.onReady(cb, errorCb);
|
|
5360
|
-
};
|
|
5361
|
-
|
|
5362
|
-
VueRouter.prototype.onError = function onError (errorCb) {
|
|
5363
|
-
this.history.onError(errorCb);
|
|
5364
|
-
};
|
|
5365
|
-
|
|
5366
|
-
VueRouter.prototype.push = function push (location, onComplete, onAbort) {
|
|
5367
|
-
var this$1$1 = this;
|
|
5368
|
-
|
|
5369
|
-
// $flow-disable-line
|
|
5370
|
-
if (!onComplete && !onAbort && typeof Promise !== 'undefined') {
|
|
5371
|
-
return new Promise(function (resolve, reject) {
|
|
5372
|
-
this$1$1.history.push(location, resolve, reject);
|
|
5373
|
-
})
|
|
5374
|
-
} else {
|
|
5375
|
-
this.history.push(location, onComplete, onAbort);
|
|
5376
|
-
}
|
|
5377
|
-
};
|
|
5378
|
-
|
|
5379
|
-
VueRouter.prototype.replace = function replace (location, onComplete, onAbort) {
|
|
5380
|
-
var this$1$1 = this;
|
|
5381
|
-
|
|
5382
|
-
// $flow-disable-line
|
|
5383
|
-
if (!onComplete && !onAbort && typeof Promise !== 'undefined') {
|
|
5384
|
-
return new Promise(function (resolve, reject) {
|
|
5385
|
-
this$1$1.history.replace(location, resolve, reject);
|
|
5386
|
-
})
|
|
5387
|
-
} else {
|
|
5388
|
-
this.history.replace(location, onComplete, onAbort);
|
|
5389
|
-
}
|
|
5390
|
-
};
|
|
5391
|
-
|
|
5392
|
-
VueRouter.prototype.go = function go (n) {
|
|
5393
|
-
this.history.go(n);
|
|
5394
|
-
};
|
|
5395
|
-
|
|
5396
|
-
VueRouter.prototype.back = function back () {
|
|
5397
|
-
this.go(-1);
|
|
5398
|
-
};
|
|
5399
|
-
|
|
5400
|
-
VueRouter.prototype.forward = function forward () {
|
|
5401
|
-
this.go(1);
|
|
5402
|
-
};
|
|
5403
|
-
|
|
5404
|
-
VueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {
|
|
5405
|
-
var route = to
|
|
5406
|
-
? to.matched
|
|
5407
|
-
? to
|
|
5408
|
-
: this.resolve(to).route
|
|
5409
|
-
: this.currentRoute;
|
|
5410
|
-
if (!route) {
|
|
5411
|
-
return []
|
|
5412
|
-
}
|
|
5413
|
-
return [].concat.apply(
|
|
5414
|
-
[],
|
|
5415
|
-
route.matched.map(function (m) {
|
|
5416
|
-
return Object.keys(m.components).map(function (key) {
|
|
5417
|
-
return m.components[key]
|
|
5418
|
-
})
|
|
5419
|
-
})
|
|
5420
|
-
)
|
|
5421
|
-
};
|
|
5422
|
-
|
|
5423
|
-
VueRouter.prototype.resolve = function resolve (
|
|
5424
|
-
to,
|
|
5425
|
-
current,
|
|
5426
|
-
append
|
|
5427
|
-
) {
|
|
5428
|
-
current = current || this.history.current;
|
|
5429
|
-
var location = normalizeLocation(to, current, append, this);
|
|
5430
|
-
var route = this.match(location, current);
|
|
5431
|
-
var fullPath = route.redirectedFrom || route.fullPath;
|
|
5432
|
-
var base = this.history.base;
|
|
5433
|
-
var href = createHref(base, fullPath, this.mode);
|
|
5434
|
-
return {
|
|
5435
|
-
location: location,
|
|
5436
|
-
route: route,
|
|
5437
|
-
href: href,
|
|
5438
|
-
// for backwards compat
|
|
5439
|
-
normalizedTo: location,
|
|
5440
|
-
resolved: route
|
|
5441
|
-
}
|
|
5442
|
-
};
|
|
5443
|
-
|
|
5444
|
-
VueRouter.prototype.getRoutes = function getRoutes () {
|
|
5445
|
-
return this.matcher.getRoutes()
|
|
5446
|
-
};
|
|
5447
|
-
|
|
5448
|
-
VueRouter.prototype.addRoute = function addRoute (parentOrRoute, route) {
|
|
5449
|
-
this.matcher.addRoute(parentOrRoute, route);
|
|
5450
|
-
if (this.history.current !== START) {
|
|
5451
|
-
this.history.transitionTo(this.history.getCurrentLocation());
|
|
5452
|
-
}
|
|
5453
|
-
};
|
|
5454
|
-
|
|
5455
|
-
VueRouter.prototype.addRoutes = function addRoutes (routes) {
|
|
5456
|
-
if (false) {}
|
|
5457
|
-
this.matcher.addRoutes(routes);
|
|
5458
|
-
if (this.history.current !== START) {
|
|
5459
|
-
this.history.transitionTo(this.history.getCurrentLocation());
|
|
5460
|
-
}
|
|
5461
|
-
};
|
|
5462
|
-
|
|
5463
|
-
Object.defineProperties( VueRouter.prototype, prototypeAccessors );
|
|
5464
|
-
|
|
5465
|
-
var VueRouter$1 = VueRouter;
|
|
5466
|
-
|
|
5467
|
-
function registerHook (list, fn) {
|
|
5468
|
-
list.push(fn);
|
|
5469
|
-
return function () {
|
|
5470
|
-
var i = list.indexOf(fn);
|
|
5471
|
-
if (i > -1) { list.splice(i, 1); }
|
|
5472
|
-
}
|
|
5473
|
-
}
|
|
5474
|
-
|
|
5475
|
-
function createHref (base, fullPath, mode) {
|
|
5476
|
-
var path = mode === 'hash' ? '#' + fullPath : fullPath;
|
|
5477
|
-
return base ? cleanPath(base + '/' + path) : path
|
|
5478
|
-
}
|
|
5479
|
-
|
|
5480
|
-
// We cannot remove this as it would be a breaking change
|
|
5481
|
-
VueRouter.install = install;
|
|
5482
|
-
VueRouter.version = '3.6.5';
|
|
5483
|
-
VueRouter.isNavigationFailure = isNavigationFailure;
|
|
5484
|
-
VueRouter.NavigationFailureType = NavigationFailureType;
|
|
5485
|
-
VueRouter.START_LOCATION = START;
|
|
5486
|
-
|
|
5487
|
-
if (inBrowser && window.Vue) {
|
|
5488
|
-
window.Vue.use(VueRouter);
|
|
5489
|
-
}
|
|
5490
|
-
|
|
5491
|
-
var version = '3.6.5';
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
// CONCATENATED MODULE: ./src/wapp/common/router/index.js
|
|
5496
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "constantRoutes", function() { return constantRoutes; });
|
|
5497
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetRouter", function() { return resetRouter; });
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
external_commonjs_vue_commonjs2_vue_root_Vue_default.a.use(VueRouter$1);
|
|
5501
|
-
|
|
5502
|
-
// 获取原型对象push函数
|
|
5503
|
-
var originalPush = VueRouter$1.prototype.push;
|
|
5504
|
-
// 获取原型对象replace函数
|
|
5505
|
-
var originalReplace = VueRouter$1.prototype.replace;
|
|
5506
|
-
// 修改原型对象中的push函数
|
|
5507
|
-
VueRouter$1.prototype.push = function push(location) {
|
|
5508
|
-
return originalPush.call(this, location).catch(function (err) {
|
|
5509
|
-
return err;
|
|
5510
|
-
});
|
|
5511
|
-
};
|
|
5512
|
-
// 修改原型对象中的replace函数
|
|
5513
|
-
VueRouter$1.prototype.replace = function replace(location) {
|
|
5514
|
-
return originalReplace.call(this, location).catch(function (err) {
|
|
5515
|
-
return err;
|
|
5516
|
-
});
|
|
5517
|
-
};
|
|
5518
|
-
/**
|
|
5519
|
-
* Note: sub-menu only appear when route children.length >= 1
|
|
5520
|
-
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
|
5521
|
-
*
|
|
5522
|
-
* hidden: true if set true, item will not show in the sidebar(default is false)
|
|
5523
|
-
* alwaysShow: true if set true, will always show the root menu
|
|
5524
|
-
* if not set alwaysShow, when item has more than one children route,
|
|
5525
|
-
* it will becomes nested mode, otherwise not show the root menu
|
|
5526
|
-
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
|
|
5527
|
-
* name:'router-name' the name is used by <keep-alive> (must set!!!)
|
|
5528
|
-
* meta : {
|
|
5529
|
-
roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
|
5530
|
-
title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
|
5531
|
-
icon: 'svg-name' the icon show in the sidebar
|
|
5532
|
-
noCache: true if set true, the page will no be cached(default is false)
|
|
5533
|
-
affix: true if set true, the tag will affix in the tags-view
|
|
5534
|
-
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
|
5535
|
-
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
|
5536
|
-
}
|
|
5537
|
-
*/
|
|
5538
|
-
|
|
5539
|
-
/**
|
|
5540
|
-
* constantRoutes
|
|
5541
|
-
* a base page that does not have permission requirements
|
|
5542
|
-
* all roles can be accessed
|
|
5543
|
-
*/
|
|
5544
|
-
var constantRoutes = [];
|
|
5545
|
-
var router_createRouter = function createRouter() {
|
|
5546
|
-
return new VueRouter$1({
|
|
5547
|
-
// mode: 'history', // require service support
|
|
5548
|
-
scrollBehavior: function scrollBehavior() {
|
|
5549
|
-
return {
|
|
5550
|
-
y: 0
|
|
5551
|
-
};
|
|
5552
|
-
},
|
|
5553
|
-
routes: constantRoutes
|
|
5554
|
-
});
|
|
5555
|
-
};
|
|
5556
|
-
var router = router_createRouter();
|
|
5557
|
-
function resetRouter() {
|
|
5558
|
-
var newRouter = router_createRouter();
|
|
5559
|
-
router.matcher = newRouter.matcher; // reset router
|
|
5560
|
-
}
|
|
5561
|
-
/* harmony default export */ var common_router = __webpack_exports__["default"] = (router);
|
|
5562
|
-
|
|
5563
|
-
/***/ }),
|
|
5564
|
-
|
|
5565
|
-
/***/ "fb15":
|
|
5566
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5567
|
-
|
|
5568
|
-
"use strict";
|
|
5569
|
-
__webpack_require__.r(__webpack_exports__);
|
|
5570
|
-
|
|
5571
|
-
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
5572
|
-
// This file is imported into lib/wc client bundles.
|
|
5573
|
-
|
|
5574
|
-
if (typeof window !== 'undefined') {
|
|
5575
|
-
var currentScript = window.document.currentScript
|
|
5576
|
-
if (true) {
|
|
5577
|
-
var getCurrentScript = __webpack_require__("8875")
|
|
5578
|
-
currentScript = getCurrentScript()
|
|
5579
|
-
|
|
5580
|
-
// for backward compatibility, because previously we directly included the polyfill
|
|
5581
|
-
if (!('currentScript' in document)) {
|
|
5582
|
-
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
|
5583
|
-
}
|
|
5584
|
-
}
|
|
5585
|
-
|
|
5586
|
-
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
5587
|
-
if (src) {
|
|
5588
|
-
__webpack_require__.p = src[1] // eslint-disable-line
|
|
5589
|
-
}
|
|
5590
|
-
}
|
|
5591
|
-
|
|
5592
|
-
// Indicate to webpack that this file can be concatenated
|
|
5593
|
-
/* harmony default export */ var setPublicPath = (null);
|
|
5594
|
-
|
|
5595
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9ad868ba-vue-loader-template"}!./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ecyoa/email/src/index.vue?vue&type=template&id=66e2781e&scoped=true&
|
|
5596
|
-
var render = function render() {
|
|
5597
|
-
var _vm = this,
|
|
5598
|
-
_c = _vm._self._c;
|
|
5599
|
-
return _c('div', {
|
|
5600
|
-
staticClass: "app-wrapper",
|
|
5601
|
-
class: _vm.classObj,
|
|
5602
|
-
on: {
|
|
5603
|
-
"click": _vm.handleBodyOnClick
|
|
5604
|
-
}
|
|
5605
|
-
}, [_vm.awaitShow ? _c('LeftMenu', {
|
|
5606
|
-
staticClass: "sidebar-container",
|
|
5607
|
-
on: {
|
|
5608
|
-
"getate": _vm.getate
|
|
5609
|
-
}
|
|
5610
|
-
}) : _vm._e(), _c('div', {
|
|
5611
|
-
staticClass: "main-container",
|
|
5612
|
-
class: {
|
|
5613
|
-
hasTagsView: _vm.needTagsView
|
|
5614
|
-
},
|
|
5615
|
-
staticStyle: {
|
|
5616
|
-
"background": "#F4F6F9"
|
|
5617
|
-
}
|
|
5618
|
-
}, [_c('div', {
|
|
5619
|
-
class: {
|
|
5620
|
-
'fixed-header': _vm.fixedHeader
|
|
5621
|
-
},
|
|
5622
|
-
staticStyle: {
|
|
5623
|
-
"position": "relative"
|
|
5624
|
-
}
|
|
5625
|
-
}, [_vm.needTagsView && _vm.showTopMenus ? _c('tags-view', {
|
|
5626
|
-
ref: "tagsView",
|
|
5627
|
-
staticStyle: {
|
|
5628
|
-
"padding-right": "245px"
|
|
5629
|
-
}
|
|
5630
|
-
}) : _vm._e(), _vm.show ? _c('div', {
|
|
5631
|
-
staticClass: "headInfo"
|
|
5632
|
-
}, [_c('div', {
|
|
5633
|
-
ref: "imgHead",
|
|
5634
|
-
staticStyle: {
|
|
5635
|
-
"cursor": "pointer"
|
|
5636
|
-
},
|
|
5637
|
-
on: {
|
|
5638
|
-
"click": function click($event) {
|
|
5639
|
-
_vm.accountDialog = !_vm.accountDialog;
|
|
5640
|
-
}
|
|
5641
|
-
}
|
|
5642
|
-
}, [_c('div', {
|
|
5643
|
-
staticStyle: {
|
|
5644
|
-
"max-width": "200px",
|
|
5645
|
-
"display": "inline-block",
|
|
5646
|
-
"position": "absolute",
|
|
5647
|
-
"top": "16px",
|
|
5648
|
-
"right": "46px"
|
|
5649
|
-
}
|
|
5650
|
-
}, [_vm.valueHead !== null ? _c('div', {
|
|
5651
|
-
staticClass: "imgHead2",
|
|
5652
|
-
style: {
|
|
5653
|
-
'background-color': _vm.colorDisplay(_vm.valueHead)
|
|
5654
|
-
}
|
|
5655
|
-
}, [_c('span', {
|
|
5656
|
-
staticStyle: {
|
|
5657
|
-
"font-size": "14px",
|
|
5658
|
-
"color": "#ffffff",
|
|
5659
|
-
"line-height": "16px"
|
|
2419
|
+
}, [_c('span', {
|
|
2420
|
+
staticStyle: {
|
|
2421
|
+
"font-size": "14px",
|
|
2422
|
+
"color": "#ffffff",
|
|
2423
|
+
"line-height": "16px"
|
|
5660
2424
|
}
|
|
5661
2425
|
}, [_vm._v(_vm._s(_vm.headDisplay(_vm.valueHead)))])]) : _vm._e(), _c('span', {
|
|
5662
2426
|
staticStyle: {
|
|
@@ -5715,763 +2479,69 @@ var render = function render() {
|
|
|
5715
2479
|
staticStyle: {
|
|
5716
2480
|
"margin-top": "4px",
|
|
5717
2481
|
"padding": "0",
|
|
5718
|
-
"color": "#666",
|
|
5719
|
-
"line-height": "20px"
|
|
5720
|
-
}
|
|
5721
|
-
}, [_vm._v("最近登录:" + _vm._s(_vm.lastTimeLog.operateTime))])])]), _c('div', {
|
|
5722
|
-
staticClass: "optionListWrap",
|
|
5723
|
-
staticStyle: {
|
|
5724
|
-
"padding": "16px 0"
|
|
5725
|
-
}
|
|
5726
|
-
}, _vm._l(_vm.accountList, function (item) {
|
|
5727
|
-
return _c('div', {
|
|
5728
|
-
key: item.id,
|
|
5729
|
-
staticStyle: {
|
|
5730
|
-
"position": "relative"
|
|
5731
|
-
}
|
|
5732
|
-
}, [_c('div', {
|
|
5733
|
-
staticClass: "optionList",
|
|
5734
|
-
on: {
|
|
5735
|
-
"click": function click($event) {
|
|
5736
|
-
return _vm.selectMail(item);
|
|
5737
|
-
}
|
|
5738
|
-
}
|
|
5739
|
-
}, [item.emailAddr === _vm.valueMail ? _c('span', {
|
|
5740
|
-
staticStyle: {
|
|
5741
|
-
"color": "#409EFF"
|
|
5742
|
-
}
|
|
5743
|
-
}, [_vm._v(_vm._s(item.emailAddr) + " "), _c('span', [_vm._v("(" + _vm._s(_vm.unreadNum) + ")")])]) : _c('span', [_vm._v(_vm._s(item.emailAddr) + " "), _c('span', [_vm._v("(" + _vm._s(_vm.unreadNum) + ")")])])]), item.emailAddr === _vm.valueMail ? _c('img', {
|
|
5744
|
-
staticStyle: {
|
|
5745
|
-
"height": "16px",
|
|
5746
|
-
"position": "absolute",
|
|
5747
|
-
"top": "0",
|
|
5748
|
-
"right": "21px"
|
|
5749
|
-
},
|
|
5750
|
-
attrs: {
|
|
5751
|
-
"src": './images/w-imgs/success.png',
|
|
5752
|
-
"alt": ""
|
|
5753
|
-
}
|
|
5754
|
-
}) : _vm._e()]);
|
|
5755
|
-
}), 0)])]) : _c('div', {
|
|
5756
|
-
staticClass: "headInfo"
|
|
5757
|
-
})], 1), _vm.defultMail || _vm.awaitShow ? _c('app-main') : _vm._e(), _vm.showSettings ? _c('right-panel', [_c('settings')], 1) : _vm._e()], 1)], 1);
|
|
5758
|
-
};
|
|
5759
|
-
var staticRenderFns = [];
|
|
5760
|
-
|
|
5761
|
-
// CONCATENATED MODULE: ./packages/ecyoa/email/src/index.vue?vue&type=template&id=66e2781e&scoped=true&
|
|
5762
|
-
|
|
5763
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9ad868ba-vue-loader-template"}!./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ecyoa/email/src/components/LeftMenu.vue?vue&type=template&id=670785a0&
|
|
5764
|
-
var LeftMenuvue_type_template_id_670785a0_render = function render() {
|
|
5765
|
-
var _vm = this,
|
|
5766
|
-
_c = _vm._self._c;
|
|
5767
|
-
return _c('el-scrollbar', {
|
|
5768
|
-
class: {
|
|
5769
|
-
'std-scrollbar-wrapper': _vm.showTopMenus,
|
|
5770
|
-
'dark-scrollbar-wrapper': !_vm.showTopMenus
|
|
5771
|
-
},
|
|
5772
|
-
attrs: {
|
|
5773
|
-
"wrap-class": "scrollbar-wrapper"
|
|
5774
|
-
}
|
|
5775
|
-
}, [_c('el-menu', {
|
|
5776
|
-
attrs: {
|
|
5777
|
-
"default-active": _vm.activeMenu,
|
|
5778
|
-
"collapse": false,
|
|
5779
|
-
"background-color": _vm.menuBg,
|
|
5780
|
-
"text-color": _vm.menuText,
|
|
5781
|
-
"unique-opened": true,
|
|
5782
|
-
"collapse-transition": false
|
|
5783
|
-
}
|
|
5784
|
-
}, [_c('el-menu-item', {
|
|
5785
|
-
directives: [{
|
|
5786
|
-
name: "show",
|
|
5787
|
-
rawName: "v-show",
|
|
5788
|
-
value: _vm.menuName !== '' && false,
|
|
5789
|
-
expression: "menuName!=='' && false"
|
|
5790
|
-
}],
|
|
5791
|
-
staticClass: "submenu-title-noDropdown",
|
|
5792
|
-
attrs: {
|
|
5793
|
-
"index": "0",
|
|
5794
|
-
"disabled": ""
|
|
5795
|
-
}
|
|
5796
|
-
}, [_vm.menuIcon.indexOf('.svg') > -1 ? _c('svg-icon', {
|
|
5797
|
-
attrs: {
|
|
5798
|
-
"icon-class": _vm.menuIconClass
|
|
5799
|
-
}
|
|
5800
|
-
}) : _vm._e(), _vm.menuIcon.indexOf('.svg') === -1 ? _c('i', {
|
|
5801
|
-
class: _vm.menuIcon
|
|
5802
|
-
}) : _vm._e(), _c('span', {
|
|
5803
|
-
staticClass: "appname"
|
|
5804
|
-
}, [_vm._v(_vm._s(_vm.menuName))])], 1), _c('div', {
|
|
5805
|
-
staticClass: "topBtn-wrapper",
|
|
5806
|
-
staticStyle: {
|
|
5807
|
-
"text-align": "center",
|
|
5808
|
-
"height": "55px"
|
|
5809
|
-
}
|
|
5810
|
-
}, [_c('div', {
|
|
5811
|
-
staticClass: "writeEmail",
|
|
5812
|
-
on: {
|
|
5813
|
-
"click": function click($event) {
|
|
5814
|
-
return _vm.gotoPages('email.svg');
|
|
5815
|
-
}
|
|
5816
|
-
}
|
|
5817
|
-
}, [_c('svg-icon', {
|
|
5818
|
-
staticStyle: {
|
|
5819
|
-
"color": "#48BA79",
|
|
5820
|
-
"width": "14px",
|
|
5821
|
-
"height": "14px"
|
|
5822
|
-
},
|
|
5823
|
-
attrs: {
|
|
5824
|
-
"icon-class": "email"
|
|
5825
|
-
}
|
|
5826
|
-
}), _vm._v(" "), _c('span', [_vm._v("收信")])], 1), _c('div', {
|
|
5827
|
-
staticClass: "writeEmail",
|
|
5828
|
-
on: {
|
|
5829
|
-
"click": _vm.gotoWrite
|
|
5830
|
-
}
|
|
5831
|
-
}, [_c('svg-icon', {
|
|
5832
|
-
staticStyle: {
|
|
5833
|
-
"fill": "#EC8423",
|
|
5834
|
-
"width": "14px",
|
|
5835
|
-
"height": "14px"
|
|
5836
|
-
},
|
|
5837
|
-
attrs: {
|
|
5838
|
-
"icon-class": "email_xieyoujian"
|
|
5839
|
-
}
|
|
5840
|
-
}), _vm._v(" "), _c('span', [_vm._v("写信")])], 1)]), [_vm._l(_vm.routes, function (route) {
|
|
5841
|
-
return [_c('sidebar-item', {
|
|
5842
|
-
key: route.path,
|
|
5843
|
-
attrs: {
|
|
5844
|
-
"item": _vm.resetRoute(route),
|
|
5845
|
-
"base-path": route.path
|
|
5846
|
-
}
|
|
5847
|
-
})];
|
|
5848
|
-
})]], 2)], 1);
|
|
5849
|
-
};
|
|
5850
|
-
var LeftMenuvue_type_template_id_670785a0_staticRenderFns = [];
|
|
5851
|
-
|
|
5852
|
-
// CONCATENATED MODULE: ./packages/ecyoa/email/src/components/LeftMenu.vue?vue&type=template&id=670785a0&
|
|
5853
|
-
|
|
5854
|
-
// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm.js
|
|
5855
|
-
var vuex_esm = __webpack_require__("2f62");
|
|
5856
|
-
|
|
5857
|
-
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ecyoa/email/src/components/LeftMenu.vue?vue&type=script&lang=js&
|
|
5858
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5859
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
5860
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
5861
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5862
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5863
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5864
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5865
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5866
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5867
|
-
|
|
5868
|
-
var _variables = __webpack_require__("4fe4");
|
|
5869
|
-
var router = __webpack_require__("f583").default;
|
|
5870
|
-
/* harmony default export */ var LeftMenuvue_type_script_lang_js_ = ({
|
|
5871
|
-
data: function data() {
|
|
5872
|
-
return {
|
|
5873
|
-
menuName: '',
|
|
5874
|
-
menuIcon: '',
|
|
5875
|
-
menuIconClass: '',
|
|
5876
|
-
folder: [],
|
|
5877
|
-
// 文件夹数组
|
|
5878
|
-
xieyoujianPath: '',
|
|
5879
|
-
isFolder: true,
|
|
5880
|
-
defultMail: '',
|
|
5881
|
-
yjjkMenu: true,
|
|
5882
|
-
bfyxMenu: true,
|
|
5883
|
-
txlMenu: true,
|
|
5884
|
-
unreadNum: 0,
|
|
5885
|
-
draftsNum: 0,
|
|
5886
|
-
usersetId: '',
|
|
5887
|
-
updataLM: true
|
|
5888
|
-
};
|
|
5889
|
-
},
|
|
5890
|
-
watch: {
|
|
5891
|
-
'folder': {
|
|
5892
|
-
handler: function handler(val) {
|
|
5893
|
-
// this.refreshIsFolder()
|
|
5894
|
-
}
|
|
5895
|
-
}
|
|
5896
|
-
},
|
|
5897
|
-
// eslint-disable-next-line vue/order-in-components
|
|
5898
|
-
computed: _objectSpread(_objectSpread({}, Object(vuex_esm["a" /* mapGetters */])(['routes', 'sidebar', 'loginUser'])), {}, {
|
|
5899
|
-
showTopMenus: function showTopMenus() {
|
|
5900
|
-
return this.$store.state.settings.showTopMenus;
|
|
5901
|
-
},
|
|
5902
|
-
activeMenu: function activeMenu() {
|
|
5903
|
-
var route = this.$route;
|
|
5904
|
-
var meta = route.meta,
|
|
5905
|
-
path = route.path;
|
|
5906
|
-
console.log(route, 'route');
|
|
5907
|
-
// if set path, the sidebar will highlight the path you set
|
|
5908
|
-
if (meta.activeMenu) {
|
|
5909
|
-
return meta.activeMenu;
|
|
5910
|
-
}
|
|
5911
|
-
return path;
|
|
5912
|
-
},
|
|
5913
|
-
variables: function variables() {
|
|
5914
|
-
return _variables;
|
|
5915
|
-
},
|
|
5916
|
-
isCollapse: function isCollapse() {
|
|
5917
|
-
return !this.sidebar.opened;
|
|
5918
|
-
},
|
|
5919
|
-
menuBg: function menuBg() {
|
|
5920
|
-
return this.showTopMenus ? _variables.stdMenuBgcolor : _variables.darkMenuBgcolor;
|
|
5921
|
-
},
|
|
5922
|
-
menuText: function menuText() {
|
|
5923
|
-
return this.showTopMenus ? _variables.stdMenuText : _variables.darkMenuText;
|
|
5924
|
-
},
|
|
5925
|
-
menuActiveText: function menuActiveText() {
|
|
5926
|
-
return this.showTopMenus ? _variables.stdMenuAcitveText : _variables.darkMenuAcitveText;
|
|
5927
|
-
}
|
|
5928
|
-
}),
|
|
5929
|
-
beforeCreate: function beforeCreate() {},
|
|
5930
|
-
created: function created() {
|
|
5931
|
-
var _this = this;
|
|
5932
|
-
this.$options.components['SidebarItem'] = this.$loadComponent('@/wapp/common/layout/components/Sidebar/SidebarItem');
|
|
5933
|
-
this.$bus.on('changeEmail', function (res) {
|
|
5934
|
-
_this.defultMail = res;
|
|
5935
|
-
});
|
|
5936
|
-
this.$bus.on('refreshFolder', this.refreshIsFolder);
|
|
5937
|
-
this.$bus.on('getMenuName', this.getMenuName);
|
|
5938
|
-
this.getFolder();
|
|
5939
|
-
if (sessionStorage.getItem('currentMail') !== null && sessionStorage.getItem('currentMail') !== 'undefined') {
|
|
5940
|
-
this.defultMail = JSON.parse(sessionStorage.getItem('currentMail'));
|
|
5941
|
-
}
|
|
5942
|
-
this.$bus.on('updateInboxLMnum', this.unread);
|
|
5943
|
-
this.$bus.on('updateDraftsNum', this.drafts);
|
|
5944
|
-
this.getUnreadNum();
|
|
5945
|
-
this.getdraftsNum();
|
|
5946
|
-
},
|
|
5947
|
-
beforeDestroy: function beforeDestroy() {
|
|
5948
|
-
this.$bus.off('refreshFolder', this.refreshIsFolder);
|
|
5949
|
-
this.$bus.off('getMenuName', this.getMenuName);
|
|
5950
|
-
this.$bus.off('changeEmail');
|
|
5951
|
-
this.$bus.off('updateInboxLMnum', this.unread);
|
|
5952
|
-
this.$bus.off('updateDraftsNum', this.drafts);
|
|
5953
|
-
},
|
|
5954
|
-
mounted: function mounted() {},
|
|
5955
|
-
methods: {
|
|
5956
|
-
// 请求文件夹接口
|
|
5957
|
-
getFolder: function getFolder() {
|
|
5958
|
-
var _this2 = this;
|
|
5959
|
-
var mainpage = null; // 栏目页面组件
|
|
5960
|
-
for (var i = 0; i < this.routes.length; i++) {
|
|
5961
|
-
if (this.routes[i].meta && this.routes[i].meta.id === this.$route.meta.id && this.routes[i].meta.level === 1 && this.routes[i].children && this.routes[i].children.length > 0) {
|
|
5962
|
-
mainpage = this.routes[i];
|
|
5963
|
-
mainpage.children[0].children = mainpage.children[0].children || [];
|
|
5964
|
-
}
|
|
5965
|
-
}
|
|
5966
|
-
if (mainpage !== null) {
|
|
5967
|
-
if (sessionStorage.getItem('currentMail') !== null && sessionStorage.getItem('currentMail') !== 'undefined') {
|
|
5968
|
-
var currentMail = JSON.parse(sessionStorage.getItem('currentMail'));
|
|
5969
|
-
|
|
5970
|
-
// 请求被监控人员
|
|
5971
|
-
var queryparams = [{
|
|
5972
|
-
'compare': 'like',
|
|
5973
|
-
'field': 'mailAddr',
|
|
5974
|
-
'merge': true,
|
|
5975
|
-
'value': currentMail.emailAddr
|
|
5976
|
-
}, {
|
|
5977
|
-
'compare': '=',
|
|
5978
|
-
'field': 'orgCode',
|
|
5979
|
-
'merge': true,
|
|
5980
|
-
'value': currentMail.orgCode
|
|
5981
|
-
}];
|
|
5982
|
-
this.$app.querydata('/mail/byRegulator/querydata', queryparams).then(function (resp) {
|
|
5983
|
-
if (resp.code === 'success') {
|
|
5984
|
-
_this2.yjjkMenu = false;
|
|
5985
|
-
if (resp.body.listdata.length === 0) {
|
|
5986
|
-
_this2.yjjkMenu = false;
|
|
5987
|
-
} else if (resp.body.listdata.length && currentMail.accountType === 1) {
|
|
5988
|
-
_this2.yjjkMenu = true;
|
|
5989
|
-
}
|
|
5990
|
-
} else {
|
|
5991
|
-
_this2.$alert(resp.message, {
|
|
5992
|
-
type: 'error'
|
|
5993
|
-
});
|
|
5994
|
-
}
|
|
5995
|
-
});
|
|
5996
|
-
|
|
5997
|
-
// 请求是否有备份邮箱数据
|
|
5998
|
-
var queryparams2 = [{
|
|
5999
|
-
'compare': 'like',
|
|
6000
|
-
'field': 'backupAdds',
|
|
6001
|
-
'merge': true,
|
|
6002
|
-
'value': "%".concat(this.loginUser.personAccount, "%")
|
|
6003
|
-
}];
|
|
6004
|
-
this.$app.querydata('/mail/userSetup/querydata', queryparams2).then(function (resp2) {
|
|
6005
|
-
if (resp2.code === 'success') {
|
|
6006
|
-
_this2.bfyxMenu = false;
|
|
6007
|
-
if (resp2.body.listdata.length === 0) {
|
|
6008
|
-
_this2.bfyxMenu = false;
|
|
6009
|
-
} else if (resp2.body.listdata.length && currentMail.accountType === 1) {
|
|
6010
|
-
_this2.bfyxMenu = true;
|
|
6011
|
-
}
|
|
6012
|
-
} else {
|
|
6013
|
-
_this2.$alert(resp2.message, {
|
|
6014
|
-
type: 'error'
|
|
6015
|
-
});
|
|
6016
|
-
}
|
|
6017
|
-
});
|
|
6018
|
-
|
|
6019
|
-
// 初始化自定义文件夹
|
|
6020
|
-
var usersetId = currentMail.id;
|
|
6021
|
-
var params = {
|
|
6022
|
-
orderBy: 'orderNo asc',
|
|
6023
|
-
urlsearch: "boxType:DEFINED;usersetId:".concat(usersetId)
|
|
6024
|
-
};
|
|
6025
|
-
this.$app.listdata('/mail/messageBox/listdata', params).then(function (res) {
|
|
6026
|
-
console.log(res, 666666);
|
|
6027
|
-
if (res.code === 'success') {
|
|
6028
|
-
_this2.folder = res.body.pageInfo.list;
|
|
6029
|
-
_this2.getDh(mainpage);
|
|
6030
|
-
} else {
|
|
6031
|
-
_this2.$alert(res.message, {
|
|
6032
|
-
type: 'error'
|
|
6033
|
-
});
|
|
6034
|
-
}
|
|
6035
|
-
});
|
|
6036
|
-
} else {
|
|
6037
|
-
this.gotoPages('email.svg');
|
|
6038
|
-
}
|
|
6039
|
-
} else if (this.$route.meta.title === '管理文件夹') {} else {
|
|
6040
|
-
this.gotoPages('email.svg');
|
|
6041
|
-
}
|
|
6042
|
-
},
|
|
6043
|
-
// 动态生成左边导航
|
|
6044
|
-
getDh: function getDh(mainpage) {
|
|
6045
|
-
var _this3 = this;
|
|
6046
|
-
var _loop = function _loop() {
|
|
6047
|
-
var proute = _this3.routes[i];
|
|
6048
|
-
if (proute.meta && proute.meta.parentId === _this3.$route.meta.id) {
|
|
6049
|
-
console.log('prouteprouteproute===', proute);
|
|
6050
|
-
// 将标准左导航菜单路由修改为当前栏目路径下的子路由
|
|
6051
|
-
if (proute.children && proute.children.length === 1) {
|
|
6052
|
-
proute.component = window.$loadComponent('@/wapp/common/layout/components/Blank');
|
|
6053
|
-
var troute = proute.children[0];
|
|
6054
|
-
troute.path = proute.children[0].meta.id + i; // 路由的path不能相同,增加一个随机数字
|
|
6055
|
-
troute.fullPath = proute.path + '/' + troute.path;
|
|
6056
|
-
troute.meta.target = 'mainpage'; // 邮箱是“左导航+工作区”自定义布局
|
|
6057
|
-
} else {
|
|
6058
|
-
proute.path = mainpage.path + '/' + mainpage.children[0].path + '/' + proute.meta.id;
|
|
6059
|
-
}
|
|
6060
|
-
mainpage.children[0].children.push(proute);
|
|
6061
|
-
if (proute.meta.title === '自定义文件夹') {
|
|
6062
|
-
proute.children = [];
|
|
6063
|
-
// if (this.routes[i].children.length === 0) {
|
|
6064
|
-
// 加载文件夹配置,动态添加到路由中
|
|
6065
|
-
myFolders = [];
|
|
6066
|
-
_this3.folder.forEach(function (res) {
|
|
6067
|
-
myFolders.push({
|
|
6068
|
-
id: res.id,
|
|
6069
|
-
name: res.boxName
|
|
6070
|
-
});
|
|
6071
|
-
});
|
|
6072
|
-
myFolders.push({
|
|
6073
|
-
id: 'glwjj',
|
|
6074
|
-
name: '管理文件夹'
|
|
6075
|
-
});
|
|
6076
|
-
_this3.routes[i].component = window.$loadComponent('@/wapp/common/layout/components/Blank');
|
|
6077
|
-
myFolders.forEach(function (folder) {
|
|
6078
|
-
var folderRoute = {
|
|
6079
|
-
'path': folder.id,
|
|
6080
|
-
'name': folder.id,
|
|
6081
|
-
'alias': folder.name,
|
|
6082
|
-
'hidden': false,
|
|
6083
|
-
'alwaysShow': false,
|
|
6084
|
-
'component': _this3.$loadComponent('@/wapp/email/components/EmailFolder'),
|
|
6085
|
-
'meta': {
|
|
6086
|
-
'id': folder.id,
|
|
6087
|
-
'title': folder.name,
|
|
6088
|
-
'level': 3,
|
|
6089
|
-
'parentId': proute.meta.id,
|
|
6090
|
-
'parentIconCode': proute.meta.icon,
|
|
6091
|
-
'parentTitle': proute.alias,
|
|
6092
|
-
'activeMenu': proute.path + '/' + folder.id,
|
|
6093
|
-
'sysCode': proute.meta.sysCode,
|
|
6094
|
-
'target': 'mainpage'
|
|
6095
|
-
}
|
|
6096
|
-
};
|
|
6097
|
-
proute.children.push(folderRoute);
|
|
6098
|
-
});
|
|
6099
|
-
}
|
|
6100
|
-
}
|
|
6101
|
-
};
|
|
6102
|
-
for (var i = 0; i < this.routes.length; i++) {
|
|
6103
|
-
var myFolders;
|
|
6104
|
-
_loop();
|
|
6105
|
-
}
|
|
6106
|
-
this.xieyoujianPath = {
|
|
6107
|
-
'path': 'writeMail',
|
|
6108
|
-
'fullPath': mainpage.path + '/' + mainpage.children[0].path + '/writeMail',
|
|
6109
|
-
'name': 'writeMail',
|
|
6110
|
-
'alias': '写邮件',
|
|
6111
|
-
'hidden': false,
|
|
6112
|
-
'alwaysShow': false,
|
|
6113
|
-
'component': this.$loadComponent('@/wapp/email/EmailXieyoujian'),
|
|
6114
|
-
'meta': {
|
|
6115
|
-
'id': 'writeMail',
|
|
6116
|
-
'code': 'writeMail',
|
|
6117
|
-
'title': '写邮件',
|
|
6118
|
-
'level': 2,
|
|
6119
|
-
'parentId': mainpage.children[0].id,
|
|
6120
|
-
'parentIconCode': mainpage.children[0].meta.code,
|
|
6121
|
-
'parentTitle': mainpage.children[0].alias,
|
|
6122
|
-
'activeMenu': mainpage.children[0].path,
|
|
6123
|
-
'sysCode': mainpage.children[0].meta.sysCode,
|
|
6124
|
-
'icon': 'email_xieyoujian.svg',
|
|
6125
|
-
'target': 'mainpage'
|
|
6126
|
-
}
|
|
6127
|
-
};
|
|
6128
|
-
mainpage.children[0].children.push(this.xieyoujianPath);
|
|
6129
|
-
router.addRoutes([mainpage]);
|
|
6130
|
-
if (this.activeMenu && this.activeMenu.indexOf('/tm/') === 0) {
|
|
6131
|
-
// 写邮件时刷新页面,刷新后重新进入写邮件界面
|
|
6132
|
-
this.gotoWrite();
|
|
6133
|
-
}
|
|
6134
|
-
var lroutes = mainpage.children[0].children.filter(function (proute) {
|
|
6135
|
-
if (proute.children && proute.children.length === 1 && proute.children[0].meta.target === 'mainpage') {
|
|
6136
|
-
return true;
|
|
6137
|
-
}
|
|
6138
|
-
});
|
|
6139
|
-
if (lroutes.length > 0) this.$router.push(lroutes[0].children[0].fullPath);
|
|
6140
|
-
},
|
|
6141
|
-
getMenuName: function getMenuName(menuName, menuIcon) {
|
|
6142
|
-
this.menuName = menuName;
|
|
6143
|
-
this.menuIcon = menuIcon;
|
|
6144
|
-
if (this.menuIcon.indexOf('.svg') > -1) {
|
|
6145
|
-
this.menuIconClass = this.menuIcon.substring(0, this.menuIcon.lastIndexOf('.svg'));
|
|
6146
|
-
} else {
|
|
6147
|
-
this.menuIcon = 'el-icon-' + this.menuIcon;
|
|
6148
|
-
}
|
|
6149
|
-
},
|
|
6150
|
-
// 获取收件箱未读数目
|
|
6151
|
-
getUnreadNum: function getUnreadNum() {
|
|
6152
|
-
var _this4 = this;
|
|
6153
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6154
|
-
var unreadNum, params, res;
|
|
6155
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6156
|
-
while (1) switch (_context.prev = _context.next) {
|
|
6157
|
-
case 0:
|
|
6158
|
-
unreadNum = 0;
|
|
6159
|
-
params = {
|
|
6160
|
-
orderBy: 'orderNo asc',
|
|
6161
|
-
urlsearch: "usersetId:".concat(_this4.defultMail.id, ";")
|
|
6162
|
-
};
|
|
6163
|
-
_context.next = 4;
|
|
6164
|
-
return _this4.$app.listdata('/mail/messageBox/listdata', params);
|
|
6165
|
-
case 4:
|
|
6166
|
-
res = _context.sent;
|
|
6167
|
-
if (res.code === 'success') {
|
|
6168
|
-
res.body.pageInfo.list.forEach(function (item) {
|
|
6169
|
-
if (item.boxType === 'INBOX') {
|
|
6170
|
-
unreadNum = item.notReadedNum;
|
|
6171
|
-
}
|
|
6172
|
-
return false;
|
|
6173
|
-
});
|
|
6174
|
-
}
|
|
6175
|
-
_this4.$bus.emit('updateInboxLMnum', unreadNum);
|
|
6176
|
-
case 7:
|
|
6177
|
-
case "end":
|
|
6178
|
-
return _context.stop();
|
|
6179
|
-
}
|
|
6180
|
-
}, _callee);
|
|
6181
|
-
}))();
|
|
6182
|
-
},
|
|
6183
|
-
// 获取草稿箱数目
|
|
6184
|
-
getdraftsNum: function getdraftsNum() {
|
|
6185
|
-
var _this5 = this;
|
|
6186
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
6187
|
-
var draftsNum, currentMail, usersetId;
|
|
6188
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
6189
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
6190
|
-
case 0:
|
|
6191
|
-
draftsNum = 0;
|
|
6192
|
-
currentMail = JSON.parse(sessionStorage.getItem('currentMail'));
|
|
6193
|
-
usersetId = currentMail.id; // const params = {
|
|
6194
|
-
// urlsearch: `usersetId:${usersetId}`
|
|
6195
|
-
// }
|
|
6196
|
-
// const res = await this.$app.listdata('/mail/message/listdata?&mailBoxType=DRAFT&accountType=1&usersetId=' + usersetId)
|
|
6197
|
-
_this5.$http({
|
|
6198
|
-
contentType: 'application/x-www-form-urlencoded',
|
|
6199
|
-
url: '/mail/message/listdata?&usersetId=' + usersetId,
|
|
6200
|
-
params: {
|
|
6201
|
-
mailBoxType: 'DRAFT',
|
|
6202
|
-
accountType: 1
|
|
6203
|
-
},
|
|
6204
|
-
method: 'POST'
|
|
6205
|
-
}).then(function (res) {
|
|
6206
|
-
_this5.draftsNum = draftsNum = res.body.pageInfo.total;
|
|
6207
|
-
});
|
|
6208
|
-
_this5.$bus.emit('updateDraftsNum', draftsNum);
|
|
6209
|
-
case 5:
|
|
6210
|
-
case "end":
|
|
6211
|
-
return _context2.stop();
|
|
6212
|
-
}
|
|
6213
|
-
}, _callee2);
|
|
6214
|
-
}))();
|
|
6215
|
-
},
|
|
6216
|
-
// 刷新文件夹
|
|
6217
|
-
refreshIsFolder: function refreshIsFolder() {
|
|
6218
|
-
var _this6 = this;
|
|
6219
|
-
console.log('refreshIsFolder', new Date());
|
|
6220
|
-
this.isFolder = false;
|
|
6221
|
-
this.getFolder();
|
|
6222
|
-
this.$bus.on('changeEmail', function (res) {
|
|
6223
|
-
_this6.defultMail = JSON.parse(sessionStorage.getItem('currentMail'));
|
|
6224
|
-
});
|
|
6225
|
-
this.$nextTick(function () {
|
|
6226
|
-
_this6.isFolder = true;
|
|
6227
|
-
});
|
|
6228
|
-
},
|
|
6229
|
-
gotoWrite: function gotoWrite() {
|
|
6230
|
-
this.gotoPages('writeMail');
|
|
6231
|
-
},
|
|
6232
|
-
// 收件箱路由跳转
|
|
6233
|
-
gotoPages: function gotoPages(modelCode) {
|
|
6234
|
-
var toPath = this.getMenuCode(modelCode);
|
|
6235
|
-
if (toPath) {
|
|
6236
|
-
var path;
|
|
6237
|
-
if (toPath.fullPath) {
|
|
6238
|
-
path = toPath.fullPath;
|
|
6239
|
-
} else {
|
|
6240
|
-
switch (toPath.meta.level) {
|
|
6241
|
-
case 3:
|
|
6242
|
-
path = toPath.meta.activeMenu || toPath.path;
|
|
6243
|
-
break;
|
|
6244
|
-
case 4:
|
|
6245
|
-
path = toPath.meta.activeMenu + '/' + toPath.path;
|
|
6246
|
-
break;
|
|
6247
|
-
default:
|
|
6248
|
-
path = toPath.path;
|
|
6249
|
-
}
|
|
6250
|
-
}
|
|
6251
|
-
this.$router.push({
|
|
6252
|
-
path: path
|
|
6253
|
-
});
|
|
6254
|
-
// }
|
|
6255
|
-
}
|
|
6256
|
-
},
|
|
6257
|
-
// 递归查询菜单代码
|
|
6258
|
-
getMenuCode: function getMenuCode(code) {
|
|
6259
|
-
var toPath;
|
|
6260
|
-
function findCode(ary) {
|
|
6261
|
-
ary.forEach(function (val) {
|
|
6262
|
-
if (val.children) {
|
|
6263
|
-
findCode(val.children);
|
|
6264
|
-
}
|
|
6265
|
-
if (!val.children && val.meta && val.meta.code === code) {
|
|
6266
|
-
toPath = val;
|
|
6267
|
-
return false;
|
|
6268
|
-
}
|
|
6269
|
-
});
|
|
6270
|
-
}
|
|
6271
|
-
findCode(this.routes);
|
|
6272
|
-
return toPath;
|
|
6273
|
-
},
|
|
6274
|
-
unread: function unread(num) {
|
|
6275
|
-
var _this7 = this;
|
|
6276
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
6277
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
6278
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
6279
|
-
case 0:
|
|
6280
|
-
_this7.unreadNum = num;
|
|
6281
|
-
_this7.$emit('getate', _this7.unreadNum);
|
|
6282
|
-
_this7.updataLM = false;
|
|
6283
|
-
_this7.$nextTick(function () {
|
|
6284
|
-
_this7.updataLM = true;
|
|
6285
|
-
});
|
|
6286
|
-
case 4:
|
|
6287
|
-
case "end":
|
|
6288
|
-
return _context3.stop();
|
|
6289
|
-
}
|
|
6290
|
-
}, _callee3);
|
|
6291
|
-
}))();
|
|
6292
|
-
},
|
|
6293
|
-
drafts: function drafts(val) {
|
|
6294
|
-
var _this8 = this;
|
|
6295
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
6296
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
6297
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
6298
|
-
case 0:
|
|
6299
|
-
_this8.draftsNum = val;
|
|
6300
|
-
_this8.updataLm = false;
|
|
6301
|
-
_this8.$nextTick(function () {
|
|
6302
|
-
_this8.updataLm = true;
|
|
6303
|
-
});
|
|
6304
|
-
case 3:
|
|
6305
|
-
case "end":
|
|
6306
|
-
return _context4.stop();
|
|
6307
|
-
}
|
|
6308
|
-
}, _callee4);
|
|
6309
|
-
}))();
|
|
6310
|
-
},
|
|
6311
|
-
resetRoute: function resetRoute(route) {
|
|
6312
|
-
if (route.meta && route.meta.title === '收件箱') {
|
|
6313
|
-
if (route.children && route.children.length > 0 && this.unreadNum > 0) {
|
|
6314
|
-
route.children[0].alias = '收件箱(' + this.unreadNum + ')';
|
|
6315
|
-
if (route.children[0].meta) route.children[0].meta.title = '收件箱(' + this.unreadNum + ')';
|
|
6316
|
-
} else {
|
|
6317
|
-
route.children[0].alias = '收件箱';
|
|
6318
|
-
if (route.children[0].meta) route.children[0].meta.title = '收件箱';
|
|
6319
|
-
}
|
|
6320
|
-
} else if (route.meta && route.meta.title === '草稿箱') {
|
|
6321
|
-
if (route.children && route.children.length > 0 && this.draftsNum > 0) {
|
|
6322
|
-
route.children[0].alias = '草稿箱' + this.draftsNum + ')';
|
|
6323
|
-
if (route.children[0].meta) route.children[0].meta.title = '草稿箱(' + this.draftsNum + ')';
|
|
6324
|
-
}
|
|
6325
|
-
// else {
|
|
6326
|
-
// route.children[0].alias = '草稿箱'
|
|
6327
|
-
// if (route.children[0].meta)route.children[0].meta.title = '草稿箱' + 3
|
|
6328
|
-
// }
|
|
6329
|
-
}
|
|
6330
|
-
return route;
|
|
2482
|
+
"color": "#666",
|
|
2483
|
+
"line-height": "20px"
|
|
6331
2484
|
}
|
|
6332
|
-
}
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
6343
|
-
// This module is a runtime utility for cleaner component module output and will
|
|
6344
|
-
// be included in the final webpack user bundle.
|
|
6345
|
-
|
|
6346
|
-
function normalizeComponent(
|
|
6347
|
-
scriptExports,
|
|
6348
|
-
render,
|
|
6349
|
-
staticRenderFns,
|
|
6350
|
-
functionalTemplate,
|
|
6351
|
-
injectStyles,
|
|
6352
|
-
scopeId,
|
|
6353
|
-
moduleIdentifier /* server only */,
|
|
6354
|
-
shadowMode /* vue-cli only */
|
|
6355
|
-
) {
|
|
6356
|
-
// Vue.extend constructor export interop
|
|
6357
|
-
var options =
|
|
6358
|
-
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
6359
|
-
|
|
6360
|
-
// render functions
|
|
6361
|
-
if (render) {
|
|
6362
|
-
options.render = render
|
|
6363
|
-
options.staticRenderFns = staticRenderFns
|
|
6364
|
-
options._compiled = true
|
|
6365
|
-
}
|
|
6366
|
-
|
|
6367
|
-
// functional template
|
|
6368
|
-
if (functionalTemplate) {
|
|
6369
|
-
options.functional = true
|
|
6370
|
-
}
|
|
6371
|
-
|
|
6372
|
-
// scopedId
|
|
6373
|
-
if (scopeId) {
|
|
6374
|
-
options._scopeId = 'data-v-' + scopeId
|
|
6375
|
-
}
|
|
6376
|
-
|
|
6377
|
-
var hook
|
|
6378
|
-
if (moduleIdentifier) {
|
|
6379
|
-
// server build
|
|
6380
|
-
hook = function (context) {
|
|
6381
|
-
// 2.3 injection
|
|
6382
|
-
context =
|
|
6383
|
-
context || // cached call
|
|
6384
|
-
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
6385
|
-
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
6386
|
-
// 2.2 with runInNewContext: true
|
|
6387
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
6388
|
-
context = __VUE_SSR_CONTEXT__
|
|
2485
|
+
}, [_vm._v("最近登录:" + _vm._s(_vm.lastTimeLog.operateTime))])])]), _c('div', {
|
|
2486
|
+
staticClass: "optionListWrap",
|
|
2487
|
+
staticStyle: {
|
|
2488
|
+
"padding": "16px 0"
|
|
2489
|
+
}
|
|
2490
|
+
}, _vm._l(_vm.accountList, function (item) {
|
|
2491
|
+
return _c('div', {
|
|
2492
|
+
key: item.id,
|
|
2493
|
+
staticStyle: {
|
|
2494
|
+
"position": "relative"
|
|
6389
2495
|
}
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
2496
|
+
}, [_c('div', {
|
|
2497
|
+
staticClass: "optionList",
|
|
2498
|
+
on: {
|
|
2499
|
+
"click": function click($event) {
|
|
2500
|
+
return _vm.selectMail(item);
|
|
2501
|
+
}
|
|
6393
2502
|
}
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
2503
|
+
}, [item.emailAddr === _vm.valueMail ? _c('span', {
|
|
2504
|
+
staticStyle: {
|
|
2505
|
+
"color": "#409EFF"
|
|
6397
2506
|
}
|
|
6398
|
-
}
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
)
|
|
6409
|
-
}
|
|
6410
|
-
: injectStyles
|
|
6411
|
-
}
|
|
6412
|
-
|
|
6413
|
-
if (hook) {
|
|
6414
|
-
if (options.functional) {
|
|
6415
|
-
// for template-only hot-reload because in that case the render fn doesn't
|
|
6416
|
-
// go through the normalizer
|
|
6417
|
-
options._injectStyles = hook
|
|
6418
|
-
// register for functional component in vue file
|
|
6419
|
-
var originalRender = options.render
|
|
6420
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
6421
|
-
hook.call(context)
|
|
6422
|
-
return originalRender(h, context)
|
|
2507
|
+
}, [_vm._v(_vm._s(item.emailAddr) + " "), _c('span', [_vm._v("(" + _vm._s(_vm.unreadNum) + ")")])]) : _c('span', [_vm._v(_vm._s(item.emailAddr) + " "), _c('span', [_vm._v("(" + _vm._s(_vm.unreadNum) + ")")])])]), item.emailAddr === _vm.valueMail ? _c('img', {
|
|
2508
|
+
staticStyle: {
|
|
2509
|
+
"height": "16px",
|
|
2510
|
+
"position": "absolute",
|
|
2511
|
+
"top": "0",
|
|
2512
|
+
"right": "21px"
|
|
2513
|
+
},
|
|
2514
|
+
attrs: {
|
|
2515
|
+
"src": './images/w-imgs/success.png',
|
|
2516
|
+
"alt": ""
|
|
6423
2517
|
}
|
|
6424
|
-
}
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
return {
|
|
6432
|
-
exports: scriptExports,
|
|
6433
|
-
options: options
|
|
6434
|
-
}
|
|
6435
|
-
}
|
|
6436
|
-
|
|
6437
|
-
// CONCATENATED MODULE: ./packages/ecyoa/email/src/components/LeftMenu.vue
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
2518
|
+
}) : _vm._e()]);
|
|
2519
|
+
}), 0)])]) : _c('div', {
|
|
2520
|
+
staticClass: "headInfo"
|
|
2521
|
+
})], 1), _vm.defultMail || _vm.awaitShow ? _c('app-main') : _vm._e(), _vm.showSettings ? _c('right-panel', [_c('settings')], 1) : _vm._e()], 1)], 1);
|
|
2522
|
+
};
|
|
2523
|
+
var staticRenderFns = [];
|
|
6443
2524
|
|
|
6444
|
-
|
|
2525
|
+
// CONCATENATED MODULE: ./packages/ecyoa/email/src/index.vue?vue&type=template&id=5e809c44&scoped=true&
|
|
6445
2526
|
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
LeftMenuvue_type_template_id_670785a0_render,
|
|
6449
|
-
LeftMenuvue_type_template_id_670785a0_staticRenderFns,
|
|
6450
|
-
false,
|
|
6451
|
-
null,
|
|
6452
|
-
null,
|
|
6453
|
-
null
|
|
6454
|
-
|
|
6455
|
-
)
|
|
2527
|
+
// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm.js
|
|
2528
|
+
var vuex_esm = __webpack_require__("2f62");
|
|
6456
2529
|
|
|
6457
|
-
/* harmony default export */ var LeftMenu = (component.exports);
|
|
6458
2530
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/ecyoa/email/src/index.vue?vue&type=script&lang=js&
|
|
6459
|
-
function
|
|
6460
|
-
function
|
|
6461
|
-
function
|
|
6462
|
-
function
|
|
6463
|
-
function
|
|
6464
|
-
function
|
|
2531
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2532
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2533
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2534
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2535
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
2536
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6465
2537
|
var ResizeMixin = __webpack_require__("49ef").default;
|
|
6466
2538
|
var getinitial = __webpack_require__("ef8d").default;
|
|
6467
|
-
|
|
2539
|
+
//import LeftMenu from './components/LeftMenu'
|
|
6468
2540
|
|
|
6469
2541
|
|
|
6470
2542
|
/* harmony default export */ var srcvue_type_script_lang_js_ = ({
|
|
6471
2543
|
name: 'MailLayout',
|
|
6472
|
-
components: {
|
|
6473
|
-
LeftMenu: LeftMenu
|
|
6474
|
-
},
|
|
2544
|
+
components: {},
|
|
6475
2545
|
mixins: [ResizeMixin],
|
|
6476
2546
|
data: function data() {
|
|
6477
2547
|
return {
|
|
@@ -6493,7 +2563,7 @@ var getinitial = __webpack_require__("ef8d").default;
|
|
|
6493
2563
|
unreadNum: 0
|
|
6494
2564
|
};
|
|
6495
2565
|
},
|
|
6496
|
-
computed:
|
|
2566
|
+
computed: _objectSpread(_objectSpread(_objectSpread({}, Object(vuex_esm["a" /* mapGetters */])(['routes'])), Object(vuex_esm["b" /* mapState */])({
|
|
6497
2567
|
sidebar: function sidebar(state) {
|
|
6498
2568
|
return state.app.sidebar;
|
|
6499
2569
|
},
|
|
@@ -6678,8 +2748,6 @@ var getinitial = __webpack_require__("ef8d").default;
|
|
|
6678
2748
|
},
|
|
6679
2749
|
// 路由跳转
|
|
6680
2750
|
gotoPages: function gotoPages(code) {
|
|
6681
|
-
console.log(555555555555, code);
|
|
6682
|
-
debugger;
|
|
6683
2751
|
var toPath = this.getMenuCode(code);
|
|
6684
2752
|
if (toPath && toPath.path) {
|
|
6685
2753
|
var path;
|
|
@@ -6722,8 +2790,106 @@ var getinitial = __webpack_require__("ef8d").default;
|
|
|
6722
2790
|
});
|
|
6723
2791
|
// CONCATENATED MODULE: ./packages/ecyoa/email/src/index.vue?vue&type=script&lang=js&
|
|
6724
2792
|
/* harmony default export */ var email_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
|
|
6725
|
-
// EXTERNAL MODULE: ./packages/ecyoa/email/src/index.vue?vue&type=style&index=0&id=
|
|
6726
|
-
var
|
|
2793
|
+
// EXTERNAL MODULE: ./packages/ecyoa/email/src/index.vue?vue&type=style&index=0&id=5e809c44&prod&lang=scss&scoped=true&
|
|
2794
|
+
var srcvue_type_style_index_0_id_5e809c44_prod_lang_scss_scoped_true_ = __webpack_require__("8979");
|
|
2795
|
+
|
|
2796
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2797
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
2798
|
+
|
|
2799
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
2800
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
2801
|
+
// be included in the final webpack user bundle.
|
|
2802
|
+
|
|
2803
|
+
function normalizeComponent(
|
|
2804
|
+
scriptExports,
|
|
2805
|
+
render,
|
|
2806
|
+
staticRenderFns,
|
|
2807
|
+
functionalTemplate,
|
|
2808
|
+
injectStyles,
|
|
2809
|
+
scopeId,
|
|
2810
|
+
moduleIdentifier /* server only */,
|
|
2811
|
+
shadowMode /* vue-cli only */
|
|
2812
|
+
) {
|
|
2813
|
+
// Vue.extend constructor export interop
|
|
2814
|
+
var options =
|
|
2815
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
2816
|
+
|
|
2817
|
+
// render functions
|
|
2818
|
+
if (render) {
|
|
2819
|
+
options.render = render
|
|
2820
|
+
options.staticRenderFns = staticRenderFns
|
|
2821
|
+
options._compiled = true
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
// functional template
|
|
2825
|
+
if (functionalTemplate) {
|
|
2826
|
+
options.functional = true
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
// scopedId
|
|
2830
|
+
if (scopeId) {
|
|
2831
|
+
options._scopeId = 'data-v-' + scopeId
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
var hook
|
|
2835
|
+
if (moduleIdentifier) {
|
|
2836
|
+
// server build
|
|
2837
|
+
hook = function (context) {
|
|
2838
|
+
// 2.3 injection
|
|
2839
|
+
context =
|
|
2840
|
+
context || // cached call
|
|
2841
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
2842
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
2843
|
+
// 2.2 with runInNewContext: true
|
|
2844
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
2845
|
+
context = __VUE_SSR_CONTEXT__
|
|
2846
|
+
}
|
|
2847
|
+
// inject component styles
|
|
2848
|
+
if (injectStyles) {
|
|
2849
|
+
injectStyles.call(this, context)
|
|
2850
|
+
}
|
|
2851
|
+
// register component module identifier for async chunk inferrence
|
|
2852
|
+
if (context && context._registeredComponents) {
|
|
2853
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
// used by ssr in case component is cached and beforeCreate
|
|
2857
|
+
// never gets called
|
|
2858
|
+
options._ssrRegister = hook
|
|
2859
|
+
} else if (injectStyles) {
|
|
2860
|
+
hook = shadowMode
|
|
2861
|
+
? function () {
|
|
2862
|
+
injectStyles.call(
|
|
2863
|
+
this,
|
|
2864
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
2865
|
+
)
|
|
2866
|
+
}
|
|
2867
|
+
: injectStyles
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
if (hook) {
|
|
2871
|
+
if (options.functional) {
|
|
2872
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
2873
|
+
// go through the normalizer
|
|
2874
|
+
options._injectStyles = hook
|
|
2875
|
+
// register for functional component in vue file
|
|
2876
|
+
var originalRender = options.render
|
|
2877
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
2878
|
+
hook.call(context)
|
|
2879
|
+
return originalRender(h, context)
|
|
2880
|
+
}
|
|
2881
|
+
} else {
|
|
2882
|
+
// inject component registration as beforeCreate hook
|
|
2883
|
+
var existing = options.beforeCreate
|
|
2884
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
return {
|
|
2889
|
+
exports: scriptExports,
|
|
2890
|
+
options: options
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
6727
2893
|
|
|
6728
2894
|
// CONCATENATED MODULE: ./packages/ecyoa/email/src/index.vue
|
|
6729
2895
|
|
|
@@ -6734,18 +2900,18 @@ var srcvue_type_style_index_0_id_66e2781e_prod_lang_scss_scoped_true_ = __webpac
|
|
|
6734
2900
|
|
|
6735
2901
|
/* normalize component */
|
|
6736
2902
|
|
|
6737
|
-
var
|
|
2903
|
+
var component = normalizeComponent(
|
|
6738
2904
|
email_srcvue_type_script_lang_js_,
|
|
6739
2905
|
render,
|
|
6740
2906
|
staticRenderFns,
|
|
6741
2907
|
false,
|
|
6742
2908
|
null,
|
|
6743
|
-
"
|
|
2909
|
+
"5e809c44",
|
|
6744
2910
|
null
|
|
6745
2911
|
|
|
6746
2912
|
)
|
|
6747
2913
|
|
|
6748
|
-
/* harmony default export */ var email_src = (
|
|
2914
|
+
/* harmony default export */ var email_src = (component.exports);
|
|
6749
2915
|
// CONCATENATED MODULE: ./packages/ecyoa/email/index.js
|
|
6750
2916
|
function email_typeof(o) { "@babel/helpers - typeof"; return email_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, email_typeof(o); }
|
|
6751
2917
|
function email_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|