1 | module.exports =
|
2 | (function(modules) {
|
3 |
|
4 | var installedModules = {};
|
5 |
|
6 |
|
7 | function __webpack_require__(moduleId) {
|
8 |
|
9 |
|
10 | if(installedModules[moduleId]) {
|
11 | return installedModules[moduleId].exports;
|
12 | }
|
13 |
|
14 | var module = installedModules[moduleId] = {
|
15 | i: moduleId,
|
16 | l: false,
|
17 | exports: {}
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.l = true;
|
25 |
|
26 |
|
27 | return module.exports;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 | __webpack_require__.m = modules;
|
33 |
|
34 |
|
35 | __webpack_require__.c = installedModules;
|
36 |
|
37 |
|
38 | __webpack_require__.d = function(exports, name, getter) {
|
39 | if(!__webpack_require__.o(exports, name)) {
|
40 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
41 | }
|
42 | };
|
43 |
|
44 |
|
45 | __webpack_require__.r = function(exports) {
|
46 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
47 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
48 | }
|
49 | Object.defineProperty(exports, '__esModule', { value: true });
|
50 | };
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | __webpack_require__.t = function(value, mode) {
|
58 | if(mode & 1) value = __webpack_require__(value);
|
59 | if(mode & 8) return value;
|
60 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
61 | var ns = Object.create(null);
|
62 | __webpack_require__.r(ns);
|
63 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
64 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
65 | return ns;
|
66 | };
|
67 |
|
68 |
|
69 | __webpack_require__.n = function(module) {
|
70 | var getter = module && module.__esModule ?
|
71 | function getDefault() { return module['default']; } :
|
72 | function getModuleExports() { return module; };
|
73 | __webpack_require__.d(getter, 'a', getter);
|
74 | return getter;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
79 |
|
80 |
|
81 | __webpack_require__.p = "/dist/";
|
82 |
|
83 |
|
84 |
|
85 | return __webpack_require__(__webpack_require__.s = 101);
|
86 | })
|
87 |
|
88 | ({
|
89 |
|
90 | 0:
|
91 | (function(module, __webpack_exports__, __webpack_require__) {
|
92 |
|
93 | "use strict";
|
94 | __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 | function normalizeComponent (
|
102 | scriptExports,
|
103 | render,
|
104 | staticRenderFns,
|
105 | functionalTemplate,
|
106 | injectStyles,
|
107 | scopeId,
|
108 | moduleIdentifier, /* server only */
|
109 | shadowMode /* vue-cli only */
|
110 | ) {
|
111 |
|
112 | var options = typeof scriptExports === 'function'
|
113 | ? scriptExports.options
|
114 | : scriptExports
|
115 |
|
116 |
|
117 | if (render) {
|
118 | options.render = render
|
119 | options.staticRenderFns = staticRenderFns
|
120 | options._compiled = true
|
121 | }
|
122 |
|
123 |
|
124 | if (functionalTemplate) {
|
125 | options.functional = true
|
126 | }
|
127 |
|
128 |
|
129 | if (scopeId) {
|
130 | options._scopeId = 'data-v-' + scopeId
|
131 | }
|
132 |
|
133 | var hook
|
134 | if (moduleIdentifier) {
|
135 | hook = function (context) {
|
136 |
|
137 | context =
|
138 | context ||
|
139 | (this.$vnode && this.$vnode.ssrContext) ||
|
140 | (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext)
|
141 |
|
142 | if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
143 | context = __VUE_SSR_CONTEXT__
|
144 | }
|
145 |
|
146 | if (injectStyles) {
|
147 | injectStyles.call(this, context)
|
148 | }
|
149 |
|
150 | if (context && context._registeredComponents) {
|
151 | context._registeredComponents.add(moduleIdentifier)
|
152 | }
|
153 | }
|
154 |
|
155 |
|
156 | options._ssrRegister = hook
|
157 | } else if (injectStyles) {
|
158 | hook = shadowMode
|
159 | ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
160 | : injectStyles
|
161 | }
|
162 |
|
163 | if (hook) {
|
164 | if (options.functional) {
|
165 |
|
166 |
|
167 | options._injectStyles = hook
|
168 |
|
169 | var originalRender = options.render
|
170 | options.render = function renderWithStyleInjection (h, context) {
|
171 | hook.call(context)
|
172 | return originalRender(h, context)
|
173 | }
|
174 | } else {
|
175 |
|
176 | var existing = options.beforeCreate
|
177 | options.beforeCreate = existing
|
178 | ? [].concat(existing, hook)
|
179 | : [hook]
|
180 | }
|
181 | }
|
182 |
|
183 | return {
|
184 | exports: scriptExports,
|
185 | options: options
|
186 | }
|
187 | }
|
188 |
|
189 |
|
190 | }),
|
191 |
|
192 | 101:
|
193 | (function(module, __webpack_exports__, __webpack_require__) {
|
194 |
|
195 | "use strict";
|
196 | __webpack_require__.r(__webpack_exports__);
|
197 |
|
198 |
|
199 | var render = function() {
|
200 | var _vm = this
|
201 | var _h = _vm.$createElement
|
202 | var _c = _vm._self._c || _h
|
203 | return _c(
|
204 | "li",
|
205 | {
|
206 | staticClass: "el-menu-item",
|
207 | class: {
|
208 | "is-active": _vm.active,
|
209 | "is-disabled": _vm.disabled
|
210 | },
|
211 | style: [
|
212 | _vm.paddingStyle,
|
213 | _vm.itemStyle,
|
214 | { backgroundColor: _vm.backgroundColor }
|
215 | ],
|
216 | attrs: { role: "menuitem", tabindex: "-1" },
|
217 | on: {
|
218 | click: _vm.handleClick,
|
219 | mouseenter: _vm.onMouseEnter,
|
220 | focus: _vm.onMouseEnter,
|
221 | blur: _vm.onMouseLeave,
|
222 | mouseleave: _vm.onMouseLeave
|
223 | }
|
224 | },
|
225 | [
|
226 | _vm.parentMenu.$options.componentName === "ElMenu" &&
|
227 | _vm.rootMenu.collapse &&
|
228 | _vm.$slots.title
|
229 | ? _c("el-tooltip", { attrs: { effect: "dark", placement: "right" } }, [
|
230 | _c(
|
231 | "div",
|
232 | { attrs: { slot: "content" }, slot: "content" },
|
233 | [_vm._t("title")],
|
234 | 2
|
235 | ),
|
236 | _c(
|
237 | "div",
|
238 | {
|
239 | staticStyle: {
|
240 | position: "absolute",
|
241 | left: "0",
|
242 | top: "0",
|
243 | height: "100%",
|
244 | width: "100%",
|
245 | display: "inline-block",
|
246 | "box-sizing": "border-box",
|
247 | padding: "0 20px"
|
248 | }
|
249 | },
|
250 | [_vm._t("default")],
|
251 | 2
|
252 | )
|
253 | ])
|
254 | : [_vm._t("default"), _vm._t("title")]
|
255 | ],
|
256 | 2
|
257 | )
|
258 | }
|
259 | var staticRenderFns = []
|
260 | render._withStripped = true
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 | var menu_mixin = __webpack_require__(36);
|
267 |
|
268 |
|
269 | var tooltip_ = __webpack_require__(29);
|
270 | var tooltip_default = __webpack_require__.n(tooltip_);
|
271 |
|
272 |
|
273 | var emitter_ = __webpack_require__(4);
|
274 | var emitter_default = __webpack_require__.n(emitter_);
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 | var menu_itemvue_type_script_lang_js_ = ({
|
313 | name: 'ElMenuItem',
|
314 |
|
315 | componentName: 'ElMenuItem',
|
316 |
|
317 | mixins: [menu_mixin["a" ], emitter_default.a],
|
318 |
|
319 | components: { ElTooltip: tooltip_default.a },
|
320 |
|
321 | props: {
|
322 | index: {
|
323 | default: null,
|
324 | validator: function validator(val) {
|
325 | return typeof val === 'string' || val === null;
|
326 | }
|
327 | },
|
328 | route: [String, Object],
|
329 | disabled: Boolean
|
330 | },
|
331 | computed: {
|
332 | active: function active() {
|
333 | return this.index === this.rootMenu.activeIndex;
|
334 | },
|
335 | hoverBackground: function hoverBackground() {
|
336 | return this.rootMenu.hoverBackground;
|
337 | },
|
338 | backgroundColor: function backgroundColor() {
|
339 | return this.rootMenu.backgroundColor || '';
|
340 | },
|
341 | activeTextColor: function activeTextColor() {
|
342 | return this.rootMenu.activeTextColor || '';
|
343 | },
|
344 | textColor: function textColor() {
|
345 | return this.rootMenu.textColor || '';
|
346 | },
|
347 | mode: function mode() {
|
348 | return this.rootMenu.mode;
|
349 | },
|
350 | itemStyle: function itemStyle() {
|
351 | var style = {
|
352 | color: this.active ? this.activeTextColor : this.textColor
|
353 | };
|
354 | if (this.mode === 'horizontal' && !this.isNested) {
|
355 | style.borderBottomColor = this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent';
|
356 | }
|
357 | return style;
|
358 | },
|
359 | isNested: function isNested() {
|
360 | return this.parentMenu !== this.rootMenu;
|
361 | }
|
362 | },
|
363 | methods: {
|
364 | onMouseEnter: function onMouseEnter() {
|
365 | if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
|
366 | this.$el.style.backgroundColor = this.hoverBackground;
|
367 | },
|
368 | onMouseLeave: function onMouseLeave() {
|
369 | if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
|
370 | this.$el.style.backgroundColor = this.backgroundColor;
|
371 | },
|
372 | handleClick: function handleClick() {
|
373 | if (!this.disabled) {
|
374 | this.dispatch('ElMenu', 'item-click', this);
|
375 | this.$emit('click', this);
|
376 | }
|
377 | }
|
378 | },
|
379 | mounted: function mounted() {
|
380 | this.parentMenu.addItem(this);
|
381 | this.rootMenu.addItem(this);
|
382 | },
|
383 | beforeDestroy: function beforeDestroy() {
|
384 | this.parentMenu.removeItem(this);
|
385 | this.rootMenu.removeItem(this);
|
386 | }
|
387 | });
|
388 |
|
389 | var src_menu_itemvue_type_script_lang_js_ = (menu_itemvue_type_script_lang_js_);
|
390 |
|
391 | var componentNormalizer = __webpack_require__(0);
|
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 |
|
399 |
|
400 |
|
401 | var component = Object(componentNormalizer["a" ])(
|
402 | src_menu_itemvue_type_script_lang_js_,
|
403 | render,
|
404 | staticRenderFns,
|
405 | false,
|
406 | null,
|
407 | null,
|
408 | null
|
409 |
|
410 | )
|
411 |
|
412 |
|
413 | if (false) { var api; }
|
414 | component.options.__file = "packages/menu/src/menu-item.vue"
|
415 | var menu_item = (component.exports);
|
416 |
|
417 |
|
418 |
|
419 |
|
420 | menu_item.install = function (Vue) {
|
421 | Vue.component(menu_item.name, menu_item);
|
422 | };
|
423 |
|
424 | var packages_menu_item = __webpack_exports__["default"] = (menu_item);
|
425 |
|
426 | }),
|
427 |
|
428 | 29:
|
429 | (function(module, exports) {
|
430 |
|
431 | module.exports = require("element-ui/lib/tooltip");
|
432 |
|
433 | }),
|
434 |
|
435 | 36:
|
436 | (function(module, __webpack_exports__, __webpack_require__) {
|
437 |
|
438 | "use strict";
|
439 | __webpack_exports__["a"] = ({
|
440 | inject: ['rootMenu'],
|
441 | computed: {
|
442 | indexPath: function indexPath() {
|
443 | var path = [this.index];
|
444 | var parent = this.$parent;
|
445 | while (parent.$options.componentName !== 'ElMenu') {
|
446 | if (parent.index) {
|
447 | path.unshift(parent.index);
|
448 | }
|
449 | parent = parent.$parent;
|
450 | }
|
451 | return path;
|
452 | },
|
453 | parentMenu: function parentMenu() {
|
454 | var parent = this.$parent;
|
455 | while (parent && ['ElMenu', 'ElSubmenu'].indexOf(parent.$options.componentName) === -1) {
|
456 | parent = parent.$parent;
|
457 | }
|
458 | return parent;
|
459 | },
|
460 | paddingStyle: function paddingStyle() {
|
461 | if (this.rootMenu.mode !== 'vertical') return {};
|
462 |
|
463 | var padding = 20;
|
464 | var parent = this.$parent;
|
465 |
|
466 | if (this.rootMenu.collapse) {
|
467 | padding = 20;
|
468 | } else {
|
469 | while (parent && parent.$options.componentName !== 'ElMenu') {
|
470 | if (parent.$options.componentName === 'ElSubmenu') {
|
471 | padding += 20;
|
472 | }
|
473 | parent = parent.$parent;
|
474 | }
|
475 | }
|
476 | return { paddingLeft: padding + 'px' };
|
477 | }
|
478 | }
|
479 | });
|
480 |
|
481 | }),
|
482 |
|
483 | 4:
|
484 | (function(module, exports) {
|
485 |
|
486 | module.exports = require("element-ui/lib/mixins/emitter");
|
487 |
|
488 | })
|
489 |
|
490 | }); |
\ | No newline at end of file |