cascader.js 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  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. /******/ // define __esModule on exports
  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. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  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. /******/ // getDefaultExport function for compatibility with non-harmony modules
  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. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "/dist/";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = 59);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 0:
  90. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91. "use strict";
  92. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  93. /* globals __VUE_SSR_CONTEXT__ */
  94. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  95. // This module is a runtime utility for cleaner component module output and will
  96. // be included in the final webpack user bundle.
  97. function normalizeComponent (
  98. scriptExports,
  99. render,
  100. staticRenderFns,
  101. functionalTemplate,
  102. injectStyles,
  103. scopeId,
  104. moduleIdentifier, /* server only */
  105. shadowMode /* vue-cli only */
  106. ) {
  107. // Vue.extend constructor export interop
  108. var options = typeof scriptExports === 'function'
  109. ? scriptExports.options
  110. : scriptExports
  111. // render functions
  112. if (render) {
  113. options.render = render
  114. options.staticRenderFns = staticRenderFns
  115. options._compiled = true
  116. }
  117. // functional template
  118. if (functionalTemplate) {
  119. options.functional = true
  120. }
  121. // scopedId
  122. if (scopeId) {
  123. options._scopeId = 'data-v-' + scopeId
  124. }
  125. var hook
  126. if (moduleIdentifier) { // server build
  127. hook = function (context) {
  128. // 2.3 injection
  129. context =
  130. context || // cached call
  131. (this.$vnode && this.$vnode.ssrContext) || // stateful
  132. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  133. // 2.2 with runInNewContext: true
  134. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  135. context = __VUE_SSR_CONTEXT__
  136. }
  137. // inject component styles
  138. if (injectStyles) {
  139. injectStyles.call(this, context)
  140. }
  141. // register component module identifier for async chunk inferrence
  142. if (context && context._registeredComponents) {
  143. context._registeredComponents.add(moduleIdentifier)
  144. }
  145. }
  146. // used by ssr in case component is cached and beforeCreate
  147. // never gets called
  148. options._ssrRegister = hook
  149. } else if (injectStyles) {
  150. hook = shadowMode
  151. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  152. : injectStyles
  153. }
  154. if (hook) {
  155. if (options.functional) {
  156. // for template-only hot-reload because in that case the render fn doesn't
  157. // go through the normalizer
  158. options._injectStyles = hook
  159. // register for functioal component in vue file
  160. var originalRender = options.render
  161. options.render = function renderWithStyleInjection (h, context) {
  162. hook.call(context)
  163. return originalRender(h, context)
  164. }
  165. } else {
  166. // inject component registration as beforeCreate hook
  167. var existing = options.beforeCreate
  168. options.beforeCreate = existing
  169. ? [].concat(existing, hook)
  170. : [hook]
  171. }
  172. }
  173. return {
  174. exports: scriptExports,
  175. options: options
  176. }
  177. }
  178. /***/ }),
  179. /***/ 11:
  180. /***/ (function(module, exports) {
  181. module.exports = require("element-ui/lib/utils/clickoutside");
  182. /***/ }),
  183. /***/ 13:
  184. /***/ (function(module, exports) {
  185. module.exports = require("throttle-debounce/debounce");
  186. /***/ }),
  187. /***/ 18:
  188. /***/ (function(module, exports) {
  189. module.exports = require("element-ui/lib/locale");
  190. /***/ }),
  191. /***/ 27:
  192. /***/ (function(module, exports) {
  193. module.exports = require("element-ui/lib/utils/scroll-into-view");
  194. /***/ }),
  195. /***/ 3:
  196. /***/ (function(module, exports) {
  197. module.exports = require("element-ui/lib/mixins/emitter");
  198. /***/ }),
  199. /***/ 32:
  200. /***/ (function(module, exports) {
  201. module.exports = require("babel-helper-vue-jsx-merge-props");
  202. /***/ }),
  203. /***/ 35:
  204. /***/ (function(module, exports) {
  205. module.exports = require("element-ui/lib/utils/shared");
  206. /***/ }),
  207. /***/ 4:
  208. /***/ (function(module, exports) {
  209. module.exports = require("element-ui/lib/utils/util");
  210. /***/ }),
  211. /***/ 5:
  212. /***/ (function(module, exports) {
  213. module.exports = require("element-ui/lib/utils/vue-popper");
  214. /***/ }),
  215. /***/ 59:
  216. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  217. "use strict";
  218. __webpack_require__.r(__webpack_exports__);
  219. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/main.vue?vue&type=template&id=2e869fa1&
  220. var mainvue_type_template_id_2e869fa1_render = function() {
  221. var _vm = this
  222. var _h = _vm.$createElement
  223. var _c = _vm._self._c || _h
  224. return _c(
  225. "span",
  226. {
  227. directives: [
  228. {
  229. name: "clickoutside",
  230. rawName: "v-clickoutside",
  231. value: _vm.handleClickoutside,
  232. expression: "handleClickoutside"
  233. }
  234. ],
  235. ref: "reference",
  236. staticClass: "el-cascader",
  237. class: [
  238. {
  239. "is-opened": _vm.menuVisible,
  240. "is-disabled": _vm.cascaderDisabled
  241. },
  242. _vm.cascaderSize ? "el-cascader--" + _vm.cascaderSize : ""
  243. ],
  244. on: {
  245. click: _vm.handleClick,
  246. mouseenter: function($event) {
  247. _vm.inputHover = true
  248. },
  249. focus: function($event) {
  250. _vm.inputHover = true
  251. },
  252. mouseleave: function($event) {
  253. _vm.inputHover = false
  254. },
  255. blur: function($event) {
  256. _vm.inputHover = false
  257. },
  258. keydown: _vm.handleKeydown
  259. }
  260. },
  261. [
  262. _c(
  263. "el-input",
  264. {
  265. ref: "input",
  266. class: { "is-focus": _vm.menuVisible },
  267. attrs: {
  268. readonly: _vm.readonly,
  269. placeholder: _vm.currentLabels.length ? undefined : _vm.placeholder,
  270. "validate-event": false,
  271. size: _vm.size,
  272. disabled: _vm.cascaderDisabled
  273. },
  274. on: {
  275. input: _vm.debouncedInputChange,
  276. focus: _vm.handleFocus,
  277. blur: _vm.handleBlur
  278. },
  279. nativeOn: {
  280. compositionstart: function($event) {
  281. return _vm.handleComposition($event)
  282. },
  283. compositionend: function($event) {
  284. return _vm.handleComposition($event)
  285. }
  286. },
  287. model: {
  288. value: _vm.inputValue,
  289. callback: function($$v) {
  290. _vm.inputValue = $$v
  291. },
  292. expression: "inputValue"
  293. }
  294. },
  295. [
  296. _c("template", { slot: "suffix" }, [
  297. _vm.clearable && _vm.inputHover && _vm.currentLabels.length
  298. ? _c("i", {
  299. key: "1",
  300. staticClass:
  301. "el-input__icon el-icon-circle-close el-cascader__clearIcon",
  302. on: { click: _vm.clearValue }
  303. })
  304. : _c("i", {
  305. key: "2",
  306. staticClass: "el-input__icon el-icon-arrow-down",
  307. class: { "is-reverse": _vm.menuVisible }
  308. })
  309. ])
  310. ],
  311. 2
  312. ),
  313. _c(
  314. "span",
  315. {
  316. directives: [
  317. {
  318. name: "show",
  319. rawName: "v-show",
  320. value: _vm.inputValue === "" && !_vm.isOnComposition,
  321. expression: "inputValue === '' && !isOnComposition"
  322. }
  323. ],
  324. staticClass: "el-cascader__label"
  325. },
  326. [
  327. _vm.showAllLevels
  328. ? [
  329. _vm._l(_vm.currentLabels, function(label, index) {
  330. return [
  331. _vm._v("\n " + _vm._s(label) + "\n "),
  332. index < _vm.currentLabels.length - 1
  333. ? _c("span", { key: index }, [
  334. _vm._v(" " + _vm._s(_vm.separator) + " ")
  335. ])
  336. : _vm._e()
  337. ]
  338. })
  339. ]
  340. : [
  341. _vm._v(
  342. "\n " +
  343. _vm._s(_vm.currentLabels[_vm.currentLabels.length - 1]) +
  344. "\n "
  345. )
  346. ]
  347. ],
  348. 2
  349. )
  350. ],
  351. 1
  352. )
  353. }
  354. var staticRenderFns = []
  355. mainvue_type_template_id_2e869fa1_render._withStripped = true
  356. // CONCATENATED MODULE: ./packages/cascader/src/main.vue?vue&type=template&id=2e869fa1&
  357. // EXTERNAL MODULE: external "vue"
  358. var external_vue_ = __webpack_require__(6);
  359. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  360. // EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"
  361. var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(32);
  362. var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);
  363. // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
  364. var shared_ = __webpack_require__(35);
  365. // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
  366. var scroll_into_view_ = __webpack_require__(27);
  367. var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
  368. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  369. var util_ = __webpack_require__(4);
  370. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/menu.vue?vue&type=script&lang=js&
  371. var copyArray = function copyArray(arr, props) {
  372. if (!arr || !Array.isArray(arr) || !props) return arr;
  373. var result = [];
  374. var configurableProps = ['__IS__FLAT__OPTIONS', 'label', 'value', 'disabled'];
  375. var childrenProp = props.children || 'children';
  376. arr.forEach(function (item) {
  377. var itemCopy = {};
  378. configurableProps.forEach(function (prop) {
  379. var name = props[prop];
  380. var value = item[name];
  381. if (value === undefined) {
  382. name = prop;
  383. value = item[name];
  384. }
  385. if (value !== undefined) itemCopy[name] = value;
  386. });
  387. if (Array.isArray(item[childrenProp])) {
  388. itemCopy[childrenProp] = copyArray(item[childrenProp], props);
  389. }
  390. result.push(itemCopy);
  391. });
  392. return result;
  393. };
  394. /* harmony default export */ var menuvue_type_script_lang_js_ = ({
  395. name: 'ElCascaderMenu',
  396. data: function data() {
  397. return {
  398. inputWidth: 0,
  399. options: [],
  400. props: {},
  401. visible: false,
  402. activeValue: [],
  403. value: [],
  404. expandTrigger: 'click',
  405. changeOnSelect: false,
  406. popperClass: '',
  407. hoverTimer: 0,
  408. clicking: false,
  409. id: Object(util_["generateId"])()
  410. };
  411. },
  412. watch: {
  413. visible: function visible(value) {
  414. if (value) {
  415. this.activeValue = this.value;
  416. }
  417. },
  418. value: {
  419. immediate: true,
  420. handler: function handler(value) {
  421. this.activeValue = value;
  422. }
  423. }
  424. },
  425. computed: {
  426. activeOptions: {
  427. get: function get() {
  428. var _this = this;
  429. var activeValue = this.activeValue;
  430. var configurableProps = ['label', 'value', 'children', 'disabled'];
  431. var formatOptions = function formatOptions(options) {
  432. options.forEach(function (option) {
  433. if (option.__IS__FLAT__OPTIONS) return;
  434. configurableProps.forEach(function (prop) {
  435. var value = option[_this.props[prop] || prop];
  436. if (value !== undefined) option[prop] = value;
  437. });
  438. if (Array.isArray(option.children)) {
  439. formatOptions(option.children);
  440. }
  441. });
  442. };
  443. var loadActiveOptions = function loadActiveOptions(options) {
  444. var activeOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  445. var level = activeOptions.length;
  446. activeOptions[level] = options;
  447. var active = activeValue[level];
  448. if (Object(shared_["isDef"])(active)) {
  449. options = options.filter(function (option) {
  450. return option.value === active;
  451. })[0];
  452. if (options && options.children) {
  453. loadActiveOptions(options.children, activeOptions);
  454. }
  455. }
  456. return activeOptions;
  457. };
  458. var optionsCopy = copyArray(this.options, this.props);
  459. formatOptions(optionsCopy);
  460. return loadActiveOptions(optionsCopy);
  461. }
  462. }
  463. },
  464. methods: {
  465. select: function select(item, menuIndex) {
  466. if (item.__IS__FLAT__OPTIONS) {
  467. this.activeValue = item.value;
  468. } else if (menuIndex) {
  469. this.activeValue.splice(menuIndex, this.activeValue.length - 1, item.value);
  470. } else {
  471. this.activeValue = [item.value];
  472. }
  473. this.$emit('pick', this.activeValue.slice());
  474. },
  475. handleMenuLeave: function handleMenuLeave() {
  476. this.$emit('menuLeave');
  477. },
  478. activeItem: function activeItem(item, menuIndex) {
  479. var len = this.activeOptions.length;
  480. this.activeValue.splice(menuIndex, len, item.value);
  481. this.activeOptions.splice(menuIndex + 1, len, item.children);
  482. if (this.changeOnSelect) {
  483. this.$emit('pick', this.activeValue.slice(), false);
  484. } else {
  485. this.$emit('activeItemChange', this.activeValue);
  486. }
  487. },
  488. scrollMenu: function scrollMenu(menu) {
  489. scroll_into_view_default()(menu, menu.getElementsByClassName('is-active')[0]);
  490. },
  491. handleMenuEnter: function handleMenuEnter() {
  492. var _this2 = this;
  493. this.$nextTick(function () {
  494. return _this2.$refs.menus.forEach(function (menu) {
  495. return _this2.scrollMenu(menu);
  496. });
  497. });
  498. }
  499. },
  500. render: function render(h) {
  501. var _this3 = this;
  502. var activeValue = this.activeValue,
  503. activeOptions = this.activeOptions,
  504. visible = this.visible,
  505. expandTrigger = this.expandTrigger,
  506. popperClass = this.popperClass,
  507. hoverThreshold = this.hoverThreshold;
  508. var itemId = null;
  509. var itemIndex = 0;
  510. var hoverMenuRefs = {};
  511. var hoverMenuHandler = function hoverMenuHandler(e) {
  512. var activeMenu = hoverMenuRefs.activeMenu;
  513. if (!activeMenu) return;
  514. var offsetX = e.offsetX;
  515. var width = activeMenu.offsetWidth;
  516. var height = activeMenu.offsetHeight;
  517. if (e.target === hoverMenuRefs.activeItem) {
  518. clearTimeout(_this3.hoverTimer);
  519. var _hoverMenuRefs = hoverMenuRefs,
  520. activeItem = _hoverMenuRefs.activeItem;
  521. var offsetY_top = activeItem.offsetTop;
  522. var offsetY_Bottom = offsetY_top + activeItem.offsetHeight;
  523. hoverMenuRefs.hoverZone.innerHTML = '\n <path style="pointer-events: auto;" fill="transparent" d="M' + offsetX + ' ' + offsetY_top + ' L' + width + ' 0 V' + offsetY_top + ' Z" />\n <path style="pointer-events: auto;" fill="transparent" d="M' + offsetX + ' ' + offsetY_Bottom + ' L' + width + ' ' + height + ' V' + offsetY_Bottom + ' Z" />\n ';
  524. } else {
  525. if (!_this3.hoverTimer) {
  526. _this3.hoverTimer = setTimeout(function () {
  527. hoverMenuRefs.hoverZone.innerHTML = '';
  528. }, hoverThreshold);
  529. }
  530. }
  531. };
  532. var menus = this._l(activeOptions, function (menu, menuIndex) {
  533. var isFlat = false;
  534. var menuId = 'menu-' + _this3.id + '-' + menuIndex;
  535. var ownsId = 'menu-' + _this3.id + '-' + (menuIndex + 1);
  536. var items = _this3._l(menu, function (item) {
  537. var events = {
  538. on: {}
  539. };
  540. if (item.__IS__FLAT__OPTIONS) isFlat = true;
  541. if (!item.disabled) {
  542. // keydown up/down/left/right/enter
  543. events.on.keydown = function (ev) {
  544. var keyCode = ev.keyCode;
  545. if ([37, 38, 39, 40, 13, 9, 27].indexOf(keyCode) < 0) {
  546. return;
  547. }
  548. var currentEle = ev.target;
  549. var parentEle = _this3.$refs.menus[menuIndex];
  550. var menuItemList = parentEle.querySelectorAll("[tabindex='-1']");
  551. var currentIndex = Array.prototype.indexOf.call(menuItemList, currentEle); // 当前索引
  552. var nextIndex = void 0,
  553. nextMenu = void 0;
  554. if ([38, 40].indexOf(keyCode) > -1) {
  555. if (keyCode === 38) {
  556. // up键
  557. nextIndex = currentIndex !== 0 ? currentIndex - 1 : currentIndex;
  558. } else if (keyCode === 40) {
  559. // down
  560. nextIndex = currentIndex !== menuItemList.length - 1 ? currentIndex + 1 : currentIndex;
  561. }
  562. menuItemList[nextIndex].focus();
  563. } else if (keyCode === 37) {
  564. // left键
  565. if (menuIndex !== 0) {
  566. var previousMenu = _this3.$refs.menus[menuIndex - 1];
  567. previousMenu.querySelector('[aria-expanded=true]').focus();
  568. }
  569. } else if (keyCode === 39) {
  570. // right
  571. if (item.children) {
  572. // 有子menu 选择子menu的第一个menuitem
  573. nextMenu = _this3.$refs.menus[menuIndex + 1];
  574. nextMenu.querySelectorAll("[tabindex='-1']")[0].focus();
  575. }
  576. } else if (keyCode === 13) {
  577. if (!item.children) {
  578. var id = currentEle.getAttribute('id');
  579. parentEle.setAttribute('aria-activedescendant', id);
  580. _this3.select(item, menuIndex);
  581. _this3.$nextTick(function () {
  582. return _this3.scrollMenu(_this3.$refs.menus[menuIndex]);
  583. });
  584. }
  585. } else if (keyCode === 9 || keyCode === 27) {
  586. // esc tab
  587. _this3.$emit('closeInside');
  588. }
  589. };
  590. if (item.children) {
  591. var triggerEvent = {
  592. click: 'click',
  593. hover: 'mouseenter'
  594. }[expandTrigger];
  595. var triggerHandler = function triggerHandler() {
  596. if (_this3.visible) {
  597. _this3.activeItem(item, menuIndex);
  598. _this3.$nextTick(function () {
  599. // adjust self and next level
  600. _this3.scrollMenu(_this3.$refs.menus[menuIndex]);
  601. _this3.scrollMenu(_this3.$refs.menus[menuIndex + 1]);
  602. });
  603. }
  604. };
  605. events.on[triggerEvent] = triggerHandler;
  606. if (triggerEvent === 'mouseenter' && _this3.changeOnSelect) {
  607. events.on.click = function () {
  608. if (_this3.activeValue.indexOf(item.value) !== -1) {
  609. _this3.$emit('closeInside', true);
  610. }
  611. };
  612. }
  613. events.on['mousedown'] = function () {
  614. _this3.clicking = true;
  615. };
  616. events.on['focus'] = function () {
  617. // focus 选中
  618. if (_this3.clicking) {
  619. _this3.clicking = false;
  620. return;
  621. }
  622. triggerHandler();
  623. };
  624. } else {
  625. events.on.click = function () {
  626. _this3.select(item, menuIndex);
  627. _this3.$nextTick(function () {
  628. return _this3.scrollMenu(_this3.$refs.menus[menuIndex]);
  629. });
  630. };
  631. }
  632. }
  633. if (!item.disabled && !item.children) {
  634. // no children set id
  635. itemId = menuId + '-' + itemIndex;
  636. itemIndex++;
  637. }
  638. return h(
  639. 'li',
  640. external_babel_helper_vue_jsx_merge_props_default()([{
  641. 'class': {
  642. 'el-cascader-menu__item': true,
  643. 'el-cascader-menu__item--extensible': item.children,
  644. 'is-active': item.value === activeValue[menuIndex],
  645. 'is-disabled': item.disabled
  646. },
  647. ref: item.value === activeValue[menuIndex] ? 'activeItem' : null
  648. }, events, {
  649. attrs: {
  650. tabindex: item.disabled ? null : -1,
  651. role: 'menuitem',
  652. 'aria-haspopup': !!item.children,
  653. 'aria-expanded': item.value === activeValue[menuIndex],
  654. id: itemId,
  655. 'aria-owns': !item.children ? null : ownsId
  656. }
  657. }]),
  658. [h('span', [item.label])]
  659. );
  660. });
  661. var menuStyle = {};
  662. if (isFlat) {
  663. menuStyle.minWidth = _this3.inputWidth + 'px';
  664. }
  665. var isHoveredMenu = expandTrigger === 'hover' && activeValue.length - 1 === menuIndex;
  666. var hoverMenuEvent = {
  667. on: {}
  668. };
  669. if (isHoveredMenu) {
  670. hoverMenuEvent.on.mousemove = hoverMenuHandler;
  671. menuStyle.position = 'relative';
  672. }
  673. return h(
  674. 'ul',
  675. external_babel_helper_vue_jsx_merge_props_default()([{
  676. 'class': {
  677. 'el-cascader-menu': true,
  678. 'el-cascader-menu--flexible': isFlat
  679. }
  680. }, hoverMenuEvent, {
  681. style: menuStyle,
  682. refInFor: true,
  683. ref: 'menus',
  684. attrs: { role: 'menu',
  685. id: menuId
  686. }
  687. }]),
  688. [items, isHoveredMenu ? h('svg', {
  689. ref: 'hoverZone',
  690. style: {
  691. position: 'absolute',
  692. top: 0,
  693. height: '100%',
  694. width: '100%',
  695. left: 0,
  696. pointerEvents: 'none'
  697. }
  698. }) : null]
  699. );
  700. });
  701. if (expandTrigger === 'hover') {
  702. this.$nextTick(function () {
  703. var activeItem = _this3.$refs.activeItem;
  704. if (activeItem) {
  705. var activeMenu = activeItem.parentElement;
  706. var hoverZone = _this3.$refs.hoverZone;
  707. hoverMenuRefs = {
  708. activeMenu: activeMenu,
  709. activeItem: activeItem,
  710. hoverZone: hoverZone
  711. };
  712. } else {
  713. hoverMenuRefs = {};
  714. }
  715. });
  716. }
  717. return h(
  718. 'transition',
  719. {
  720. attrs: { name: 'el-zoom-in-top' },
  721. on: {
  722. 'before-enter': this.handleMenuEnter,
  723. 'after-leave': this.handleMenuLeave
  724. }
  725. },
  726. [h(
  727. 'div',
  728. {
  729. directives: [{
  730. name: 'show',
  731. value: visible
  732. }],
  733. 'class': ['el-cascader-menus el-popper', popperClass],
  734. ref: 'wrapper'
  735. },
  736. [h('div', {
  737. attrs: { 'x-arrow': true },
  738. 'class': 'popper__arrow' }), menus]
  739. )]
  740. );
  741. }
  742. });
  743. // CONCATENATED MODULE: ./packages/cascader/src/menu.vue?vue&type=script&lang=js&
  744. /* harmony default export */ var src_menuvue_type_script_lang_js_ = (menuvue_type_script_lang_js_);
  745. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  746. var componentNormalizer = __webpack_require__(0);
  747. // CONCATENATED MODULE: ./packages/cascader/src/menu.vue
  748. var menu_render, menu_staticRenderFns
  749. /* normalize component */
  750. var component = Object(componentNormalizer["a" /* default */])(
  751. src_menuvue_type_script_lang_js_,
  752. menu_render,
  753. menu_staticRenderFns,
  754. false,
  755. null,
  756. null,
  757. null
  758. )
  759. /* hot reload */
  760. if (false) { var api; }
  761. component.options.__file = "packages/cascader/src/menu.vue"
  762. /* harmony default export */ var src_menu = (component.exports);
  763. // EXTERNAL MODULE: external "element-ui/lib/input"
  764. var input_ = __webpack_require__(9);
  765. var input_default = /*#__PURE__*/__webpack_require__.n(input_);
  766. // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
  767. var vue_popper_ = __webpack_require__(5);
  768. var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
  769. // EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
  770. var clickoutside_ = __webpack_require__(11);
  771. var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
  772. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  773. var emitter_ = __webpack_require__(3);
  774. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  775. // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
  776. var locale_ = __webpack_require__(7);
  777. var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
  778. // EXTERNAL MODULE: external "element-ui/lib/locale"
  779. var lib_locale_ = __webpack_require__(18);
  780. // EXTERNAL MODULE: external "throttle-debounce/debounce"
  781. var debounce_ = __webpack_require__(13);
  782. var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
  783. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/main.vue?vue&type=script&lang=js&
  784. //
  785. //
  786. //
  787. //
  788. //
  789. //
  790. //
  791. //
  792. //
  793. //
  794. //
  795. //
  796. //
  797. //
  798. //
  799. //
  800. //
  801. //
  802. //
  803. //
  804. //
  805. //
  806. //
  807. //
  808. //
  809. //
  810. //
  811. //
  812. //
  813. //
  814. //
  815. //
  816. //
  817. //
  818. //
  819. //
  820. //
  821. //
  822. //
  823. //
  824. //
  825. //
  826. //
  827. //
  828. //
  829. //
  830. //
  831. //
  832. //
  833. //
  834. //
  835. //
  836. //
  837. //
  838. //
  839. //
  840. //
  841. //
  842. //
  843. //
  844. //
  845. //
  846. //
  847. var popperMixin = {
  848. props: {
  849. placement: {
  850. type: String,
  851. default: 'bottom-start'
  852. },
  853. appendToBody: vue_popper_default.a.props.appendToBody,
  854. arrowOffset: vue_popper_default.a.props.arrowOffset,
  855. offset: vue_popper_default.a.props.offset,
  856. boundariesPadding: vue_popper_default.a.props.boundariesPadding,
  857. popperOptions: vue_popper_default.a.props.popperOptions
  858. },
  859. methods: vue_popper_default.a.methods,
  860. data: vue_popper_default.a.data,
  861. beforeDestroy: vue_popper_default.a.beforeDestroy
  862. };
  863. /* harmony default export */ var mainvue_type_script_lang_js_ = ({
  864. name: 'ElCascader',
  865. directives: { Clickoutside: clickoutside_default.a },
  866. mixins: [popperMixin, emitter_default.a, locale_default.a],
  867. inject: {
  868. elForm: {
  869. default: ''
  870. },
  871. elFormItem: {
  872. default: ''
  873. }
  874. },
  875. components: {
  876. ElInput: input_default.a
  877. },
  878. props: {
  879. options: {
  880. type: Array,
  881. required: true
  882. },
  883. props: {
  884. type: Object,
  885. default: function _default() {
  886. return {
  887. children: 'children',
  888. label: 'label',
  889. value: 'value',
  890. disabled: 'disabled'
  891. };
  892. }
  893. },
  894. value: {
  895. type: Array,
  896. default: function _default() {
  897. return [];
  898. }
  899. },
  900. separator: {
  901. type: String,
  902. default: '/'
  903. },
  904. placeholder: {
  905. type: String,
  906. default: function _default() {
  907. return Object(lib_locale_["t"])('el.cascader.placeholder');
  908. }
  909. },
  910. disabled: Boolean,
  911. clearable: {
  912. type: Boolean,
  913. default: false
  914. },
  915. changeOnSelect: Boolean,
  916. popperClass: String,
  917. expandTrigger: {
  918. type: String,
  919. default: 'click'
  920. },
  921. filterable: Boolean,
  922. size: String,
  923. showAllLevels: {
  924. type: Boolean,
  925. default: true
  926. },
  927. debounce: {
  928. type: Number,
  929. default: 300
  930. },
  931. beforeFilter: {
  932. type: Function,
  933. default: function _default() {
  934. return function () {};
  935. }
  936. },
  937. hoverThreshold: {
  938. type: Number,
  939. default: 500
  940. }
  941. },
  942. data: function data() {
  943. return {
  944. currentValue: this.value || [],
  945. menu: null,
  946. debouncedInputChange: function debouncedInputChange() {},
  947. menuVisible: false,
  948. inputHover: false,
  949. inputValue: '',
  950. flatOptions: null,
  951. id: Object(util_["generateId"])(),
  952. needFocus: true,
  953. isOnComposition: false
  954. };
  955. },
  956. computed: {
  957. labelKey: function labelKey() {
  958. return this.props.label || 'label';
  959. },
  960. valueKey: function valueKey() {
  961. return this.props.value || 'value';
  962. },
  963. childrenKey: function childrenKey() {
  964. return this.props.children || 'children';
  965. },
  966. disabledKey: function disabledKey() {
  967. return this.props.disabled || 'disabled';
  968. },
  969. currentLabels: function currentLabels() {
  970. var _this = this;
  971. var options = this.options;
  972. var labels = [];
  973. this.currentValue.forEach(function (value) {
  974. var targetOption = options && options.filter(function (option) {
  975. return option[_this.valueKey] === value;
  976. })[0];
  977. if (targetOption) {
  978. labels.push(targetOption[_this.labelKey]);
  979. options = targetOption[_this.childrenKey];
  980. }
  981. });
  982. return labels;
  983. },
  984. _elFormItemSize: function _elFormItemSize() {
  985. return (this.elFormItem || {}).elFormItemSize;
  986. },
  987. cascaderSize: function cascaderSize() {
  988. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  989. },
  990. cascaderDisabled: function cascaderDisabled() {
  991. return this.disabled || (this.elForm || {}).disabled;
  992. },
  993. readonly: function readonly() {
  994. return !this.filterable || !Object(util_["isIE"])() && !Object(util_["isEdge"])() && !this.menuVisible;
  995. }
  996. },
  997. watch: {
  998. menuVisible: function menuVisible(value) {
  999. this.$refs.input.$refs.input.setAttribute('aria-expanded', value);
  1000. value ? this.showMenu() : this.hideMenu();
  1001. this.$emit('visible-change', value);
  1002. },
  1003. value: function value(_value) {
  1004. this.currentValue = _value;
  1005. },
  1006. currentValue: function currentValue(value) {
  1007. this.dispatch('ElFormItem', 'el.form.change', [value]);
  1008. },
  1009. options: {
  1010. deep: true,
  1011. handler: function handler(value) {
  1012. if (!this.menu) {
  1013. this.initMenu();
  1014. }
  1015. this.flatOptions = this.flattenOptions(this.options);
  1016. this.menu.options = value;
  1017. }
  1018. }
  1019. },
  1020. methods: {
  1021. initMenu: function initMenu() {
  1022. this.menu = new external_vue_default.a(src_menu).$mount();
  1023. this.menu.options = this.options;
  1024. this.menu.props = this.props;
  1025. this.menu.expandTrigger = this.expandTrigger;
  1026. this.menu.changeOnSelect = this.changeOnSelect;
  1027. this.menu.popperClass = this.popperClass;
  1028. this.menu.hoverThreshold = this.hoverThreshold;
  1029. this.popperElm = this.menu.$el;
  1030. this.menu.$refs.menus[0].setAttribute('id', 'cascader-menu-' + this.id);
  1031. this.menu.$on('pick', this.handlePick);
  1032. this.menu.$on('activeItemChange', this.handleActiveItemChange);
  1033. this.menu.$on('menuLeave', this.doDestroy);
  1034. this.menu.$on('closeInside', this.handleClickoutside);
  1035. },
  1036. showMenu: function showMenu() {
  1037. var _this2 = this;
  1038. if (!this.menu) {
  1039. this.initMenu();
  1040. }
  1041. this.menu.value = this.currentValue.slice(0);
  1042. this.menu.visible = true;
  1043. this.menu.options = this.options;
  1044. this.$nextTick(function (_) {
  1045. _this2.updatePopper();
  1046. _this2.menu.inputWidth = _this2.$refs.input.$el.offsetWidth - 2;
  1047. });
  1048. },
  1049. hideMenu: function hideMenu() {
  1050. this.inputValue = '';
  1051. this.menu.visible = false;
  1052. if (this.needFocus) {
  1053. this.$refs.input.focus();
  1054. } else {
  1055. this.needFocus = true;
  1056. }
  1057. },
  1058. handleActiveItemChange: function handleActiveItemChange(value) {
  1059. var _this3 = this;
  1060. this.$nextTick(function (_) {
  1061. _this3.updatePopper();
  1062. });
  1063. this.$emit('active-item-change', value);
  1064. },
  1065. handleKeydown: function handleKeydown(e) {
  1066. var _this4 = this;
  1067. var keyCode = e.keyCode;
  1068. if (keyCode === 13) {
  1069. this.handleClick();
  1070. } else if (keyCode === 40) {
  1071. // down
  1072. this.menuVisible = true; // 打开
  1073. setTimeout(function () {
  1074. var firstMenu = _this4.popperElm.querySelectorAll('.el-cascader-menu')[0];
  1075. firstMenu.querySelectorAll("[tabindex='-1']")[0].focus();
  1076. });
  1077. e.stopPropagation();
  1078. e.preventDefault();
  1079. } else if (keyCode === 27 || keyCode === 9) {
  1080. // esc tab
  1081. this.inputValue = '';
  1082. if (this.menu) this.menu.visible = false;
  1083. }
  1084. },
  1085. handlePick: function handlePick(value) {
  1086. var close = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  1087. this.currentValue = value;
  1088. this.$emit('input', value);
  1089. this.$emit('change', value);
  1090. if (close) {
  1091. this.menuVisible = false;
  1092. } else {
  1093. this.$nextTick(this.updatePopper);
  1094. }
  1095. },
  1096. handleInputChange: function handleInputChange(value) {
  1097. var _this5 = this;
  1098. if (!this.menuVisible) return;
  1099. var flatOptions = this.flatOptions;
  1100. if (!value) {
  1101. this.menu.options = this.options;
  1102. this.$nextTick(this.updatePopper);
  1103. return;
  1104. }
  1105. var filteredFlatOptions = flatOptions.filter(function (optionsStack) {
  1106. return optionsStack.some(function (option) {
  1107. return new RegExp(Object(util_["escapeRegexpString"])(value), 'i').test(option[_this5.labelKey]);
  1108. });
  1109. });
  1110. if (filteredFlatOptions.length > 0) {
  1111. filteredFlatOptions = filteredFlatOptions.map(function (optionStack) {
  1112. return {
  1113. __IS__FLAT__OPTIONS: true,
  1114. value: optionStack.map(function (item) {
  1115. return item[_this5.valueKey];
  1116. }),
  1117. label: _this5.renderFilteredOptionLabel(value, optionStack),
  1118. disabled: optionStack.some(function (item) {
  1119. return item[_this5.disabledKey];
  1120. })
  1121. };
  1122. });
  1123. } else {
  1124. filteredFlatOptions = [{
  1125. __IS__FLAT__OPTIONS: true,
  1126. label: this.t('el.cascader.noMatch'),
  1127. value: '',
  1128. disabled: true
  1129. }];
  1130. }
  1131. this.menu.options = filteredFlatOptions;
  1132. this.$nextTick(this.updatePopper);
  1133. },
  1134. renderFilteredOptionLabel: function renderFilteredOptionLabel(inputValue, optionsStack) {
  1135. var _this6 = this;
  1136. return optionsStack.map(function (option, index) {
  1137. var label = option[_this6.labelKey];
  1138. var keywordIndex = label.toLowerCase().indexOf(inputValue.toLowerCase());
  1139. var labelPart = label.slice(keywordIndex, inputValue.length + keywordIndex);
  1140. var node = keywordIndex > -1 ? _this6.highlightKeyword(label, labelPart) : label;
  1141. return index === 0 ? node : [' ' + _this6.separator + ' ', node];
  1142. });
  1143. },
  1144. highlightKeyword: function highlightKeyword(label, keyword) {
  1145. var _this7 = this;
  1146. var h = this._c;
  1147. return label.split(keyword).map(function (node, index) {
  1148. return index === 0 ? node : [h('span', { class: { 'el-cascader-menu__item__keyword': true } }, [_this7._v(keyword)]), node];
  1149. });
  1150. },
  1151. flattenOptions: function flattenOptions(options) {
  1152. var _this8 = this;
  1153. var ancestor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1154. var flatOptions = [];
  1155. options.forEach(function (option) {
  1156. var optionsStack = ancestor.concat(option);
  1157. if (!option[_this8.childrenKey]) {
  1158. flatOptions.push(optionsStack);
  1159. } else {
  1160. if (_this8.changeOnSelect) {
  1161. flatOptions.push(optionsStack);
  1162. }
  1163. flatOptions = flatOptions.concat(_this8.flattenOptions(option[_this8.childrenKey], optionsStack));
  1164. }
  1165. });
  1166. return flatOptions;
  1167. },
  1168. clearValue: function clearValue(ev) {
  1169. ev.stopPropagation();
  1170. this.handlePick([], true);
  1171. },
  1172. handleClickoutside: function handleClickoutside() {
  1173. var pickFinished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  1174. if (this.menuVisible && !pickFinished) {
  1175. this.needFocus = false;
  1176. }
  1177. this.menuVisible = false;
  1178. },
  1179. handleClick: function handleClick() {
  1180. if (this.cascaderDisabled) return;
  1181. this.$refs.input.focus();
  1182. if (this.filterable) {
  1183. this.menuVisible = true;
  1184. return;
  1185. }
  1186. this.menuVisible = !this.menuVisible;
  1187. },
  1188. handleFocus: function handleFocus(event) {
  1189. this.$emit('focus', event);
  1190. },
  1191. handleBlur: function handleBlur(event) {
  1192. this.$emit('blur', event);
  1193. },
  1194. handleComposition: function handleComposition(event) {
  1195. this.isOnComposition = event.type !== 'compositionend';
  1196. }
  1197. },
  1198. created: function created() {
  1199. var _this9 = this;
  1200. this.debouncedInputChange = debounce_default()(this.debounce, function (value) {
  1201. var before = _this9.beforeFilter(value);
  1202. if (before && before.then) {
  1203. _this9.menu.options = [{
  1204. __IS__FLAT__OPTIONS: true,
  1205. label: _this9.t('el.cascader.loading'),
  1206. value: '',
  1207. disabled: true
  1208. }];
  1209. before.then(function () {
  1210. _this9.$nextTick(function () {
  1211. _this9.handleInputChange(value);
  1212. });
  1213. });
  1214. } else if (before !== false) {
  1215. _this9.$nextTick(function () {
  1216. _this9.handleInputChange(value);
  1217. });
  1218. }
  1219. });
  1220. },
  1221. mounted: function mounted() {
  1222. this.flatOptions = this.flattenOptions(this.options);
  1223. }
  1224. });
  1225. // CONCATENATED MODULE: ./packages/cascader/src/main.vue?vue&type=script&lang=js&
  1226. /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
  1227. // CONCATENATED MODULE: ./packages/cascader/src/main.vue
  1228. /* normalize component */
  1229. var main_component = Object(componentNormalizer["a" /* default */])(
  1230. src_mainvue_type_script_lang_js_,
  1231. mainvue_type_template_id_2e869fa1_render,
  1232. staticRenderFns,
  1233. false,
  1234. null,
  1235. null,
  1236. null
  1237. )
  1238. /* hot reload */
  1239. if (false) { var main_api; }
  1240. main_component.options.__file = "packages/cascader/src/main.vue"
  1241. /* harmony default export */ var main = (main_component.exports);
  1242. // CONCATENATED MODULE: ./packages/cascader/index.js
  1243. /* istanbul ignore next */
  1244. main.install = function (Vue) {
  1245. Vue.component(main.name, main);
  1246. };
  1247. /* harmony default export */ var cascader = __webpack_exports__["default"] = (main);
  1248. /***/ }),
  1249. /***/ 6:
  1250. /***/ (function(module, exports) {
  1251. module.exports = require("vue");
  1252. /***/ }),
  1253. /***/ 7:
  1254. /***/ (function(module, exports) {
  1255. module.exports = require("element-ui/lib/mixins/locale");
  1256. /***/ }),
  1257. /***/ 9:
  1258. /***/ (function(module, exports) {
  1259. module.exports = require("element-ui/lib/input");
  1260. /***/ })
  1261. /******/ });