cascader.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/ // Check if module is in cache
  8. /******/ if(installedModules[moduleId])
  9. /******/ return installedModules[moduleId].exports;
  10. /******/ // Create a new module (and put it into the cache)
  11. /******/ var module = installedModules[moduleId] = {
  12. /******/ exports: {},
  13. /******/ id: moduleId,
  14. /******/ loaded: false
  15. /******/ };
  16. /******/ // Execute the module function
  17. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  18. /******/ // Flag the module as loaded
  19. /******/ module.loaded = true;
  20. /******/ // Return the exports of the module
  21. /******/ return module.exports;
  22. /******/ }
  23. /******/ // expose the modules object (__webpack_modules__)
  24. /******/ __webpack_require__.m = modules;
  25. /******/ // expose the module cache
  26. /******/ __webpack_require__.c = installedModules;
  27. /******/ // __webpack_public_path__
  28. /******/ __webpack_require__.p = "/dist/";
  29. /******/ // Load entry module and return exports
  30. /******/ return __webpack_require__(0);
  31. /******/ })
  32. /************************************************************************/
  33. /******/ ([
  34. /* 0 */
  35. /***/ function(module, exports, __webpack_require__) {
  36. module.exports = __webpack_require__(53);
  37. /***/ },
  38. /* 1 */,
  39. /* 2 */,
  40. /* 3 */
  41. /***/ function(module, exports) {
  42. module.exports = function normalizeComponent (
  43. rawScriptExports,
  44. compiledTemplate,
  45. scopeId,
  46. cssModules
  47. ) {
  48. var esModule
  49. var scriptExports = rawScriptExports = rawScriptExports || {}
  50. // ES6 modules interop
  51. var type = typeof rawScriptExports.default
  52. if (type === 'object' || type === 'function') {
  53. esModule = rawScriptExports
  54. scriptExports = rawScriptExports.default
  55. }
  56. // Vue.extend constructor export interop
  57. var options = typeof scriptExports === 'function'
  58. ? scriptExports.options
  59. : scriptExports
  60. // render functions
  61. if (compiledTemplate) {
  62. options.render = compiledTemplate.render
  63. options.staticRenderFns = compiledTemplate.staticRenderFns
  64. }
  65. // scopedId
  66. if (scopeId) {
  67. options._scopeId = scopeId
  68. }
  69. // inject cssModules
  70. if (cssModules) {
  71. var computed = options.computed || (options.computed = {})
  72. Object.keys(cssModules).forEach(function (key) {
  73. var module = cssModules[key]
  74. computed[key] = function () { return module }
  75. })
  76. }
  77. return {
  78. esModule: esModule,
  79. exports: scriptExports,
  80. options: options
  81. }
  82. }
  83. /***/ },
  84. /* 4 */,
  85. /* 5 */,
  86. /* 6 */,
  87. /* 7 */,
  88. /* 8 */,
  89. /* 9 */
  90. /***/ function(module, exports) {
  91. module.exports = require("element-ui/lib/input");
  92. /***/ },
  93. /* 10 */
  94. /***/ function(module, exports) {
  95. module.exports = require("element-ui/lib/utils/clickoutside");
  96. /***/ },
  97. /* 11 */,
  98. /* 12 */,
  99. /* 13 */
  100. /***/ function(module, exports) {
  101. module.exports = require("element-ui/lib/utils/vue-popper");
  102. /***/ },
  103. /* 14 */
  104. /***/ function(module, exports) {
  105. module.exports = require("element-ui/lib/mixins/emitter");
  106. /***/ },
  107. /* 15 */,
  108. /* 16 */,
  109. /* 17 */,
  110. /* 18 */,
  111. /* 19 */,
  112. /* 20 */,
  113. /* 21 */,
  114. /* 22 */,
  115. /* 23 */,
  116. /* 24 */,
  117. /* 25 */,
  118. /* 26 */,
  119. /* 27 */,
  120. /* 28 */,
  121. /* 29 */,
  122. /* 30 */,
  123. /* 31 */,
  124. /* 32 */,
  125. /* 33 */,
  126. /* 34 */,
  127. /* 35 */,
  128. /* 36 */,
  129. /* 37 */,
  130. /* 38 */,
  131. /* 39 */,
  132. /* 40 */,
  133. /* 41 */,
  134. /* 42 */,
  135. /* 43 */,
  136. /* 44 */,
  137. /* 45 */,
  138. /* 46 */
  139. /***/ function(module, exports) {
  140. module.exports = require("throttle-debounce/debounce");
  141. /***/ },
  142. /* 47 */,
  143. /* 48 */,
  144. /* 49 */,
  145. /* 50 */,
  146. /* 51 */,
  147. /* 52 */,
  148. /* 53 */
  149. /***/ function(module, exports, __webpack_require__) {
  150. 'use strict';
  151. exports.__esModule = true;
  152. var _main = __webpack_require__(54);
  153. var _main2 = _interopRequireDefault(_main);
  154. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  155. /* istanbul ignore next */
  156. _main2.default.install = function (Vue) {
  157. Vue.component(_main2.default.name, _main2.default);
  158. };
  159. exports.default = _main2.default;
  160. /***/ },
  161. /* 54 */
  162. /***/ function(module, exports, __webpack_require__) {
  163. var Component = __webpack_require__(3)(
  164. /* script */
  165. __webpack_require__(55),
  166. /* template */
  167. __webpack_require__(62),
  168. /* scopeId */
  169. null,
  170. /* cssModules */
  171. null
  172. )
  173. module.exports = Component.exports
  174. /***/ },
  175. /* 55 */
  176. /***/ function(module, exports, __webpack_require__) {
  177. 'use strict';
  178. exports.__esModule = true;
  179. var _vue = __webpack_require__(56);
  180. var _vue2 = _interopRequireDefault(_vue);
  181. var _menu = __webpack_require__(57);
  182. var _menu2 = _interopRequireDefault(_menu);
  183. var _input = __webpack_require__(9);
  184. var _input2 = _interopRequireDefault(_input);
  185. var _vuePopper = __webpack_require__(13);
  186. var _vuePopper2 = _interopRequireDefault(_vuePopper);
  187. var _clickoutside = __webpack_require__(10);
  188. var _clickoutside2 = _interopRequireDefault(_clickoutside);
  189. var _emitter = __webpack_require__(14);
  190. var _emitter2 = _interopRequireDefault(_emitter);
  191. var _locale = __webpack_require__(60);
  192. var _locale2 = _interopRequireDefault(_locale);
  193. var _locale3 = __webpack_require__(61);
  194. var _debounce = __webpack_require__(46);
  195. var _debounce2 = _interopRequireDefault(_debounce);
  196. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  197. var popperMixin = {
  198. props: {
  199. placement: {
  200. type: String,
  201. default: 'bottom-start'
  202. },
  203. appendToBody: _vuePopper2.default.props.appendToBody,
  204. offset: _vuePopper2.default.props.offset,
  205. boundariesPadding: _vuePopper2.default.props.boundariesPadding,
  206. popperOptions: _vuePopper2.default.props.popperOptions
  207. },
  208. methods: _vuePopper2.default.methods,
  209. data: _vuePopper2.default.data,
  210. beforeDestroy: _vuePopper2.default.beforeDestroy
  211. }; //
  212. //
  213. //
  214. //
  215. //
  216. //
  217. //
  218. //
  219. //
  220. //
  221. //
  222. //
  223. //
  224. //
  225. //
  226. //
  227. //
  228. //
  229. //
  230. //
  231. //
  232. //
  233. //
  234. //
  235. //
  236. //
  237. //
  238. //
  239. //
  240. //
  241. //
  242. //
  243. //
  244. //
  245. //
  246. //
  247. //
  248. //
  249. //
  250. //
  251. //
  252. //
  253. //
  254. //
  255. //
  256. //
  257. //
  258. //
  259. //
  260. //
  261. //
  262. //
  263. //
  264. //
  265. //
  266. exports.default = {
  267. name: 'ElCascader',
  268. directives: { Clickoutside: _clickoutside2.default },
  269. mixins: [popperMixin, _emitter2.default, _locale2.default],
  270. components: {
  271. ElInput: _input2.default
  272. },
  273. props: {
  274. options: {
  275. type: Array,
  276. required: true
  277. },
  278. props: {
  279. type: Object,
  280. default: function _default() {
  281. return {
  282. children: 'children',
  283. label: 'label',
  284. value: 'value',
  285. disabled: 'disabled'
  286. };
  287. }
  288. },
  289. value: {
  290. type: Array,
  291. default: function _default() {
  292. return [];
  293. }
  294. },
  295. placeholder: {
  296. type: String,
  297. default: function _default() {
  298. return (0, _locale3.t)('el.cascader.placeholder');
  299. }
  300. },
  301. disabled: Boolean,
  302. clearable: {
  303. type: Boolean,
  304. default: false
  305. },
  306. changeOnSelect: Boolean,
  307. popperClass: String,
  308. expandTrigger: {
  309. type: String,
  310. default: 'click'
  311. },
  312. filterable: Boolean,
  313. size: String,
  314. showAllLevels: {
  315. type: Boolean,
  316. default: true
  317. },
  318. debounce: {
  319. type: Number,
  320. default: 300
  321. }
  322. },
  323. data: function data() {
  324. return {
  325. currentValue: this.value,
  326. menu: null,
  327. debouncedInputChange: function debouncedInputChange() {},
  328. menuVisible: false,
  329. inputHover: false,
  330. inputValue: '',
  331. flatOptions: null
  332. };
  333. },
  334. computed: {
  335. labelKey: function labelKey() {
  336. return this.props.label || 'label';
  337. },
  338. valueKey: function valueKey() {
  339. return this.props.value || 'value';
  340. },
  341. childrenKey: function childrenKey() {
  342. return this.props.children || 'children';
  343. },
  344. currentLabels: function currentLabels() {
  345. var _this = this;
  346. var options = this.options;
  347. var labels = [];
  348. this.currentValue.forEach(function (value) {
  349. var targetOption = options && options.filter(function (option) {
  350. return option[_this.valueKey] === value;
  351. })[0];
  352. if (targetOption) {
  353. labels.push(targetOption[_this.labelKey]);
  354. options = targetOption[_this.childrenKey];
  355. }
  356. });
  357. return labels;
  358. }
  359. },
  360. watch: {
  361. menuVisible: function menuVisible(value) {
  362. value ? this.showMenu() : this.hideMenu();
  363. },
  364. value: function value(_value) {
  365. this.currentValue = _value;
  366. },
  367. currentValue: function currentValue(value) {
  368. this.dispatch('ElFormItem', 'el.form.change', [value]);
  369. },
  370. options: {
  371. deep: true,
  372. handler: function handler(value) {
  373. if (!this.menu) {
  374. this.initMenu();
  375. }
  376. this.flatOptions = this.flattenOptions(this.options);
  377. this.menu.options = value;
  378. }
  379. }
  380. },
  381. methods: {
  382. initMenu: function initMenu() {
  383. this.menu = new _vue2.default(_menu2.default).$mount();
  384. this.menu.options = this.options;
  385. this.menu.props = this.props;
  386. this.menu.expandTrigger = this.expandTrigger;
  387. this.menu.changeOnSelect = this.changeOnSelect;
  388. this.menu.popperClass = this.popperClass;
  389. this.popperElm = this.menu.$el;
  390. this.menu.$on('pick', this.handlePick);
  391. this.menu.$on('activeItemChange', this.handleActiveItemChange);
  392. this.menu.$on('menuLeave', this.doDestroy);
  393. },
  394. showMenu: function showMenu() {
  395. var _this2 = this;
  396. if (!this.menu) {
  397. this.initMenu();
  398. }
  399. this.menu.value = this.currentValue.slice(0);
  400. this.menu.visible = true;
  401. this.menu.options = this.options;
  402. this.$nextTick(function (_) {
  403. _this2.updatePopper();
  404. _this2.menu.inputWidth = _this2.$refs.input.$el.offsetWidth - 2;
  405. });
  406. },
  407. hideMenu: function hideMenu() {
  408. this.inputValue = '';
  409. this.menu.visible = false;
  410. },
  411. handleActiveItemChange: function handleActiveItemChange(value) {
  412. var _this3 = this;
  413. this.$nextTick(function (_) {
  414. _this3.updatePopper();
  415. });
  416. this.$emit('active-item-change', value);
  417. },
  418. handlePick: function handlePick(value) {
  419. var close = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  420. this.currentValue = value;
  421. this.$emit('input', value);
  422. this.$emit('change', value);
  423. if (close) {
  424. this.menuVisible = false;
  425. }
  426. },
  427. handleInputChange: function handleInputChange(value) {
  428. var _this4 = this;
  429. if (!this.menuVisible) return;
  430. var flatOptions = this.flatOptions;
  431. if (!value) {
  432. this.menu.options = this.options;
  433. return;
  434. }
  435. var filteredFlatOptions = flatOptions.filter(function (optionsStack) {
  436. return optionsStack.some(function (option) {
  437. return new RegExp(value, 'i').test(option[_this4.labelKey]);
  438. });
  439. });
  440. if (filteredFlatOptions.length > 0) {
  441. filteredFlatOptions = filteredFlatOptions.map(function (optionStack) {
  442. return {
  443. __IS__FLAT__OPTIONS: true,
  444. value: optionStack.map(function (item) {
  445. return item[_this4.valueKey];
  446. }),
  447. label: _this4.renderFilteredOptionLabel(value, optionStack)
  448. };
  449. });
  450. } else {
  451. filteredFlatOptions = [{
  452. __IS__FLAT__OPTIONS: true,
  453. label: this.t('el.cascader.noMatch'),
  454. value: '',
  455. disabled: true
  456. }];
  457. }
  458. this.menu.options = filteredFlatOptions;
  459. },
  460. renderFilteredOptionLabel: function renderFilteredOptionLabel(inputValue, optionsStack) {
  461. var _this5 = this;
  462. return optionsStack.map(function (option, index) {
  463. var label = option[_this5.labelKey];
  464. var keywordIndex = label.toLowerCase().indexOf(inputValue.toLowerCase());
  465. var labelPart = label.slice(keywordIndex, inputValue.length + keywordIndex);
  466. var node = keywordIndex > -1 ? _this5.highlightKeyword(label, labelPart) : label;
  467. return index === 0 ? node : [' / ', node];
  468. });
  469. },
  470. highlightKeyword: function highlightKeyword(label, keyword) {
  471. var _this6 = this;
  472. var h = this._c;
  473. return label.split(keyword).map(function (node, index) {
  474. return index === 0 ? node : [h('span', { class: { 'el-cascader-menu__item__keyword': true } }, [_this6._v(keyword)]), node];
  475. });
  476. },
  477. flattenOptions: function flattenOptions(options) {
  478. var _this7 = this;
  479. var ancestor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  480. var flatOptions = [];
  481. options.forEach(function (option) {
  482. var optionsStack = ancestor.concat(option);
  483. if (!option[_this7.childrenKey]) {
  484. flatOptions.push(optionsStack);
  485. } else {
  486. if (_this7.changeOnSelect) {
  487. flatOptions.push(optionsStack);
  488. }
  489. flatOptions = flatOptions.concat(_this7.flattenOptions(option[_this7.childrenKey], optionsStack));
  490. }
  491. });
  492. return flatOptions;
  493. },
  494. clearValue: function clearValue(ev) {
  495. ev.stopPropagation();
  496. this.handlePick([], true);
  497. },
  498. handleClickoutside: function handleClickoutside() {
  499. this.menuVisible = false;
  500. },
  501. handleClick: function handleClick() {
  502. if (this.disabled) return;
  503. if (this.filterable) {
  504. this.menuVisible = true;
  505. this.$refs.input.$refs.input.focus();
  506. return;
  507. }
  508. this.menuVisible = !this.menuVisible;
  509. }
  510. },
  511. created: function created() {
  512. var _this8 = this;
  513. this.debouncedInputChange = (0, _debounce2.default)(this.debounce, function (value) {
  514. _this8.handleInputChange(value);
  515. });
  516. },
  517. mounted: function mounted() {
  518. this.flatOptions = this.flattenOptions(this.options);
  519. }
  520. };
  521. /***/ },
  522. /* 56 */
  523. /***/ function(module, exports) {
  524. module.exports = require("vue");
  525. /***/ },
  526. /* 57 */
  527. /***/ function(module, exports, __webpack_require__) {
  528. var Component = __webpack_require__(3)(
  529. /* script */
  530. __webpack_require__(58),
  531. /* template */
  532. null,
  533. /* scopeId */
  534. null,
  535. /* cssModules */
  536. null
  537. )
  538. module.exports = Component.exports
  539. /***/ },
  540. /* 58 */
  541. /***/ function(module, exports, __webpack_require__) {
  542. 'use strict';
  543. exports.__esModule = true;
  544. var _babelHelperVueJsxMergeProps = __webpack_require__(59);
  545. var _babelHelperVueJsxMergeProps2 = _interopRequireDefault(_babelHelperVueJsxMergeProps);
  546. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  547. exports.default = {
  548. name: 'ElCascaderMenu',
  549. data: function data() {
  550. return {
  551. inputWidth: 0,
  552. options: [],
  553. props: {},
  554. visible: false,
  555. activeValue: [],
  556. value: [],
  557. expandTrigger: 'click',
  558. changeOnSelect: false,
  559. popperClass: ''
  560. };
  561. },
  562. watch: {
  563. visible: function visible(value) {
  564. if (value) {
  565. this.activeValue = this.value;
  566. }
  567. },
  568. value: {
  569. immediate: true,
  570. handler: function handler(value) {
  571. this.activeValue = value;
  572. }
  573. }
  574. },
  575. computed: {
  576. activeOptions: {
  577. cache: false,
  578. get: function get() {
  579. var _this = this;
  580. var activeValue = this.activeValue;
  581. var configurableProps = ['label', 'value', 'children', 'disabled'];
  582. var formatOptions = function formatOptions(options) {
  583. options.forEach(function (option) {
  584. if (option.__IS__FLAT__OPTIONS) return;
  585. configurableProps.forEach(function (prop) {
  586. var value = option[_this.props[prop] || prop];
  587. if (value) option[prop] = value;
  588. });
  589. if (Array.isArray(option.children)) {
  590. formatOptions(option.children);
  591. }
  592. });
  593. };
  594. var loadActiveOptions = function loadActiveOptions(options) {
  595. var activeOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  596. var level = activeOptions.length;
  597. activeOptions[level] = options;
  598. var active = activeValue[level];
  599. if (active) {
  600. options = options.filter(function (option) {
  601. return option.value === active;
  602. })[0];
  603. if (options && options.children) {
  604. loadActiveOptions(options.children, activeOptions);
  605. }
  606. }
  607. return activeOptions;
  608. };
  609. formatOptions(this.options);
  610. return loadActiveOptions(this.options);
  611. }
  612. }
  613. },
  614. methods: {
  615. select: function select(item, menuIndex) {
  616. if (item.__IS__FLAT__OPTIONS) {
  617. this.activeValue = item.value;
  618. } else if (menuIndex) {
  619. this.activeValue.splice(menuIndex, this.activeValue.length - 1, item.value);
  620. } else {
  621. this.activeValue = [item.value];
  622. }
  623. this.$emit('pick', this.activeValue);
  624. },
  625. handleMenuLeave: function handleMenuLeave() {
  626. this.$emit('menuLeave');
  627. },
  628. activeItem: function activeItem(item, menuIndex) {
  629. var len = this.activeOptions.length;
  630. this.activeValue.splice(menuIndex, len, item.value);
  631. this.activeOptions.splice(menuIndex + 1, len, item.children);
  632. if (this.changeOnSelect) {
  633. this.$emit('pick', this.activeValue, false);
  634. } else {
  635. this.$emit('activeItemChange', this.activeValue);
  636. }
  637. }
  638. },
  639. render: function render(h) {
  640. var _this2 = this;
  641. var activeValue = this.activeValue,
  642. activeOptions = this.activeOptions,
  643. visible = this.visible,
  644. expandTrigger = this.expandTrigger,
  645. popperClass = this.popperClass;
  646. var menus = this._l(activeOptions, function (menu, menuIndex) {
  647. var isFlat = false;
  648. var items = _this2._l(menu, function (item) {
  649. var events = {
  650. on: {}
  651. };
  652. if (item.__IS__FLAT__OPTIONS) isFlat = true;
  653. if (!item.disabled) {
  654. if (item.children) {
  655. var triggerEvent = {
  656. click: 'click',
  657. hover: 'mouseenter'
  658. }[expandTrigger];
  659. events.on[triggerEvent] = function () {
  660. _this2.activeItem(item, menuIndex);
  661. };
  662. } else {
  663. events.on.click = function () {
  664. _this2.select(item, menuIndex);
  665. };
  666. }
  667. }
  668. return h(
  669. 'li',
  670. (0, _babelHelperVueJsxMergeProps2.default)([{
  671. 'class': {
  672. 'el-cascader-menu__item': true,
  673. 'el-cascader-menu__item--extensible': item.children,
  674. 'is-active': item.value === activeValue[menuIndex],
  675. 'is-disabled': item.disabled
  676. }
  677. }, events]),
  678. [item.label]
  679. );
  680. });
  681. var menuStyle = {};
  682. if (isFlat) {
  683. menuStyle.minWidth = _this2.inputWidth + 'px';
  684. }
  685. return h(
  686. 'ul',
  687. {
  688. 'class': {
  689. 'el-cascader-menu': true,
  690. 'el-cascader-menu--flexible': isFlat
  691. },
  692. style: menuStyle },
  693. [items]
  694. );
  695. });
  696. return h(
  697. 'transition',
  698. {
  699. attrs: { name: 'el-zoom-in-top' },
  700. on: {
  701. 'after-leave': this.handleMenuLeave
  702. }
  703. },
  704. [h(
  705. 'div',
  706. {
  707. directives: [{
  708. name: 'show',
  709. value: visible
  710. }],
  711. 'class': ['el-cascader-menus', popperClass]
  712. },
  713. [menus]
  714. )]
  715. );
  716. }
  717. };
  718. /***/ },
  719. /* 59 */
  720. /***/ function(module, exports) {
  721. module.exports = require("babel-helper-vue-jsx-merge-props");
  722. /***/ },
  723. /* 60 */
  724. /***/ function(module, exports) {
  725. module.exports = require("element-ui/lib/mixins/locale");
  726. /***/ },
  727. /* 61 */
  728. /***/ function(module, exports) {
  729. module.exports = require("element-ui/lib/locale");
  730. /***/ },
  731. /* 62 */
  732. /***/ function(module, exports) {
  733. module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  734. return _c('span', {
  735. directives: [{
  736. name: "clickoutside",
  737. rawName: "v-clickoutside",
  738. value: (_vm.handleClickoutside),
  739. expression: "handleClickoutside"
  740. }],
  741. ref: "reference",
  742. staticClass: "el-cascader",
  743. class: [{
  744. 'is-opened': _vm.menuVisible,
  745. 'is-disabled': _vm.disabled
  746. },
  747. _vm.size ? 'el-cascader--' + _vm.size : ''
  748. ],
  749. on: {
  750. "click": _vm.handleClick,
  751. "mouseenter": function($event) {
  752. _vm.inputHover = true
  753. },
  754. "mouseleave": function($event) {
  755. _vm.inputHover = false
  756. }
  757. }
  758. }, [_c('el-input', {
  759. directives: [{
  760. name: "model",
  761. rawName: "v-model",
  762. value: (_vm.inputValue),
  763. expression: "inputValue"
  764. }],
  765. ref: "input",
  766. attrs: {
  767. "readonly": !_vm.filterable,
  768. "placeholder": _vm.currentLabels.length ? undefined : _vm.placeholder,
  769. "validate-event": false,
  770. "size": _vm.size,
  771. "disabled": _vm.disabled
  772. },
  773. domProps: {
  774. "value": (_vm.inputValue)
  775. },
  776. on: {
  777. "change": _vm.debouncedInputChange,
  778. "input": function($event) {
  779. _vm.inputValue = $event
  780. }
  781. }
  782. }, [_c('template', {
  783. slot: "icon"
  784. }, [(_vm.clearable && _vm.inputHover && _vm.currentLabels.length) ? _c('i', {
  785. key: "1",
  786. staticClass: "el-input__icon el-icon-circle-close el-cascader__clearIcon",
  787. on: {
  788. "click": _vm.clearValue
  789. }
  790. }) : _c('i', {
  791. key: "2",
  792. staticClass: "el-input__icon el-icon-caret-bottom",
  793. class: {
  794. 'is-reverse': _vm.menuVisible
  795. }
  796. })])], 2), _c('span', {
  797. directives: [{
  798. name: "show",
  799. rawName: "v-show",
  800. value: (_vm.inputValue === ''),
  801. expression: "inputValue === ''"
  802. }],
  803. staticClass: "el-cascader__label"
  804. }, [(_vm.showAllLevels) ? [_vm._l((_vm.currentLabels), function(label, index) {
  805. return [_vm._v("\n " + _vm._s(label) + "\n "), (index < _vm.currentLabels.length - 1) ? _c('span', [_vm._v(" / ")]) : _vm._e()]
  806. })] : [_vm._v("\n " + _vm._s(_vm.currentLabels[_vm.currentLabels.length - 1]) + "\n ")]], 2)], 1)
  807. },staticRenderFns: []}
  808. /***/ }
  809. /******/ ]);