select.js 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172
  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 = 61);
  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. /***/ 10:
  180. /***/ (function(module, exports) {
  181. module.exports = require("element-ui/lib/input");
  182. /***/ }),
  183. /***/ 12:
  184. /***/ (function(module, exports) {
  185. module.exports = require("element-ui/lib/utils/clickoutside");
  186. /***/ }),
  187. /***/ 15:
  188. /***/ (function(module, exports) {
  189. module.exports = require("element-ui/lib/scrollbar");
  190. /***/ }),
  191. /***/ 16:
  192. /***/ (function(module, exports) {
  193. module.exports = require("element-ui/lib/utils/resize-event");
  194. /***/ }),
  195. /***/ 19:
  196. /***/ (function(module, exports) {
  197. module.exports = require("throttle-debounce/debounce");
  198. /***/ }),
  199. /***/ 21:
  200. /***/ (function(module, exports) {
  201. module.exports = require("element-ui/lib/utils/shared");
  202. /***/ }),
  203. /***/ 22:
  204. /***/ (function(module, exports) {
  205. module.exports = require("element-ui/lib/mixins/focus");
  206. /***/ }),
  207. /***/ 3:
  208. /***/ (function(module, exports) {
  209. module.exports = require("element-ui/lib/utils/util");
  210. /***/ }),
  211. /***/ 31:
  212. /***/ (function(module, exports) {
  213. module.exports = require("element-ui/lib/utils/scroll-into-view");
  214. /***/ }),
  215. /***/ 33:
  216. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  217. "use strict";
  218. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  219. var render = function() {
  220. var _vm = this
  221. var _h = _vm.$createElement
  222. var _c = _vm._self._c || _h
  223. return _c(
  224. "li",
  225. {
  226. directives: [
  227. {
  228. name: "show",
  229. rawName: "v-show",
  230. value: _vm.visible,
  231. expression: "visible"
  232. }
  233. ],
  234. staticClass: "el-select-dropdown__item",
  235. class: {
  236. selected: _vm.itemSelected,
  237. "is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
  238. hover: _vm.hover
  239. },
  240. on: {
  241. mouseenter: _vm.hoverItem,
  242. click: function($event) {
  243. $event.stopPropagation()
  244. return _vm.selectOptionClick($event)
  245. }
  246. }
  247. },
  248. [_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])],
  249. 2
  250. )
  251. }
  252. var staticRenderFns = []
  253. render._withStripped = true
  254. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  255. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  256. var emitter_ = __webpack_require__(4);
  257. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  258. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  259. var util_ = __webpack_require__(3);
  260. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&
  261. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  262. //
  263. //
  264. //
  265. //
  266. //
  267. //
  268. //
  269. //
  270. //
  271. //
  272. //
  273. //
  274. //
  275. //
  276. //
  277. //
  278. //
  279. /* harmony default export */ var optionvue_type_script_lang_js_ = ({
  280. mixins: [emitter_default.a],
  281. name: 'ElOption',
  282. componentName: 'ElOption',
  283. inject: ['select'],
  284. props: {
  285. value: {
  286. required: true
  287. },
  288. label: [String, Number],
  289. created: Boolean,
  290. disabled: {
  291. type: Boolean,
  292. default: false
  293. }
  294. },
  295. data: function data() {
  296. return {
  297. index: -1,
  298. groupDisabled: false,
  299. visible: true,
  300. hitState: false,
  301. hover: false
  302. };
  303. },
  304. computed: {
  305. isObject: function isObject() {
  306. return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
  307. },
  308. currentLabel: function currentLabel() {
  309. return this.label || (this.isObject ? '' : this.value);
  310. },
  311. currentValue: function currentValue() {
  312. return this.value || this.label || '';
  313. },
  314. itemSelected: function itemSelected() {
  315. if (!this.select.multiple) {
  316. return this.isEqual(this.value, this.select.value);
  317. } else {
  318. return this.contains(this.select.value, this.value);
  319. }
  320. },
  321. limitReached: function limitReached() {
  322. if (this.select.multiple) {
  323. return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
  324. } else {
  325. return false;
  326. }
  327. }
  328. },
  329. watch: {
  330. currentLabel: function currentLabel() {
  331. if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
  332. },
  333. value: function value(val, oldVal) {
  334. var _select = this.select,
  335. remote = _select.remote,
  336. valueKey = _select.valueKey;
  337. if (!this.created && !remote) {
  338. if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
  339. return;
  340. }
  341. this.dispatch('ElSelect', 'setSelected');
  342. }
  343. }
  344. },
  345. methods: {
  346. isEqual: function isEqual(a, b) {
  347. if (!this.isObject) {
  348. return a === b;
  349. } else {
  350. var valueKey = this.select.valueKey;
  351. return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
  352. }
  353. },
  354. contains: function contains() {
  355. var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  356. var target = arguments[1];
  357. if (!this.isObject) {
  358. return arr && arr.indexOf(target) > -1;
  359. } else {
  360. var valueKey = this.select.valueKey;
  361. return arr && arr.some(function (item) {
  362. return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
  363. });
  364. }
  365. },
  366. handleGroupDisabled: function handleGroupDisabled(val) {
  367. this.groupDisabled = val;
  368. },
  369. hoverItem: function hoverItem() {
  370. if (!this.disabled && !this.groupDisabled) {
  371. this.select.hoverIndex = this.select.options.indexOf(this);
  372. }
  373. },
  374. selectOptionClick: function selectOptionClick() {
  375. if (this.disabled !== true && this.groupDisabled !== true) {
  376. this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
  377. }
  378. },
  379. queryChange: function queryChange(query) {
  380. this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;
  381. if (!this.visible) {
  382. this.select.filteredOptionsCount--;
  383. }
  384. }
  385. },
  386. created: function created() {
  387. this.select.options.push(this);
  388. this.select.cachedOptions.push(this);
  389. this.select.optionsCount++;
  390. this.select.filteredOptionsCount++;
  391. this.$on('queryChange', this.queryChange);
  392. this.$on('handleGroupDisabled', this.handleGroupDisabled);
  393. },
  394. beforeDestroy: function beforeDestroy() {
  395. var _select2 = this.select,
  396. selected = _select2.selected,
  397. multiple = _select2.multiple;
  398. var selectedOptions = multiple ? selected : [selected];
  399. var index = this.select.cachedOptions.indexOf(this);
  400. var selectedIndex = selectedOptions.indexOf(this);
  401. // if option is not selected, remove it from cache
  402. if (index > -1 && selectedIndex < 0) {
  403. this.select.cachedOptions.splice(index, 1);
  404. }
  405. this.select.onOptionDestroy(this.select.options.indexOf(this));
  406. }
  407. });
  408. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&
  409. /* harmony default export */ var src_optionvue_type_script_lang_js_ = (optionvue_type_script_lang_js_);
  410. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  411. var componentNormalizer = __webpack_require__(0);
  412. // CONCATENATED MODULE: ./packages/select/src/option.vue
  413. /* normalize component */
  414. var component = Object(componentNormalizer["a" /* default */])(
  415. src_optionvue_type_script_lang_js_,
  416. render,
  417. staticRenderFns,
  418. false,
  419. null,
  420. null,
  421. null
  422. )
  423. /* hot reload */
  424. if (false) { var api; }
  425. component.options.__file = "packages/select/src/option.vue"
  426. /* harmony default export */ var src_option = __webpack_exports__["a"] = (component.exports);
  427. /***/ }),
  428. /***/ 37:
  429. /***/ (function(module, exports) {
  430. module.exports = require("element-ui/lib/tag");
  431. /***/ }),
  432. /***/ 4:
  433. /***/ (function(module, exports) {
  434. module.exports = require("element-ui/lib/mixins/emitter");
  435. /***/ }),
  436. /***/ 5:
  437. /***/ (function(module, exports) {
  438. module.exports = require("element-ui/lib/utils/vue-popper");
  439. /***/ }),
  440. /***/ 6:
  441. /***/ (function(module, exports) {
  442. module.exports = require("element-ui/lib/mixins/locale");
  443. /***/ }),
  444. /***/ 61:
  445. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  446. "use strict";
  447. __webpack_require__.r(__webpack_exports__);
  448. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
  449. var render = function() {
  450. var _vm = this
  451. var _h = _vm.$createElement
  452. var _c = _vm._self._c || _h
  453. return _c(
  454. "div",
  455. {
  456. directives: [
  457. {
  458. name: "clickoutside",
  459. rawName: "v-clickoutside",
  460. value: _vm.handleClose,
  461. expression: "handleClose"
  462. }
  463. ],
  464. staticClass: "el-select",
  465. class: [_vm.selectSize ? "el-select--" + _vm.selectSize : ""],
  466. on: {
  467. click: function($event) {
  468. $event.stopPropagation()
  469. return _vm.toggleMenu($event)
  470. }
  471. }
  472. },
  473. [
  474. _vm.multiple
  475. ? _c(
  476. "div",
  477. {
  478. ref: "tags",
  479. staticClass: "el-select__tags",
  480. style: { "max-width": _vm.inputWidth - 32 + "px", width: "100%" }
  481. },
  482. [
  483. _vm.collapseTags && _vm.selected.length
  484. ? _c(
  485. "span",
  486. [
  487. _c(
  488. "el-tag",
  489. {
  490. attrs: {
  491. closable: !_vm.selectDisabled,
  492. size: _vm.collapseTagSize,
  493. hit: _vm.selected[0].hitState,
  494. type: "info",
  495. "disable-transitions": ""
  496. },
  497. on: {
  498. close: function($event) {
  499. _vm.deleteTag($event, _vm.selected[0])
  500. }
  501. }
  502. },
  503. [
  504. _c("span", { staticClass: "el-select__tags-text" }, [
  505. _vm._v(_vm._s(_vm.selected[0].currentLabel))
  506. ])
  507. ]
  508. ),
  509. _vm.selected.length > 1
  510. ? _c(
  511. "el-tag",
  512. {
  513. attrs: {
  514. closable: false,
  515. size: _vm.collapseTagSize,
  516. type: "info",
  517. "disable-transitions": ""
  518. }
  519. },
  520. [
  521. _c(
  522. "span",
  523. { staticClass: "el-select__tags-text" },
  524. [_vm._v("+ " + _vm._s(_vm.selected.length - 1))]
  525. )
  526. ]
  527. )
  528. : _vm._e()
  529. ],
  530. 1
  531. )
  532. : _vm._e(),
  533. !_vm.collapseTags
  534. ? _c(
  535. "transition-group",
  536. { on: { "after-leave": _vm.resetInputHeight } },
  537. _vm._l(_vm.selected, function(item) {
  538. return _c(
  539. "el-tag",
  540. {
  541. key: _vm.getValueKey(item),
  542. attrs: {
  543. closable: !_vm.selectDisabled,
  544. size: _vm.collapseTagSize,
  545. hit: item.hitState,
  546. type: "info",
  547. "disable-transitions": ""
  548. },
  549. on: {
  550. close: function($event) {
  551. _vm.deleteTag($event, item)
  552. }
  553. }
  554. },
  555. [
  556. _c("span", { staticClass: "el-select__tags-text" }, [
  557. _vm._v(_vm._s(item.currentLabel))
  558. ])
  559. ]
  560. )
  561. }),
  562. 1
  563. )
  564. : _vm._e(),
  565. _vm.filterable
  566. ? _c("input", {
  567. directives: [
  568. {
  569. name: "model",
  570. rawName: "v-model",
  571. value: _vm.query,
  572. expression: "query"
  573. }
  574. ],
  575. ref: "input",
  576. staticClass: "el-select__input",
  577. class: [_vm.selectSize ? "is-" + _vm.selectSize : ""],
  578. style: {
  579. "flex-grow": "1",
  580. width: _vm.inputLength / (_vm.inputWidth - 32) + "%",
  581. "max-width": _vm.inputWidth - 42 + "px"
  582. },
  583. attrs: {
  584. type: "text",
  585. disabled: _vm.selectDisabled,
  586. autocomplete: _vm.autoComplete || _vm.autocomplete
  587. },
  588. domProps: { value: _vm.query },
  589. on: {
  590. focus: _vm.handleFocus,
  591. blur: function($event) {
  592. _vm.softFocus = false
  593. },
  594. keyup: _vm.managePlaceholder,
  595. keydown: [
  596. _vm.resetInputState,
  597. function($event) {
  598. if (
  599. !("button" in $event) &&
  600. _vm._k($event.keyCode, "down", 40, $event.key, [
  601. "Down",
  602. "ArrowDown"
  603. ])
  604. ) {
  605. return null
  606. }
  607. $event.preventDefault()
  608. _vm.handleNavigate("next")
  609. },
  610. function($event) {
  611. if (
  612. !("button" in $event) &&
  613. _vm._k($event.keyCode, "up", 38, $event.key, [
  614. "Up",
  615. "ArrowUp"
  616. ])
  617. ) {
  618. return null
  619. }
  620. $event.preventDefault()
  621. _vm.handleNavigate("prev")
  622. },
  623. function($event) {
  624. if (
  625. !("button" in $event) &&
  626. _vm._k(
  627. $event.keyCode,
  628. "enter",
  629. 13,
  630. $event.key,
  631. "Enter"
  632. )
  633. ) {
  634. return null
  635. }
  636. $event.preventDefault()
  637. return _vm.selectOption($event)
  638. },
  639. function($event) {
  640. if (
  641. !("button" in $event) &&
  642. _vm._k($event.keyCode, "esc", 27, $event.key, [
  643. "Esc",
  644. "Escape"
  645. ])
  646. ) {
  647. return null
  648. }
  649. $event.stopPropagation()
  650. $event.preventDefault()
  651. _vm.visible = false
  652. },
  653. function($event) {
  654. if (
  655. !("button" in $event) &&
  656. _vm._k(
  657. $event.keyCode,
  658. "delete",
  659. [8, 46],
  660. $event.key,
  661. ["Backspace", "Delete", "Del"]
  662. )
  663. ) {
  664. return null
  665. }
  666. return _vm.deletePrevTag($event)
  667. },
  668. function($event) {
  669. if (
  670. !("button" in $event) &&
  671. _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
  672. ) {
  673. return null
  674. }
  675. _vm.visible = false
  676. }
  677. ],
  678. compositionstart: _vm.handleComposition,
  679. compositionupdate: _vm.handleComposition,
  680. compositionend: _vm.handleComposition,
  681. input: [
  682. function($event) {
  683. if ($event.target.composing) {
  684. return
  685. }
  686. _vm.query = $event.target.value
  687. },
  688. _vm.debouncedQueryChange
  689. ]
  690. }
  691. })
  692. : _vm._e()
  693. ],
  694. 1
  695. )
  696. : _vm._e(),
  697. _c(
  698. "el-input",
  699. {
  700. ref: "reference",
  701. class: { "is-focus": _vm.visible },
  702. attrs: {
  703. type: "text",
  704. placeholder: _vm.currentPlaceholder,
  705. name: _vm.name,
  706. id: _vm.id,
  707. autocomplete: _vm.autoComplete || _vm.autocomplete,
  708. size: _vm.selectSize,
  709. disabled: _vm.selectDisabled,
  710. readonly: _vm.readonly,
  711. "validate-event": false,
  712. tabindex: _vm.multiple && _vm.filterable ? "-1" : null
  713. },
  714. on: {
  715. focus: _vm.handleFocus,
  716. blur: _vm.handleBlur,
  717. input: _vm.debouncedOnInputChange,
  718. compositionstart: _vm.handleComposition,
  719. compositionupdate: _vm.handleComposition,
  720. compositionend: _vm.handleComposition
  721. },
  722. nativeOn: {
  723. keydown: [
  724. function($event) {
  725. if (
  726. !("button" in $event) &&
  727. _vm._k($event.keyCode, "down", 40, $event.key, [
  728. "Down",
  729. "ArrowDown"
  730. ])
  731. ) {
  732. return null
  733. }
  734. $event.stopPropagation()
  735. $event.preventDefault()
  736. _vm.handleNavigate("next")
  737. },
  738. function($event) {
  739. if (
  740. !("button" in $event) &&
  741. _vm._k($event.keyCode, "up", 38, $event.key, [
  742. "Up",
  743. "ArrowUp"
  744. ])
  745. ) {
  746. return null
  747. }
  748. $event.stopPropagation()
  749. $event.preventDefault()
  750. _vm.handleNavigate("prev")
  751. },
  752. function($event) {
  753. if (
  754. !("button" in $event) &&
  755. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  756. ) {
  757. return null
  758. }
  759. $event.preventDefault()
  760. return _vm.selectOption($event)
  761. },
  762. function($event) {
  763. if (
  764. !("button" in $event) &&
  765. _vm._k($event.keyCode, "esc", 27, $event.key, [
  766. "Esc",
  767. "Escape"
  768. ])
  769. ) {
  770. return null
  771. }
  772. $event.stopPropagation()
  773. $event.preventDefault()
  774. _vm.visible = false
  775. },
  776. function($event) {
  777. if (
  778. !("button" in $event) &&
  779. _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
  780. ) {
  781. return null
  782. }
  783. _vm.visible = false
  784. }
  785. ],
  786. mouseenter: function($event) {
  787. _vm.inputHovering = true
  788. },
  789. mouseleave: function($event) {
  790. _vm.inputHovering = false
  791. }
  792. },
  793. model: {
  794. value: _vm.selectedLabel,
  795. callback: function($$v) {
  796. _vm.selectedLabel = $$v
  797. },
  798. expression: "selectedLabel"
  799. }
  800. },
  801. [
  802. _vm.$slots.prefix
  803. ? _c("template", { slot: "prefix" }, [_vm._t("prefix")], 2)
  804. : _vm._e(),
  805. _c("template", { slot: "suffix" }, [
  806. _c("i", {
  807. directives: [
  808. {
  809. name: "show",
  810. rawName: "v-show",
  811. value: !_vm.showClose,
  812. expression: "!showClose"
  813. }
  814. ],
  815. class: [
  816. "el-select__caret",
  817. "el-input__icon",
  818. "el-icon-" + _vm.iconClass
  819. ]
  820. }),
  821. _vm.showClose
  822. ? _c("i", {
  823. staticClass:
  824. "el-select__caret el-input__icon el-icon-circle-close",
  825. on: { click: _vm.handleClearClick }
  826. })
  827. : _vm._e()
  828. ])
  829. ],
  830. 2
  831. ),
  832. _c(
  833. "transition",
  834. {
  835. attrs: { name: "el-zoom-in-top" },
  836. on: {
  837. "before-enter": _vm.handleMenuEnter,
  838. "after-leave": _vm.doDestroy
  839. }
  840. },
  841. [
  842. _c(
  843. "el-select-menu",
  844. {
  845. directives: [
  846. {
  847. name: "show",
  848. rawName: "v-show",
  849. value: _vm.visible && _vm.emptyText !== false,
  850. expression: "visible && emptyText !== false"
  851. }
  852. ],
  853. ref: "popper",
  854. attrs: { "append-to-body": _vm.popperAppendToBody }
  855. },
  856. [
  857. _c(
  858. "el-scrollbar",
  859. {
  860. directives: [
  861. {
  862. name: "show",
  863. rawName: "v-show",
  864. value: _vm.options.length > 0 && !_vm.loading,
  865. expression: "options.length > 0 && !loading"
  866. }
  867. ],
  868. ref: "scrollbar",
  869. class: {
  870. "is-empty":
  871. !_vm.allowCreate &&
  872. _vm.query &&
  873. _vm.filteredOptionsCount === 0
  874. },
  875. attrs: {
  876. tag: "ul",
  877. "wrap-class": "el-select-dropdown__wrap",
  878. "view-class": "el-select-dropdown__list"
  879. }
  880. },
  881. [
  882. _vm.showNewOption
  883. ? _c("el-option", {
  884. attrs: { value: _vm.query, created: "" }
  885. })
  886. : _vm._e(),
  887. _vm._t("default")
  888. ],
  889. 2
  890. ),
  891. _vm.emptyText &&
  892. (!_vm.allowCreate ||
  893. _vm.loading ||
  894. (_vm.allowCreate && _vm.options.length === 0))
  895. ? [
  896. _vm.$slots.empty
  897. ? _vm._t("empty")
  898. : _c("p", { staticClass: "el-select-dropdown__empty" }, [
  899. _vm._v(
  900. "\n " +
  901. _vm._s(_vm.emptyText) +
  902. "\n "
  903. )
  904. ])
  905. ]
  906. : _vm._e()
  907. ],
  908. 2
  909. )
  910. ],
  911. 1
  912. )
  913. ],
  914. 1
  915. )
  916. }
  917. var staticRenderFns = []
  918. render._withStripped = true
  919. // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
  920. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  921. var emitter_ = __webpack_require__(4);
  922. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  923. // EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
  924. var focus_ = __webpack_require__(22);
  925. var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
  926. // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
  927. var locale_ = __webpack_require__(6);
  928. var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
  929. // EXTERNAL MODULE: external "element-ui/lib/input"
  930. var input_ = __webpack_require__(10);
  931. var input_default = /*#__PURE__*/__webpack_require__.n(input_);
  932. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
  933. var select_dropdownvue_type_template_id_06828748_render = function() {
  934. var _vm = this
  935. var _h = _vm.$createElement
  936. var _c = _vm._self._c || _h
  937. return _c(
  938. "div",
  939. {
  940. staticClass: "el-select-dropdown el-popper",
  941. class: [{ "is-multiple": _vm.$parent.multiple }, _vm.popperClass],
  942. style: { minWidth: _vm.minWidth }
  943. },
  944. [_vm._t("default")],
  945. 2
  946. )
  947. }
  948. var select_dropdownvue_type_template_id_06828748_staticRenderFns = []
  949. select_dropdownvue_type_template_id_06828748_render._withStripped = true
  950. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
  951. // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
  952. var vue_popper_ = __webpack_require__(5);
  953. var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
  954. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
  955. //
  956. //
  957. //
  958. //
  959. //
  960. //
  961. //
  962. //
  963. //
  964. /* harmony default export */ var select_dropdownvue_type_script_lang_js_ = ({
  965. name: 'ElSelectDropdown',
  966. componentName: 'ElSelectDropdown',
  967. mixins: [vue_popper_default.a],
  968. props: {
  969. placement: {
  970. default: 'bottom-start'
  971. },
  972. boundariesPadding: {
  973. default: 0
  974. },
  975. popperOptions: {
  976. default: function _default() {
  977. return {
  978. gpuAcceleration: false
  979. };
  980. }
  981. },
  982. visibleArrow: {
  983. default: true
  984. },
  985. appendToBody: {
  986. type: Boolean,
  987. default: true
  988. }
  989. },
  990. data: function data() {
  991. return {
  992. minWidth: ''
  993. };
  994. },
  995. computed: {
  996. popperClass: function popperClass() {
  997. return this.$parent.popperClass;
  998. }
  999. },
  1000. watch: {
  1001. '$parent.inputWidth': function $parentInputWidth() {
  1002. this.minWidth = this.$parent.$el.getBoundingClientRect().width + 'px';
  1003. }
  1004. },
  1005. mounted: function mounted() {
  1006. var _this = this;
  1007. this.referenceElm = this.$parent.$refs.reference.$el;
  1008. this.$parent.popperElm = this.popperElm = this.$el;
  1009. this.$on('updatePopper', function () {
  1010. if (_this.$parent.visible) _this.updatePopper();
  1011. });
  1012. this.$on('destroyPopper', this.destroyPopper);
  1013. }
  1014. });
  1015. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
  1016. /* harmony default export */ var src_select_dropdownvue_type_script_lang_js_ = (select_dropdownvue_type_script_lang_js_);
  1017. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1018. var componentNormalizer = __webpack_require__(0);
  1019. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue
  1020. /* normalize component */
  1021. var component = Object(componentNormalizer["a" /* default */])(
  1022. src_select_dropdownvue_type_script_lang_js_,
  1023. select_dropdownvue_type_template_id_06828748_render,
  1024. select_dropdownvue_type_template_id_06828748_staticRenderFns,
  1025. false,
  1026. null,
  1027. null,
  1028. null
  1029. )
  1030. /* hot reload */
  1031. if (false) { var api; }
  1032. component.options.__file = "packages/select/src/select-dropdown.vue"
  1033. /* harmony default export */ var select_dropdown = (component.exports);
  1034. // EXTERNAL MODULE: ./packages/select/src/option.vue + 4 modules
  1035. var src_option = __webpack_require__(33);
  1036. // EXTERNAL MODULE: external "element-ui/lib/tag"
  1037. var tag_ = __webpack_require__(37);
  1038. var tag_default = /*#__PURE__*/__webpack_require__.n(tag_);
  1039. // EXTERNAL MODULE: external "element-ui/lib/scrollbar"
  1040. var scrollbar_ = __webpack_require__(15);
  1041. var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
  1042. // EXTERNAL MODULE: external "throttle-debounce/debounce"
  1043. var debounce_ = __webpack_require__(19);
  1044. var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
  1045. // EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
  1046. var clickoutside_ = __webpack_require__(12);
  1047. var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
  1048. // EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
  1049. var resize_event_ = __webpack_require__(16);
  1050. // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
  1051. var scroll_into_view_ = __webpack_require__(31);
  1052. var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
  1053. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  1054. var util_ = __webpack_require__(3);
  1055. // CONCATENATED MODULE: ./packages/select/src/navigation-mixin.js
  1056. /* harmony default export */ var navigation_mixin = ({
  1057. data: function data() {
  1058. return {
  1059. hoverOption: -1
  1060. };
  1061. },
  1062. computed: {
  1063. optionsAllDisabled: function optionsAllDisabled() {
  1064. return this.options.filter(function (option) {
  1065. return option.visible;
  1066. }).every(function (option) {
  1067. return option.disabled;
  1068. });
  1069. }
  1070. },
  1071. watch: {
  1072. hoverIndex: function hoverIndex(val) {
  1073. var _this = this;
  1074. if (typeof val === 'number' && val > -1) {
  1075. this.hoverOption = this.options[val] || {};
  1076. }
  1077. this.options.forEach(function (option) {
  1078. option.hover = _this.hoverOption === option;
  1079. });
  1080. }
  1081. },
  1082. methods: {
  1083. navigateOptions: function navigateOptions(direction) {
  1084. var _this2 = this;
  1085. if (!this.visible) {
  1086. this.visible = true;
  1087. return;
  1088. }
  1089. if (this.options.length === 0 || this.filteredOptionsCount === 0) return;
  1090. if (!this.optionsAllDisabled) {
  1091. if (direction === 'next') {
  1092. this.hoverIndex++;
  1093. if (this.hoverIndex === this.options.length) {
  1094. this.hoverIndex = 0;
  1095. }
  1096. } else if (direction === 'prev') {
  1097. this.hoverIndex--;
  1098. if (this.hoverIndex < 0) {
  1099. this.hoverIndex = this.options.length - 1;
  1100. }
  1101. }
  1102. var option = this.options[this.hoverIndex];
  1103. if (option.disabled === true || option.groupDisabled === true || !option.visible) {
  1104. this.navigateOptions(direction);
  1105. }
  1106. this.$nextTick(function () {
  1107. return _this2.scrollToOption(_this2.hoverOption);
  1108. });
  1109. }
  1110. }
  1111. }
  1112. });
  1113. // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
  1114. var shared_ = __webpack_require__(21);
  1115. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js&
  1116. //
  1117. //
  1118. //
  1119. //
  1120. //
  1121. //
  1122. //
  1123. //
  1124. //
  1125. //
  1126. //
  1127. //
  1128. //
  1129. //
  1130. //
  1131. //
  1132. //
  1133. //
  1134. //
  1135. //
  1136. //
  1137. //
  1138. //
  1139. //
  1140. //
  1141. //
  1142. //
  1143. //
  1144. //
  1145. //
  1146. //
  1147. //
  1148. //
  1149. //
  1150. //
  1151. //
  1152. //
  1153. //
  1154. //
  1155. //
  1156. //
  1157. //
  1158. //
  1159. //
  1160. //
  1161. //
  1162. //
  1163. //
  1164. //
  1165. //
  1166. //
  1167. //
  1168. //
  1169. //
  1170. //
  1171. //
  1172. //
  1173. //
  1174. //
  1175. //
  1176. //
  1177. //
  1178. //
  1179. //
  1180. //
  1181. //
  1182. //
  1183. //
  1184. //
  1185. //
  1186. //
  1187. //
  1188. //
  1189. //
  1190. //
  1191. //
  1192. //
  1193. //
  1194. //
  1195. //
  1196. //
  1197. //
  1198. //
  1199. //
  1200. //
  1201. //
  1202. //
  1203. //
  1204. //
  1205. //
  1206. //
  1207. //
  1208. //
  1209. //
  1210. //
  1211. //
  1212. //
  1213. //
  1214. //
  1215. //
  1216. //
  1217. //
  1218. //
  1219. //
  1220. //
  1221. //
  1222. //
  1223. //
  1224. //
  1225. //
  1226. //
  1227. //
  1228. //
  1229. //
  1230. //
  1231. //
  1232. //
  1233. //
  1234. //
  1235. //
  1236. //
  1237. //
  1238. //
  1239. //
  1240. //
  1241. //
  1242. //
  1243. //
  1244. //
  1245. //
  1246. //
  1247. //
  1248. //
  1249. //
  1250. //
  1251. //
  1252. //
  1253. /* harmony default export */ var selectvue_type_script_lang_js_ = ({
  1254. mixins: [emitter_default.a, locale_default.a, focus_default()('reference'), navigation_mixin],
  1255. name: 'ElSelect',
  1256. componentName: 'ElSelect',
  1257. inject: {
  1258. elForm: {
  1259. default: ''
  1260. },
  1261. elFormItem: {
  1262. default: ''
  1263. }
  1264. },
  1265. provide: function provide() {
  1266. return {
  1267. 'select': this
  1268. };
  1269. },
  1270. computed: {
  1271. _elFormItemSize: function _elFormItemSize() {
  1272. return (this.elFormItem || {}).elFormItemSize;
  1273. },
  1274. readonly: function readonly() {
  1275. return !this.filterable || this.multiple || !Object(util_["isIE"])() && !Object(util_["isEdge"])() && !this.visible;
  1276. },
  1277. showClose: function showClose() {
  1278. var hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== undefined && this.value !== null && this.value !== '';
  1279. var criteria = this.clearable && !this.selectDisabled && this.inputHovering && hasValue;
  1280. return criteria;
  1281. },
  1282. iconClass: function iconClass() {
  1283. return this.remote && this.filterable ? '' : this.visible ? 'arrow-up is-reverse' : 'arrow-up';
  1284. },
  1285. debounce: function debounce() {
  1286. return this.remote ? 300 : 0;
  1287. },
  1288. emptyText: function emptyText() {
  1289. if (this.loading) {
  1290. return this.loadingText || this.t('el.select.loading');
  1291. } else {
  1292. if (this.remote && this.query === '' && this.options.length === 0) return false;
  1293. if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
  1294. return this.noMatchText || this.t('el.select.noMatch');
  1295. }
  1296. if (this.options.length === 0) {
  1297. return this.noDataText || this.t('el.select.noData');
  1298. }
  1299. }
  1300. return null;
  1301. },
  1302. showNewOption: function showNewOption() {
  1303. var _this = this;
  1304. var hasExistingOption = this.options.filter(function (option) {
  1305. return !option.created;
  1306. }).some(function (option) {
  1307. return option.currentLabel === _this.query;
  1308. });
  1309. return this.filterable && this.allowCreate && this.query !== '' && !hasExistingOption;
  1310. },
  1311. selectSize: function selectSize() {
  1312. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  1313. },
  1314. selectDisabled: function selectDisabled() {
  1315. return this.disabled || (this.elForm || {}).disabled;
  1316. },
  1317. collapseTagSize: function collapseTagSize() {
  1318. return ['small', 'mini'].indexOf(this.selectSize) > -1 ? 'mini' : 'small';
  1319. },
  1320. propPlaceholder: function propPlaceholder() {
  1321. return typeof this.placeholder !== 'undefined' ? this.placeholder : this.t('el.select.placeholder');
  1322. }
  1323. },
  1324. components: {
  1325. ElInput: input_default.a,
  1326. ElSelectMenu: select_dropdown,
  1327. ElOption: src_option["a" /* default */],
  1328. ElTag: tag_default.a,
  1329. ElScrollbar: scrollbar_default.a
  1330. },
  1331. directives: { Clickoutside: clickoutside_default.a },
  1332. props: {
  1333. name: String,
  1334. id: String,
  1335. value: {
  1336. required: true
  1337. },
  1338. autocomplete: {
  1339. type: String,
  1340. default: 'off'
  1341. },
  1342. /** @Deprecated in next major version */
  1343. autoComplete: {
  1344. type: String,
  1345. validator: function validator(val) {
  1346. false && false;
  1347. return true;
  1348. }
  1349. },
  1350. automaticDropdown: Boolean,
  1351. size: String,
  1352. disabled: Boolean,
  1353. clearable: Boolean,
  1354. filterable: Boolean,
  1355. allowCreate: Boolean,
  1356. loading: Boolean,
  1357. popperClass: String,
  1358. remote: Boolean,
  1359. loadingText: String,
  1360. noMatchText: String,
  1361. noDataText: String,
  1362. remoteMethod: Function,
  1363. filterMethod: Function,
  1364. multiple: Boolean,
  1365. multipleLimit: {
  1366. type: Number,
  1367. default: 0
  1368. },
  1369. placeholder: {
  1370. type: String,
  1371. required: false
  1372. },
  1373. defaultFirstOption: Boolean,
  1374. reserveKeyword: Boolean,
  1375. valueKey: {
  1376. type: String,
  1377. default: 'value'
  1378. },
  1379. collapseTags: Boolean,
  1380. popperAppendToBody: {
  1381. type: Boolean,
  1382. default: true
  1383. }
  1384. },
  1385. data: function data() {
  1386. return {
  1387. options: [],
  1388. cachedOptions: [],
  1389. createdLabel: null,
  1390. createdSelected: false,
  1391. selected: this.multiple ? [] : {},
  1392. inputLength: 20,
  1393. inputWidth: 0,
  1394. initialInputHeight: 0,
  1395. cachedPlaceHolder: '',
  1396. optionsCount: 0,
  1397. filteredOptionsCount: 0,
  1398. visible: false,
  1399. softFocus: false,
  1400. selectedLabel: '',
  1401. hoverIndex: -1,
  1402. query: '',
  1403. previousQuery: null,
  1404. inputHovering: false,
  1405. currentPlaceholder: '',
  1406. menuVisibleOnFocus: false,
  1407. isOnComposition: false,
  1408. isSilentBlur: false
  1409. };
  1410. },
  1411. watch: {
  1412. selectDisabled: function selectDisabled() {
  1413. var _this2 = this;
  1414. this.$nextTick(function () {
  1415. _this2.resetInputHeight();
  1416. });
  1417. },
  1418. propPlaceholder: function propPlaceholder(val) {
  1419. this.cachedPlaceHolder = this.currentPlaceholder = val;
  1420. },
  1421. value: function value(val, oldVal) {
  1422. if (this.multiple) {
  1423. this.resetInputHeight();
  1424. if (val && val.length > 0 || this.$refs.input && this.query !== '') {
  1425. this.currentPlaceholder = '';
  1426. } else {
  1427. this.currentPlaceholder = this.cachedPlaceHolder;
  1428. }
  1429. if (this.filterable && !this.reserveKeyword) {
  1430. this.query = '';
  1431. this.handleQueryChange(this.query);
  1432. }
  1433. }
  1434. this.setSelected();
  1435. if (this.filterable && !this.multiple) {
  1436. this.inputLength = 20;
  1437. }
  1438. if (!Object(util_["valueEquals"])(val, oldVal)) {
  1439. this.dispatch('ElFormItem', 'el.form.change', val);
  1440. }
  1441. },
  1442. visible: function visible(val) {
  1443. var _this3 = this;
  1444. if (!val) {
  1445. this.broadcast('ElSelectDropdown', 'destroyPopper');
  1446. if (this.$refs.input) {
  1447. this.$refs.input.blur();
  1448. }
  1449. this.query = '';
  1450. this.previousQuery = null;
  1451. this.selectedLabel = '';
  1452. this.inputLength = 20;
  1453. this.menuVisibleOnFocus = false;
  1454. this.resetHoverIndex();
  1455. this.$nextTick(function () {
  1456. if (_this3.$refs.input && _this3.$refs.input.value === '' && _this3.selected.length === 0) {
  1457. _this3.currentPlaceholder = _this3.cachedPlaceHolder;
  1458. }
  1459. });
  1460. if (!this.multiple) {
  1461. if (this.selected) {
  1462. if (this.filterable && this.allowCreate && this.createdSelected && this.createdLabel) {
  1463. this.selectedLabel = this.createdLabel;
  1464. } else {
  1465. this.selectedLabel = this.selected.currentLabel;
  1466. }
  1467. if (this.filterable) this.query = this.selectedLabel;
  1468. }
  1469. if (this.filterable) {
  1470. this.currentPlaceholder = this.cachedPlaceHolder;
  1471. }
  1472. }
  1473. } else {
  1474. this.broadcast('ElSelectDropdown', 'updatePopper');
  1475. if (this.filterable) {
  1476. this.query = this.remote ? '' : this.selectedLabel;
  1477. this.handleQueryChange(this.query);
  1478. if (this.multiple) {
  1479. this.$refs.input.focus();
  1480. } else {
  1481. if (!this.remote) {
  1482. this.broadcast('ElOption', 'queryChange', '');
  1483. this.broadcast('ElOptionGroup', 'queryChange');
  1484. }
  1485. if (this.selectedLabel) {
  1486. this.currentPlaceholder = this.selectedLabel;
  1487. this.selectedLabel = '';
  1488. }
  1489. }
  1490. }
  1491. }
  1492. this.$emit('visible-change', val);
  1493. },
  1494. options: function options() {
  1495. var _this4 = this;
  1496. if (this.$isServer) return;
  1497. this.$nextTick(function () {
  1498. _this4.broadcast('ElSelectDropdown', 'updatePopper');
  1499. });
  1500. if (this.multiple) {
  1501. this.resetInputHeight();
  1502. }
  1503. var inputs = this.$el.querySelectorAll('input');
  1504. if ([].indexOf.call(inputs, document.activeElement) === -1) {
  1505. this.setSelected();
  1506. }
  1507. if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
  1508. this.checkDefaultFirstOption();
  1509. }
  1510. }
  1511. },
  1512. methods: {
  1513. handleNavigate: function handleNavigate(direction) {
  1514. if (this.isOnComposition) return;
  1515. this.navigateOptions(direction);
  1516. },
  1517. handleComposition: function handleComposition(event) {
  1518. var _this5 = this;
  1519. var text = event.target.value;
  1520. if (event.type === 'compositionend') {
  1521. this.isOnComposition = false;
  1522. this.$nextTick(function (_) {
  1523. return _this5.handleQueryChange(text);
  1524. });
  1525. } else {
  1526. var lastCharacter = text[text.length - 1] || '';
  1527. this.isOnComposition = !Object(shared_["isKorean"])(lastCharacter);
  1528. }
  1529. },
  1530. handleQueryChange: function handleQueryChange(val) {
  1531. var _this6 = this;
  1532. if (this.previousQuery === val || this.isOnComposition) return;
  1533. if (this.previousQuery === null && (typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')) {
  1534. this.previousQuery = val;
  1535. return;
  1536. }
  1537. this.previousQuery = val;
  1538. this.$nextTick(function () {
  1539. if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper');
  1540. });
  1541. this.hoverIndex = -1;
  1542. if (this.multiple && this.filterable) {
  1543. this.$nextTick(function () {
  1544. var length = _this6.$refs.input.value.length * 15 + 20;
  1545. _this6.inputLength = _this6.collapseTags ? Math.min(50, length) : length;
  1546. _this6.managePlaceholder();
  1547. _this6.resetInputHeight();
  1548. });
  1549. }
  1550. if (this.remote && typeof this.remoteMethod === 'function') {
  1551. this.hoverIndex = -1;
  1552. this.remoteMethod(val);
  1553. } else if (typeof this.filterMethod === 'function') {
  1554. this.filterMethod(val);
  1555. this.broadcast('ElOptionGroup', 'queryChange');
  1556. } else {
  1557. this.filteredOptionsCount = this.optionsCount;
  1558. this.broadcast('ElOption', 'queryChange', val);
  1559. this.broadcast('ElOptionGroup', 'queryChange');
  1560. }
  1561. if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
  1562. this.checkDefaultFirstOption();
  1563. }
  1564. },
  1565. scrollToOption: function scrollToOption(option) {
  1566. var target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;
  1567. if (this.$refs.popper && target) {
  1568. var menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
  1569. scroll_into_view_default()(menu, target);
  1570. }
  1571. this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
  1572. },
  1573. handleMenuEnter: function handleMenuEnter() {
  1574. var _this7 = this;
  1575. this.$nextTick(function () {
  1576. return _this7.scrollToOption(_this7.selected);
  1577. });
  1578. },
  1579. emitChange: function emitChange(val) {
  1580. if (!Object(util_["valueEquals"])(this.value, val)) {
  1581. this.$emit('change', val);
  1582. }
  1583. },
  1584. getOption: function getOption(value) {
  1585. var option = void 0;
  1586. var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
  1587. var isNull = Object.prototype.toString.call(value).toLowerCase() === '[object null]';
  1588. var isUndefined = Object.prototype.toString.call(value).toLowerCase() === '[object undefined]';
  1589. for (var i = this.cachedOptions.length - 1; i >= 0; i--) {
  1590. var cachedOption = this.cachedOptions[i];
  1591. var isEqual = isObject ? Object(util_["getValueByPath"])(cachedOption.value, this.valueKey) === Object(util_["getValueByPath"])(value, this.valueKey) : cachedOption.value === value;
  1592. if (isEqual) {
  1593. option = cachedOption;
  1594. break;
  1595. }
  1596. }
  1597. if (option) return option;
  1598. var label = !isObject && !isNull && !isUndefined ? String(value) : '';
  1599. var newOption = {
  1600. value: value,
  1601. currentLabel: label
  1602. };
  1603. if (this.multiple) {
  1604. newOption.hitState = false;
  1605. }
  1606. return newOption;
  1607. },
  1608. setSelected: function setSelected() {
  1609. var _this8 = this;
  1610. if (!this.multiple) {
  1611. var option = this.getOption(this.value);
  1612. if (option.created) {
  1613. this.createdLabel = option.currentLabel;
  1614. this.createdSelected = true;
  1615. } else {
  1616. this.createdSelected = false;
  1617. }
  1618. this.selectedLabel = option.currentLabel;
  1619. this.selected = option;
  1620. if (this.filterable) this.query = this.selectedLabel;
  1621. return;
  1622. }
  1623. var result = [];
  1624. if (Array.isArray(this.value)) {
  1625. this.value.forEach(function (value) {
  1626. result.push(_this8.getOption(value));
  1627. });
  1628. }
  1629. this.selected = result;
  1630. this.$nextTick(function () {
  1631. _this8.resetInputHeight();
  1632. });
  1633. },
  1634. handleFocus: function handleFocus(event) {
  1635. if (!this.softFocus) {
  1636. if (this.automaticDropdown || this.filterable) {
  1637. if (this.filterable && !this.visible) {
  1638. this.menuVisibleOnFocus = true;
  1639. }
  1640. this.visible = true;
  1641. }
  1642. this.$emit('focus', event);
  1643. } else {
  1644. this.softFocus = false;
  1645. }
  1646. },
  1647. blur: function blur() {
  1648. this.visible = false;
  1649. this.$refs.reference.blur();
  1650. },
  1651. handleBlur: function handleBlur(event) {
  1652. var _this9 = this;
  1653. setTimeout(function () {
  1654. if (_this9.isSilentBlur) {
  1655. _this9.isSilentBlur = false;
  1656. } else {
  1657. _this9.$emit('blur', event);
  1658. }
  1659. }, 50);
  1660. this.softFocus = false;
  1661. },
  1662. handleClearClick: function handleClearClick(event) {
  1663. this.deleteSelected(event);
  1664. },
  1665. doDestroy: function doDestroy() {
  1666. this.$refs.popper && this.$refs.popper.doDestroy();
  1667. },
  1668. handleClose: function handleClose() {
  1669. this.visible = false;
  1670. },
  1671. toggleLastOptionHitState: function toggleLastOptionHitState(hit) {
  1672. if (!Array.isArray(this.selected)) return;
  1673. var option = this.selected[this.selected.length - 1];
  1674. if (!option) return;
  1675. if (hit === true || hit === false) {
  1676. option.hitState = hit;
  1677. return hit;
  1678. }
  1679. option.hitState = !option.hitState;
  1680. return option.hitState;
  1681. },
  1682. deletePrevTag: function deletePrevTag(e) {
  1683. if (e.target.value.length <= 0 && !this.toggleLastOptionHitState()) {
  1684. var value = this.value.slice();
  1685. value.pop();
  1686. this.$emit('input', value);
  1687. this.emitChange(value);
  1688. }
  1689. },
  1690. managePlaceholder: function managePlaceholder() {
  1691. if (this.currentPlaceholder !== '') {
  1692. this.currentPlaceholder = this.$refs.input.value ? '' : this.cachedPlaceHolder;
  1693. }
  1694. },
  1695. resetInputState: function resetInputState(e) {
  1696. if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
  1697. this.inputLength = this.$refs.input.value.length * 15 + 20;
  1698. this.resetInputHeight();
  1699. },
  1700. resetInputHeight: function resetInputHeight() {
  1701. var _this10 = this;
  1702. if (this.collapseTags && !this.filterable) return;
  1703. this.$nextTick(function () {
  1704. if (!_this10.$refs.reference) return;
  1705. var inputChildNodes = _this10.$refs.reference.$el.childNodes;
  1706. var input = [].filter.call(inputChildNodes, function (item) {
  1707. return item.tagName === 'INPUT';
  1708. })[0];
  1709. var tags = _this10.$refs.tags;
  1710. var tagsHeight = tags ? Math.round(tags.getBoundingClientRect().height) : 0;
  1711. var sizeInMap = _this10.initialInputHeight || 40;
  1712. input.style.height = _this10.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tagsHeight + (tagsHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
  1713. if (_this10.visible && _this10.emptyText !== false) {
  1714. _this10.broadcast('ElSelectDropdown', 'updatePopper');
  1715. }
  1716. });
  1717. },
  1718. resetHoverIndex: function resetHoverIndex() {
  1719. var _this11 = this;
  1720. setTimeout(function () {
  1721. if (!_this11.multiple) {
  1722. _this11.hoverIndex = _this11.options.indexOf(_this11.selected);
  1723. } else {
  1724. if (_this11.selected.length > 0) {
  1725. _this11.hoverIndex = Math.min.apply(null, _this11.selected.map(function (item) {
  1726. return _this11.options.indexOf(item);
  1727. }));
  1728. } else {
  1729. _this11.hoverIndex = -1;
  1730. }
  1731. }
  1732. }, 300);
  1733. },
  1734. handleOptionSelect: function handleOptionSelect(option, byClick) {
  1735. var _this12 = this;
  1736. if (this.multiple) {
  1737. var value = (this.value || []).slice();
  1738. var optionIndex = this.getValueIndex(value, option.value);
  1739. if (optionIndex > -1) {
  1740. value.splice(optionIndex, 1);
  1741. } else if (this.multipleLimit <= 0 || value.length < this.multipleLimit) {
  1742. value.push(option.value);
  1743. }
  1744. this.$emit('input', value);
  1745. this.emitChange(value);
  1746. if (option.created) {
  1747. this.query = '';
  1748. this.handleQueryChange('');
  1749. this.inputLength = 20;
  1750. }
  1751. if (this.filterable) this.$refs.input.focus();
  1752. } else {
  1753. this.$emit('input', option.value);
  1754. this.emitChange(option.value);
  1755. this.visible = false;
  1756. }
  1757. this.isSilentBlur = byClick;
  1758. this.setSoftFocus();
  1759. if (this.visible) return;
  1760. this.$nextTick(function () {
  1761. _this12.scrollToOption(option);
  1762. });
  1763. },
  1764. setSoftFocus: function setSoftFocus() {
  1765. this.softFocus = true;
  1766. var input = this.$refs.input || this.$refs.reference;
  1767. if (input) {
  1768. input.focus();
  1769. }
  1770. },
  1771. getValueIndex: function getValueIndex() {
  1772. var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  1773. var value = arguments[1];
  1774. var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
  1775. if (!isObject) {
  1776. return arr.indexOf(value);
  1777. } else {
  1778. var valueKey = this.valueKey;
  1779. var index = -1;
  1780. arr.some(function (item, i) {
  1781. if (Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(value, valueKey)) {
  1782. index = i;
  1783. return true;
  1784. }
  1785. return false;
  1786. });
  1787. return index;
  1788. }
  1789. },
  1790. toggleMenu: function toggleMenu() {
  1791. if (!this.selectDisabled) {
  1792. if (this.menuVisibleOnFocus) {
  1793. this.menuVisibleOnFocus = false;
  1794. } else {
  1795. this.visible = !this.visible;
  1796. }
  1797. if (this.visible) {
  1798. (this.$refs.input || this.$refs.reference).focus();
  1799. }
  1800. }
  1801. },
  1802. selectOption: function selectOption() {
  1803. if (!this.visible) {
  1804. this.toggleMenu();
  1805. } else {
  1806. if (this.options[this.hoverIndex]) {
  1807. this.handleOptionSelect(this.options[this.hoverIndex]);
  1808. }
  1809. }
  1810. },
  1811. deleteSelected: function deleteSelected(event) {
  1812. event.stopPropagation();
  1813. var value = this.multiple ? [] : '';
  1814. this.$emit('input', value);
  1815. this.emitChange(value);
  1816. this.visible = false;
  1817. this.$emit('clear');
  1818. },
  1819. deleteTag: function deleteTag(event, tag) {
  1820. var index = this.selected.indexOf(tag);
  1821. if (index > -1 && !this.selectDisabled) {
  1822. var value = this.value.slice();
  1823. value.splice(index, 1);
  1824. this.$emit('input', value);
  1825. this.emitChange(value);
  1826. this.$emit('remove-tag', tag.value);
  1827. }
  1828. event.stopPropagation();
  1829. },
  1830. onInputChange: function onInputChange() {
  1831. if (this.filterable && this.query !== this.selectedLabel) {
  1832. this.query = this.selectedLabel;
  1833. this.handleQueryChange(this.query);
  1834. }
  1835. },
  1836. onOptionDestroy: function onOptionDestroy(index) {
  1837. if (index > -1) {
  1838. this.optionsCount--;
  1839. this.filteredOptionsCount--;
  1840. this.options.splice(index, 1);
  1841. }
  1842. },
  1843. resetInputWidth: function resetInputWidth() {
  1844. this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
  1845. },
  1846. handleResize: function handleResize() {
  1847. this.resetInputWidth();
  1848. if (this.multiple) this.resetInputHeight();
  1849. },
  1850. checkDefaultFirstOption: function checkDefaultFirstOption() {
  1851. this.hoverIndex = -1;
  1852. // highlight the created option
  1853. var hasCreated = false;
  1854. for (var i = this.options.length - 1; i >= 0; i--) {
  1855. if (this.options[i].created) {
  1856. hasCreated = true;
  1857. this.hoverIndex = i;
  1858. break;
  1859. }
  1860. }
  1861. if (hasCreated) return;
  1862. for (var _i = 0; _i !== this.options.length; ++_i) {
  1863. var option = this.options[_i];
  1864. if (this.query) {
  1865. // highlight first options that passes the filter
  1866. if (!option.disabled && !option.groupDisabled && option.visible) {
  1867. this.hoverIndex = _i;
  1868. break;
  1869. }
  1870. } else {
  1871. // highlight currently selected option
  1872. if (option.itemSelected) {
  1873. this.hoverIndex = _i;
  1874. break;
  1875. }
  1876. }
  1877. }
  1878. },
  1879. getValueKey: function getValueKey(item) {
  1880. if (Object.prototype.toString.call(item.value).toLowerCase() !== '[object object]') {
  1881. return item.value;
  1882. } else {
  1883. return Object(util_["getValueByPath"])(item.value, this.valueKey);
  1884. }
  1885. }
  1886. },
  1887. created: function created() {
  1888. var _this13 = this;
  1889. this.cachedPlaceHolder = this.currentPlaceholder = this.propPlaceholder;
  1890. if (this.multiple && !Array.isArray(this.value)) {
  1891. this.$emit('input', []);
  1892. }
  1893. if (!this.multiple && Array.isArray(this.value)) {
  1894. this.$emit('input', '');
  1895. }
  1896. this.debouncedOnInputChange = debounce_default()(this.debounce, function () {
  1897. _this13.onInputChange();
  1898. });
  1899. this.debouncedQueryChange = debounce_default()(this.debounce, function (e) {
  1900. _this13.handleQueryChange(e.target.value);
  1901. });
  1902. this.$on('handleOptionClick', this.handleOptionSelect);
  1903. this.$on('setSelected', this.setSelected);
  1904. },
  1905. mounted: function mounted() {
  1906. var _this14 = this;
  1907. if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
  1908. this.currentPlaceholder = '';
  1909. }
  1910. Object(resize_event_["addResizeListener"])(this.$el, this.handleResize);
  1911. var reference = this.$refs.reference;
  1912. if (reference && reference.$el) {
  1913. var sizeMap = {
  1914. medium: 36,
  1915. small: 32,
  1916. mini: 28
  1917. };
  1918. var input = reference.$el.querySelector('input');
  1919. this.initialInputHeight = input.getBoundingClientRect().height || sizeMap[this.selectSize];
  1920. }
  1921. if (this.remote && this.multiple) {
  1922. this.resetInputHeight();
  1923. }
  1924. this.$nextTick(function () {
  1925. if (reference && reference.$el) {
  1926. _this14.inputWidth = reference.$el.getBoundingClientRect().width;
  1927. }
  1928. });
  1929. this.setSelected();
  1930. },
  1931. beforeDestroy: function beforeDestroy() {
  1932. if (this.$el && this.handleResize) Object(resize_event_["removeResizeListener"])(this.$el, this.handleResize);
  1933. }
  1934. });
  1935. // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js&
  1936. /* harmony default export */ var src_selectvue_type_script_lang_js_ = (selectvue_type_script_lang_js_);
  1937. // CONCATENATED MODULE: ./packages/select/src/select.vue
  1938. /* normalize component */
  1939. var select_component = Object(componentNormalizer["a" /* default */])(
  1940. src_selectvue_type_script_lang_js_,
  1941. render,
  1942. staticRenderFns,
  1943. false,
  1944. null,
  1945. null,
  1946. null
  1947. )
  1948. /* hot reload */
  1949. if (false) { var select_api; }
  1950. select_component.options.__file = "packages/select/src/select.vue"
  1951. /* harmony default export */ var src_select = (select_component.exports);
  1952. // CONCATENATED MODULE: ./packages/select/index.js
  1953. /* istanbul ignore next */
  1954. src_select.install = function (Vue) {
  1955. Vue.component(src_select.name, src_select);
  1956. };
  1957. /* harmony default export */ var packages_select = __webpack_exports__["default"] = (src_select);
  1958. /***/ })
  1959. /******/ });