webpackJsonp([2],{ /***/ 178: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["default"] = ({ data: function data() { return { isCollapsed: false, menuActiveName: "list", // active-name menuData: [], breadcrumb: [] }; }, components: {}, mounted: function mounted() { var _this = this; this.menuData = __webpack_require__(234); this.$nextTick(function () { _this.menuActiveName = _this.$route.path.slice(1); _this.$refs.leftMenu.updateActiveName(); // 手动更新当前选择项,注意要在 $nextTick 里调用 }); this.bindBreadcrumb(this.$route.matched[this.$route.matched.length - 1].name); }, computed: { rotateIcon: function rotateIcon() { return ["menu-icon", this.isCollapsed ? "rotate-icon" : ""]; }, menuitemClasses: function menuitemClasses() { return ["menu-item", this.isCollapsed ? "collapsed-menu" : ""]; } }, watch: { $route: function $route(val) { this.bindBreadcrumb(val.matched[val.matched.length - 1].name); } }, methods: { // 面包屑导航 bindBreadcrumb: function bindBreadcrumb(name) { var array = this.menuData; var ret = []; for (var index = 0; index < array.length; index++) { var element = array[index]; ret = [element]; if (element.name == name) { break; } var childrens = element.children; if (childrens) { for (var j = 0; j < childrens.length; j++) { var item = childrens[j]; if (item.name == name) { // let put = Object.assign({}, item); // let put = JSON.parse(JSON.stringify(item)); var put = _extends({}, item); /* if ( item.name == "新建任务" && window.location.href.indexOf("id") != -1 ) { put.name = put.name.replace("新建", "编辑"); } */ ret.push(put); break; } } } if (ret.length > 1) { break; } } this.breadcrumb = ret; }, // 控制菜单缩放 collapsedSider: function collapsedSider() { this.$refs.side1.toggleCollapse(); }, // 退出登录 signOut: function signOut() { var _this2 = this; this.$Modal.warning({ title: '温馨提示', content: '确定要退出当前账户么?', onOk: function onOk() { _this2.$tools.delCookie('token'); _this2.$router.push({ path: '/login' }); } }); } } }); /***/ }), /***/ 195: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ 229: /***/ (function(module, exports, __webpack_require__) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('div', { staticClass: "layout" }, [_c('Layout', [_c('Header', { staticStyle: { "padding-right": "0" } }, [_c('Menu', { attrs: { "mode": "horizontal", "theme": "dark", "active-name": "1", "width": "auto" } }, [_c('div', { staticClass: "layout-logo" }, [_vm._v("\n\t\t\t\t\t\tCrontab\n\t\t\t\t\t")]), _vm._v(" "), _c('Icon', { class: _vm.rotateIcon, style: ({ margin: '18px 20px 0 44px', color: '#fff', float: 'left' }), attrs: { "type": "md-menu", "size": "24" }, nativeOn: { "click": function($event) { return _vm.collapsedSider($event) } } }), _vm._v(" "), _c('div', { staticClass: "layout-nav" }, [_c('MenuItem', { staticClass: "fr", attrs: { "name": "1" }, nativeOn: { "click": function($event) { return _vm.signOut($event) } } }, [_c('Icon', { attrs: { "type": "ios-navigate" } }), _vm._v("\n 退出\n ")], 1)], 1)], 1)], 1), _vm._v(" "), _c('Layout', [_c('Sider', { ref: "side1", style: ({ background: '#fff' }), attrs: { "hide-trigger": "", "collapsible": "", "collapsed-width": 78 }, model: { value: (_vm.isCollapsed), callback: function($$v) { _vm.isCollapsed = $$v }, expression: "isCollapsed" } }, [_c('Menu', { ref: "leftMenu", class: _vm.menuitemClasses, attrs: { "active-name": _vm.menuActiveName, "theme": "light", "width": "auto" } }, _vm._l((_vm.menuData), function(item, index) { return _c('MenuItem', { key: item.path, attrs: { "name": item.path.substr(1), "to": item.path } }, [_c('Icon', { attrs: { "type": item.icon } }), _vm._v(" "), _c('span', [_vm._v(_vm._s(item.name))])], 1) }))], 1), _vm._v(" "), _c('Layout', { style: ({ padding: '0 24px 24px' }) }, [_c('Breadcrumb', { style: ({ margin: '24px 0' }) }, _vm._l((_vm.breadcrumb), function(item, index) { return _c('BreadcrumbItem', { key: item.name, attrs: { "to": item.path } }, [_vm._v(_vm._s(item.name))]) })), _vm._v(" "), _c('Content', { style: ({ padding: '10px', minHeight: '280px', background: '#fff' }) }, [_c('router-view')], 1)], 1)], 1)], 1)], 1) },staticRenderFns: []} module.exports.render._withStripped = true if (false) { module.hot.accept() if (module.hot.data) { require("vue-loader/node_modules/vue-hot-reload-api").rerender("data-v-6bfcf060", module.exports) } } /***/ }), /***/ 234: /***/ (function(module, exports) { module.exports = [{"name":"任务列表","icon":"md-list-box","path":"/list","children":[{"name":"列表2","path":"/list2"}]}] /***/ }), /***/ 32: /***/ (function(module, exports, __webpack_require__) { /* styles */ __webpack_require__(195) var Component = __webpack_require__(16)( /* script */ __webpack_require__(178), /* template */ __webpack_require__(229), /* scopeId */ "data-v-6bfcf060", /* cssModules */ null ) Component.options.__file = "D:\\workarea\\normal\\crontab\\src\\views\\index.vue" if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key !== "__esModule"})) {console.error("named exports are not supported in *.vue files.")} if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")} /* hot reload */ if (false) {(function () { var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api") hotAPI.install(require("vue"), false) if (!hotAPI.compatible) return module.hot.accept() if (!module.hot.data) { hotAPI.createRecord("data-v-6bfcf060", Component.options) } else { hotAPI.reload("data-v-6bfcf060", Component.options) } })()} module.exports = Component.exports /***/ }) });