autocomplete.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  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, {
  41. /******/ configurable: false,
  42. /******/ enumerable: true,
  43. /******/ get: getter
  44. /******/ });
  45. /******/ }
  46. /******/ };
  47. /******/
  48. /******/ // getDefaultExport function for compatibility with non-harmony modules
  49. /******/ __webpack_require__.n = function(module) {
  50. /******/ var getter = module && module.__esModule ?
  51. /******/ function getDefault() { return module['default']; } :
  52. /******/ function getModuleExports() { return module; };
  53. /******/ __webpack_require__.d(getter, 'a', getter);
  54. /******/ return getter;
  55. /******/ };
  56. /******/
  57. /******/ // Object.prototype.hasOwnProperty.call
  58. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  59. /******/
  60. /******/ // __webpack_public_path__
  61. /******/ __webpack_require__.p = "/dist/";
  62. /******/
  63. /******/ // Load entry module and return exports
  64. /******/ return __webpack_require__(__webpack_require__.s = 65);
  65. /******/ })
  66. /************************************************************************/
  67. /******/ ({
  68. /***/ 0:
  69. /***/ (function(module, exports) {
  70. /* globals __VUE_SSR_CONTEXT__ */
  71. // IMPORTANT: Do NOT use ES2015 features in this file.
  72. // This module is a runtime utility for cleaner component module output and will
  73. // be included in the final webpack user bundle.
  74. module.exports = function normalizeComponent (
  75. rawScriptExports,
  76. compiledTemplate,
  77. functionalTemplate,
  78. injectStyles,
  79. scopeId,
  80. moduleIdentifier /* server only */
  81. ) {
  82. var esModule
  83. var scriptExports = rawScriptExports = rawScriptExports || {}
  84. // ES6 modules interop
  85. var type = typeof rawScriptExports.default
  86. if (type === 'object' || type === 'function') {
  87. esModule = rawScriptExports
  88. scriptExports = rawScriptExports.default
  89. }
  90. // Vue.extend constructor export interop
  91. var options = typeof scriptExports === 'function'
  92. ? scriptExports.options
  93. : scriptExports
  94. // render functions
  95. if (compiledTemplate) {
  96. options.render = compiledTemplate.render
  97. options.staticRenderFns = compiledTemplate.staticRenderFns
  98. options._compiled = true
  99. }
  100. // functional template
  101. if (functionalTemplate) {
  102. options.functional = true
  103. }
  104. // scopedId
  105. if (scopeId) {
  106. options._scopeId = scopeId
  107. }
  108. var hook
  109. if (moduleIdentifier) { // server build
  110. hook = function (context) {
  111. // 2.3 injection
  112. context =
  113. context || // cached call
  114. (this.$vnode && this.$vnode.ssrContext) || // stateful
  115. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  116. // 2.2 with runInNewContext: true
  117. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  118. context = __VUE_SSR_CONTEXT__
  119. }
  120. // inject component styles
  121. if (injectStyles) {
  122. injectStyles.call(this, context)
  123. }
  124. // register component module identifier for async chunk inferrence
  125. if (context && context._registeredComponents) {
  126. context._registeredComponents.add(moduleIdentifier)
  127. }
  128. }
  129. // used by ssr in case component is cached and beforeCreate
  130. // never gets called
  131. options._ssrRegister = hook
  132. } else if (injectStyles) {
  133. hook = injectStyles
  134. }
  135. if (hook) {
  136. var functional = options.functional
  137. var existing = functional
  138. ? options.render
  139. : options.beforeCreate
  140. if (!functional) {
  141. // inject component registration as beforeCreate hook
  142. options.beforeCreate = existing
  143. ? [].concat(existing, hook)
  144. : [hook]
  145. } else {
  146. // for template-only hot-reload because in that case the render fn doesn't
  147. // go through the normalizer
  148. options._injectStyles = hook
  149. // register for functioal component in vue file
  150. options.render = function renderWithStyleInjection (h, context) {
  151. hook.call(context)
  152. return existing(h, context)
  153. }
  154. }
  155. }
  156. return {
  157. esModule: esModule,
  158. exports: scriptExports,
  159. options: options
  160. }
  161. }
  162. /***/ }),
  163. /***/ 1:
  164. /***/ (function(module, exports) {
  165. module.exports = require("element-ui/lib/mixins/emitter");
  166. /***/ }),
  167. /***/ 10:
  168. /***/ (function(module, exports) {
  169. module.exports = require("element-ui/lib/utils/clickoutside");
  170. /***/ }),
  171. /***/ 12:
  172. /***/ (function(module, exports) {
  173. module.exports = require("throttle-debounce/debounce");
  174. /***/ }),
  175. /***/ 13:
  176. /***/ (function(module, exports) {
  177. module.exports = require("element-ui/lib/mixins/focus");
  178. /***/ }),
  179. /***/ 18:
  180. /***/ (function(module, exports) {
  181. module.exports = require("element-ui/lib/scrollbar");
  182. /***/ }),
  183. /***/ 3:
  184. /***/ (function(module, exports) {
  185. module.exports = require("element-ui/lib/utils/util");
  186. /***/ }),
  187. /***/ 6:
  188. /***/ (function(module, exports) {
  189. module.exports = require("element-ui/lib/input");
  190. /***/ }),
  191. /***/ 65:
  192. /***/ (function(module, exports, __webpack_require__) {
  193. module.exports = __webpack_require__(66);
  194. /***/ }),
  195. /***/ 66:
  196. /***/ (function(module, exports, __webpack_require__) {
  197. "use strict";
  198. exports.__esModule = true;
  199. var _autocomplete = __webpack_require__(67);
  200. var _autocomplete2 = _interopRequireDefault(_autocomplete);
  201. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  202. /* istanbul ignore next */
  203. _autocomplete2.default.install = function (Vue) {
  204. Vue.component(_autocomplete2.default.name, _autocomplete2.default);
  205. };
  206. exports.default = _autocomplete2.default;
  207. /***/ }),
  208. /***/ 67:
  209. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  210. "use strict";
  211. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  212. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_vue__ = __webpack_require__(68);
  213. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_vue__);
  214. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_01836196_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_autocomplete_vue__ = __webpack_require__(72);
  215. var normalizeComponent = __webpack_require__(0)
  216. /* script */
  217. /* template */
  218. /* template functional */
  219. var __vue_template_functional__ = false
  220. /* styles */
  221. var __vue_styles__ = null
  222. /* scopeId */
  223. var __vue_scopeId__ = null
  224. /* moduleIdentifier (server only) */
  225. var __vue_module_identifier__ = null
  226. var Component = normalizeComponent(
  227. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_vue___default.a,
  228. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_01836196_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_autocomplete_vue__["a" /* default */],
  229. __vue_template_functional__,
  230. __vue_styles__,
  231. __vue_scopeId__,
  232. __vue_module_identifier__
  233. )
  234. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  235. /***/ }),
  236. /***/ 68:
  237. /***/ (function(module, exports, __webpack_require__) {
  238. "use strict";
  239. exports.__esModule = true;
  240. var _debounce = __webpack_require__(12);
  241. var _debounce2 = _interopRequireDefault(_debounce);
  242. var _input = __webpack_require__(6);
  243. var _input2 = _interopRequireDefault(_input);
  244. var _clickoutside = __webpack_require__(10);
  245. var _clickoutside2 = _interopRequireDefault(_clickoutside);
  246. var _autocompleteSuggestions = __webpack_require__(69);
  247. var _autocompleteSuggestions2 = _interopRequireDefault(_autocompleteSuggestions);
  248. var _emitter = __webpack_require__(1);
  249. var _emitter2 = _interopRequireDefault(_emitter);
  250. var _migrating = __webpack_require__(7);
  251. var _migrating2 = _interopRequireDefault(_migrating);
  252. var _util = __webpack_require__(3);
  253. var _focus = __webpack_require__(13);
  254. var _focus2 = _interopRequireDefault(_focus);
  255. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  256. //
  257. //
  258. //
  259. //
  260. //
  261. //
  262. //
  263. //
  264. //
  265. //
  266. //
  267. //
  268. //
  269. //
  270. //
  271. //
  272. //
  273. //
  274. //
  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. //
  313. //
  314. //
  315. exports.default = {
  316. name: 'ElAutocomplete',
  317. mixins: [_emitter2.default, (0, _focus2.default)('input'), _migrating2.default],
  318. componentName: 'ElAutocomplete',
  319. components: {
  320. ElInput: _input2.default,
  321. ElAutocompleteSuggestions: _autocompleteSuggestions2.default
  322. },
  323. directives: { Clickoutside: _clickoutside2.default },
  324. props: {
  325. valueKey: {
  326. type: String,
  327. default: 'value'
  328. },
  329. popperClass: String,
  330. placeholder: String,
  331. disabled: Boolean,
  332. name: String,
  333. size: String,
  334. value: String,
  335. autofocus: Boolean,
  336. fetchSuggestions: Function,
  337. triggerOnFocus: {
  338. type: Boolean,
  339. default: true
  340. },
  341. customItem: String,
  342. selectWhenUnmatched: {
  343. type: Boolean,
  344. default: false
  345. },
  346. prefixIcon: String,
  347. suffixIcon: String,
  348. label: String,
  349. debounce: {
  350. type: Number,
  351. default: 300
  352. }
  353. },
  354. data: function data() {
  355. return {
  356. activated: false,
  357. isOnComposition: false,
  358. suggestions: [],
  359. loading: false,
  360. highlightedIndex: -1
  361. };
  362. },
  363. computed: {
  364. suggestionVisible: function suggestionVisible() {
  365. var suggestions = this.suggestions;
  366. var isValidData = Array.isArray(suggestions) && suggestions.length > 0;
  367. return (isValidData || this.loading) && this.activated;
  368. },
  369. id: function id() {
  370. return 'el-autocomplete-' + (0, _util.generateId)();
  371. }
  372. },
  373. watch: {
  374. suggestionVisible: function suggestionVisible(val) {
  375. this.broadcast('ElAutocompleteSuggestions', 'visible', [val, this.$refs.input.$refs.input.offsetWidth]);
  376. }
  377. },
  378. methods: {
  379. getMigratingConfig: function getMigratingConfig() {
  380. return {
  381. props: {
  382. 'custom-item': 'custom-item is removed, use scoped slot instead.',
  383. 'props': 'props is removed, use value-key instead.'
  384. }
  385. };
  386. },
  387. getData: function getData(queryString) {
  388. var _this = this;
  389. this.loading = true;
  390. this.fetchSuggestions(queryString, function (suggestions) {
  391. _this.loading = false;
  392. if (Array.isArray(suggestions)) {
  393. _this.suggestions = suggestions;
  394. } else {
  395. console.error('autocomplete suggestions must be an array');
  396. }
  397. });
  398. },
  399. handleComposition: function handleComposition(event) {
  400. if (event.type === 'compositionend') {
  401. this.isOnComposition = false;
  402. this.handleChange(event.target.value);
  403. } else {
  404. this.isOnComposition = true;
  405. }
  406. },
  407. handleChange: function handleChange(value) {
  408. this.$emit('input', value);
  409. if (this.isOnComposition || !this.triggerOnFocus && !value) {
  410. this.suggestions = [];
  411. return;
  412. }
  413. this.debouncedGetData(value);
  414. },
  415. handleFocus: function handleFocus(event) {
  416. this.activated = true;
  417. this.$emit('focus', event);
  418. if (this.triggerOnFocus) {
  419. this.debouncedGetData(this.value);
  420. }
  421. },
  422. handleBlur: function handleBlur(event) {
  423. this.$emit('blur', event);
  424. },
  425. close: function close(e) {
  426. this.activated = false;
  427. },
  428. handleKeyEnter: function handleKeyEnter(e) {
  429. var _this2 = this;
  430. if (this.suggestionVisible && this.highlightedIndex >= 0 && this.highlightedIndex < this.suggestions.length) {
  431. e.preventDefault();
  432. this.select(this.suggestions[this.highlightedIndex]);
  433. } else if (this.selectWhenUnmatched) {
  434. this.$emit('select', { value: this.value });
  435. this.$nextTick(function (_) {
  436. _this2.suggestions = [];
  437. _this2.highlightedIndex = -1;
  438. });
  439. }
  440. },
  441. select: function select(item) {
  442. var _this3 = this;
  443. this.$emit('input', item[this.valueKey]);
  444. this.$emit('select', item);
  445. this.$nextTick(function (_) {
  446. _this3.suggestions = [];
  447. _this3.highlightedIndex = -1;
  448. });
  449. },
  450. highlight: function highlight(index) {
  451. if (!this.suggestionVisible || this.loading) {
  452. return;
  453. }
  454. if (index < 0) {
  455. this.highlightedIndex = -1;
  456. return;
  457. }
  458. if (index >= this.suggestions.length) {
  459. index = this.suggestions.length - 1;
  460. }
  461. var suggestion = this.$refs.suggestions.$el.querySelector('.el-autocomplete-suggestion__wrap');
  462. var suggestionList = suggestion.querySelectorAll('.el-autocomplete-suggestion__list li');
  463. var highlightItem = suggestionList[index];
  464. var scrollTop = suggestion.scrollTop;
  465. var offsetTop = highlightItem.offsetTop;
  466. if (offsetTop + highlightItem.scrollHeight > scrollTop + suggestion.clientHeight) {
  467. suggestion.scrollTop += highlightItem.scrollHeight;
  468. }
  469. if (offsetTop < scrollTop) {
  470. suggestion.scrollTop -= highlightItem.scrollHeight;
  471. }
  472. this.highlightedIndex = index;
  473. this.$el.querySelector('.el-input__inner').setAttribute('aria-activedescendant', this.id + '-item-' + this.highlightedIndex);
  474. }
  475. },
  476. mounted: function mounted() {
  477. var _this4 = this;
  478. this.debouncedGetData = (0, _debounce2.default)(this.debounce, function (val) {
  479. _this4.getData(val);
  480. });
  481. this.$on('item-click', function (item) {
  482. _this4.select(item);
  483. });
  484. var $input = this.$el.querySelector('.el-input__inner');
  485. $input.setAttribute('role', 'textbox');
  486. $input.setAttribute('aria-autocomplete', 'list');
  487. $input.setAttribute('aria-controls', 'id');
  488. $input.setAttribute('aria-activedescendant', this.id + '-item-' + this.highlightedIndex);
  489. },
  490. beforeDestroy: function beforeDestroy() {
  491. this.$refs.suggestions.$destroy();
  492. }
  493. };
  494. /***/ }),
  495. /***/ 69:
  496. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  497. "use strict";
  498. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  499. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_suggestions_vue__ = __webpack_require__(70);
  500. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_suggestions_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_suggestions_vue__);
  501. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3f749952_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_autocomplete_suggestions_vue__ = __webpack_require__(71);
  502. var normalizeComponent = __webpack_require__(0)
  503. /* script */
  504. /* template */
  505. /* template functional */
  506. var __vue_template_functional__ = false
  507. /* styles */
  508. var __vue_styles__ = null
  509. /* scopeId */
  510. var __vue_scopeId__ = null
  511. /* moduleIdentifier (server only) */
  512. var __vue_module_identifier__ = null
  513. var Component = normalizeComponent(
  514. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_autocomplete_suggestions_vue___default.a,
  515. __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3f749952_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_autocomplete_suggestions_vue__["a" /* default */],
  516. __vue_template_functional__,
  517. __vue_styles__,
  518. __vue_scopeId__,
  519. __vue_module_identifier__
  520. )
  521. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  522. /***/ }),
  523. /***/ 7:
  524. /***/ (function(module, exports) {
  525. module.exports = require("element-ui/lib/mixins/migrating");
  526. /***/ }),
  527. /***/ 70:
  528. /***/ (function(module, exports, __webpack_require__) {
  529. "use strict";
  530. exports.__esModule = true;
  531. var _vuePopper = __webpack_require__(8);
  532. var _vuePopper2 = _interopRequireDefault(_vuePopper);
  533. var _emitter = __webpack_require__(1);
  534. var _emitter2 = _interopRequireDefault(_emitter);
  535. var _scrollbar = __webpack_require__(18);
  536. var _scrollbar2 = _interopRequireDefault(_scrollbar);
  537. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  538. exports.default = {
  539. components: { ElScrollbar: _scrollbar2.default },
  540. mixins: [_vuePopper2.default, _emitter2.default],
  541. componentName: 'ElAutocompleteSuggestions',
  542. data: function data() {
  543. return {
  544. parent: this.$parent,
  545. dropdownWidth: ''
  546. };
  547. },
  548. props: {
  549. options: {
  550. default: function _default() {
  551. return {
  552. gpuAcceleration: false
  553. };
  554. }
  555. },
  556. id: String
  557. },
  558. methods: {
  559. select: function select(item) {
  560. this.dispatch('ElAutocomplete', 'item-click', item);
  561. }
  562. },
  563. updated: function updated() {
  564. var _this = this;
  565. this.$nextTick(function (_) {
  566. _this.updatePopper();
  567. });
  568. },
  569. mounted: function mounted() {
  570. this.$parent.popperElm = this.popperElm = this.$el;
  571. this.referenceElm = this.$parent.$refs.input.$refs.input;
  572. this.referenceList = this.$el.querySelector('.el-autocomplete-suggestion__list');
  573. this.referenceList.setAttribute('role', 'listbox');
  574. this.referenceList.setAttribute('id', this.id);
  575. },
  576. created: function created() {
  577. var _this2 = this;
  578. this.$on('visible', function (val, inputWidth) {
  579. _this2.dropdownWidth = inputWidth + 'px';
  580. _this2.showPopper = val;
  581. });
  582. }
  583. }; //
  584. //
  585. //
  586. //
  587. //
  588. //
  589. //
  590. //
  591. //
  592. //
  593. //
  594. //
  595. //
  596. //
  597. //
  598. //
  599. //
  600. //
  601. //
  602. //
  603. //
  604. /***/ }),
  605. /***/ 71:
  606. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  607. "use strict";
  608. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"el-zoom-in-top"},on:{"after-leave":_vm.doDestroy}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showPopper),expression:"showPopper"}],staticClass:"el-autocomplete-suggestion el-popper",class:{ 'is-loading': _vm.parent.loading },style:({ width: _vm.dropdownWidth }),attrs:{"role":"region"}},[_c('el-scrollbar',{attrs:{"tag":"ul","wrap-class":"el-autocomplete-suggestion__wrap","view-class":"el-autocomplete-suggestion__list"}},[(_vm.parent.loading)?_c('li',[_c('i',{staticClass:"el-icon-loading"})]):_vm._t("default")],2)],1)])}
  609. var staticRenderFns = []
  610. var esExports = { render: render, staticRenderFns: staticRenderFns }
  611. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  612. /***/ }),
  613. /***/ 72:
  614. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  615. "use strict";
  616. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.close),expression:"close"}],staticClass:"el-autocomplete",attrs:{"aria-haspopup":"listbox","role":"combobox","aria-expanded":_vm.suggestionVisible,"aria-owns":_vm.id}},[_c('el-input',_vm._b({ref:"input",attrs:{"label":_vm.label},on:{"input":_vm.handleChange,"focus":_vm.handleFocus,"blur":_vm.handleBlur},nativeOn:{"compositionstart":function($event){_vm.handleComposition($event)},"compositionupdate":function($event){_vm.handleComposition($event)},"compositionend":function($event){_vm.handleComposition($event)},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"up",38,$event.key)){ return null; }$event.preventDefault();_vm.highlight(_vm.highlightedIndex - 1)},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"down",40,$event.key)){ return null; }$event.preventDefault();_vm.highlight(_vm.highlightedIndex + 1)},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.handleKeyEnter($event)},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"tab",9,$event.key)){ return null; }_vm.close($event)}]}},'el-input',_vm.$props,false),[(_vm.$slots.prepend)?_c('template',{attrs:{"slot":"prepend"},slot:"prepend"},[_vm._t("prepend")],2):_vm._e(),(_vm.$slots.append)?_c('template',{attrs:{"slot":"append"},slot:"append"},[_vm._t("append")],2):_vm._e(),(_vm.$slots.prefix)?_c('template',{attrs:{"slot":"prefix"},slot:"prefix"},[_vm._t("prefix")],2):_vm._e(),(_vm.$slots.suffix)?_c('template',{attrs:{"slot":"suffix"},slot:"suffix"},[_vm._t("suffix")],2):_vm._e()],2),_c('el-autocomplete-suggestions',{ref:"suggestions",class:[_vm.popperClass ? _vm.popperClass : ''],attrs:{"visible-arrow":"","placement":"bottom-start","id":_vm.id}},_vm._l((_vm.suggestions),function(item,index){return _c('li',{key:index,class:{'highlighted': _vm.highlightedIndex === index},attrs:{"id":(_vm.id + "-item-" + index),"role":"option","aria-selected":_vm.highlightedIndex === index},on:{"click":function($event){_vm.select(item)}}},[_vm._t("default",[_vm._v("\n "+_vm._s(item[_vm.valueKey])+"\n ")],{item:item})],2)}))],1)}
  617. var staticRenderFns = []
  618. var esExports = { render: render, staticRenderFns: staticRenderFns }
  619. /* harmony default export */ __webpack_exports__["a"] = (esExports);
  620. /***/ }),
  621. /***/ 8:
  622. /***/ (function(module, exports) {
  623. module.exports = require("element-ui/lib/utils/vue-popper");
  624. /***/ })
  625. /******/ });