Commit 0d7d8b737947b326752da25214aa6a6b7d126622
Committed by
GitHub
Merge pull request #3566 from blackcater/pr/3565
feat: exposure `on-focus` and `on-blur` event in <AutoComplete>
Showing
2 changed files
with
50 additions
and
14 deletions
Show diff stats
src/components/auto-complete/auto-complete.vue
... | ... | @@ -150,11 +150,13 @@ |
150 | 150 | this.$refs.input.blur(); |
151 | 151 | this.$emit('on-select', val); |
152 | 152 | }, |
153 | - handleFocus () { | |
153 | + handleFocus (event) { | |
154 | 154 | this.$refs.select.visible = true; |
155 | + this.$emit('on-focus', event); | |
155 | 156 | }, |
156 | - handleBlur () { | |
157 | + handleBlur (event) { | |
157 | 158 | this.$refs.select.visible = false; |
159 | + this.$emit('on-blur', event); | |
158 | 160 | }, |
159 | 161 | handleClear () { |
160 | 162 | if (!this.clearable) return; | ... | ... |
yarn.lock
... | ... | @@ -1450,7 +1450,7 @@ bytes@3.0.0: |
1450 | 1450 | version "3.0.0" |
1451 | 1451 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" |
1452 | 1452 | |
1453 | -cacache@^10.0.1: | |
1453 | +cacache@^10.0.1, cacache@^10.0.4: | |
1454 | 1454 | version "10.0.4" |
1455 | 1455 | resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" |
1456 | 1456 | dependencies: |
... | ... | @@ -1859,6 +1859,10 @@ commander@^2.11.0, commander@^2.9.0: |
1859 | 1859 | version "2.15.0" |
1860 | 1860 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.0.tgz#ad2a23a1c3b036e392469b8012cec6b33b4c1322" |
1861 | 1861 | |
1862 | +commander@~2.13.0: | |
1863 | + version "2.13.0" | |
1864 | + resolved "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" | |
1865 | + | |
1862 | 1866 | commondir@^1.0.1: |
1863 | 1867 | version "1.0.1" |
1864 | 1868 | resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" |
... | ... | @@ -2675,7 +2679,7 @@ entities@^1.1.1, entities@~1.1.1: |
2675 | 2679 | version "1.1.1" |
2676 | 2680 | resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" |
2677 | 2681 | |
2678 | -errno@^0.1.1, errno@^0.1.3: | |
2682 | +errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: | |
2679 | 2683 | version "0.1.7" |
2680 | 2684 | resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" |
2681 | 2685 | dependencies: |
... | ... | @@ -6238,9 +6242,9 @@ pluralize@^1.2.1: |
6238 | 6242 | version "1.2.1" |
6239 | 6243 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" |
6240 | 6244 | |
6241 | -popper.js@^0.6.4: | |
6242 | - version "0.6.4" | |
6243 | - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-0.6.4.tgz#1837c4760af54d2bb20b66f9c09b92993d84c629" | |
6245 | +popper.js@^1.14.1: | |
6246 | + version "1.14.3" | |
6247 | + resolved "https://registry.npmjs.org/popper.js/-/popper.js-1.14.3.tgz#1438f98d046acf7b4d78cd502bf418ac64d4f095" | |
6244 | 6248 | |
6245 | 6249 | portfinder@^1.0.9: |
6246 | 6250 | version "1.0.13" |
... | ... | @@ -8134,6 +8138,13 @@ ua-parser-js@^0.7.9: |
8134 | 8138 | version "0.7.17" |
8135 | 8139 | resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" |
8136 | 8140 | |
8141 | +uglify-es@^3.3.4: | |
8142 | + version "3.3.9" | |
8143 | + resolved "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" | |
8144 | + dependencies: | |
8145 | + commander "~2.13.0" | |
8146 | + source-map "~0.6.1" | |
8147 | + | |
8137 | 8148 | uglify-js@2.6.x: |
8138 | 8149 | version "2.6.4" |
8139 | 8150 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.6.4.tgz#65ea2fb3059c9394692f15fed87c2b36c16b9adf" |
... | ... | @@ -8171,6 +8182,19 @@ uglifyjs-webpack-plugin@^0.4.6: |
8171 | 8182 | uglify-js "^2.8.29" |
8172 | 8183 | webpack-sources "^1.0.1" |
8173 | 8184 | |
8185 | +uglifyjs-webpack-plugin@^1.2.3: | |
8186 | + version "1.2.5" | |
8187 | + resolved "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz#2ef8387c8f1a903ec5e44fa36f9f3cbdcea67641" | |
8188 | + dependencies: | |
8189 | + cacache "^10.0.4" | |
8190 | + find-cache-dir "^1.0.0" | |
8191 | + schema-utils "^0.4.5" | |
8192 | + serialize-javascript "^1.4.0" | |
8193 | + source-map "^0.6.1" | |
8194 | + uglify-es "^3.3.4" | |
8195 | + webpack-sources "^1.1.0" | |
8196 | + worker-farm "^1.5.2" | |
8197 | + | |
8174 | 8198 | uid-number@^0.0.6: |
8175 | 8199 | version "0.0.6" |
8176 | 8200 | resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" |
... | ... | @@ -8350,6 +8374,10 @@ uws@~9.14.0: |
8350 | 8374 | version "9.14.0" |
8351 | 8375 | resolved "https://registry.yarnpkg.com/uws/-/uws-9.14.0.tgz#fac8386befc33a7a3705cbd58dc47b430ca4dd95" |
8352 | 8376 | |
8377 | +v-click-outside-x@^2.4.0: | |
8378 | + version "2.4.0" | |
8379 | + resolved "https://registry.npmjs.org/v-click-outside-x/-/v-click-outside-x-2.4.0.tgz#6b92c81dc62d99b07c80214f9b23528064221cbf" | |
8380 | + | |
8353 | 8381 | v8flags@^2.0.2, v8flags@^2.1.1: |
8354 | 8382 | version "2.1.1" |
8355 | 8383 | resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" |
... | ... | @@ -8466,9 +8494,9 @@ vue-style-loader@^4.0.1, vue-style-loader@^4.0.2: |
8466 | 8494 | hash-sum "^1.0.2" |
8467 | 8495 | loader-utils "^1.0.2" |
8468 | 8496 | |
8469 | -vue-template-compiler@^2.5.13: | |
8470 | - version "2.5.13" | |
8471 | - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.13.tgz#12a2aa0ecd6158ac5e5f14d294b0993f399c3d38" | |
8497 | +vue-template-compiler@^2.5.16: | |
8498 | + version "2.5.16" | |
8499 | + resolved "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.5.16.tgz#93b48570e56c720cdf3f051cc15287c26fbd04cb" | |
8472 | 8500 | dependencies: |
8473 | 8501 | de-indent "^1.0.2" |
8474 | 8502 | he "^1.1.0" |
... | ... | @@ -8477,9 +8505,9 @@ vue-template-es2015-compiler@^1.6.0: |
8477 | 8505 | version "1.6.0" |
8478 | 8506 | resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18" |
8479 | 8507 | |
8480 | -vue@^2.5.13: | |
8481 | - version "2.5.13" | |
8482 | - resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.13.tgz#95bd31e20efcf7a7f39239c9aa6787ce8cf578e1" | |
8508 | +vue@^2.5.16: | |
8509 | + version "2.5.16" | |
8510 | + resolved "https://registry.npmjs.org/vue/-/vue-2.5.16.tgz#07edb75e8412aaeed871ebafa99f4672584a0085" | |
8483 | 8511 | |
8484 | 8512 | watchpack@^1.4.0: |
8485 | 8513 | version "1.5.0" |
... | ... | @@ -8543,7 +8571,7 @@ webpack-merge@^3.0.0: |
8543 | 8571 | dependencies: |
8544 | 8572 | lodash "^4.17.4" |
8545 | 8573 | |
8546 | -webpack-sources@^1.0.1: | |
8574 | +webpack-sources@^1.0.1, webpack-sources@^1.1.0: | |
8547 | 8575 | version "1.1.0" |
8548 | 8576 | resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" |
8549 | 8577 | dependencies: |
... | ... | @@ -8636,6 +8664,12 @@ wordwrap@~0.0.2: |
8636 | 8664 | version "0.0.3" |
8637 | 8665 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" |
8638 | 8666 | |
8667 | +worker-farm@^1.5.2: | |
8668 | + version "1.6.0" | |
8669 | + resolved "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" | |
8670 | + dependencies: | |
8671 | + errno "~0.1.7" | |
8672 | + | |
8639 | 8673 | wrap-ansi@^2.0.0: |
8640 | 8674 | version "2.1.0" |
8641 | 8675 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" | ... | ... |