Update deps & fix lint issues

This commit is contained in:
Bastien Wirtz
2020-10-23 15:24:16 -07:00
parent c368290e32
commit ed8b17e0df
8 changed files with 1270 additions and 994 deletions

View File

@@ -6,8 +6,8 @@
ref="search"
:value="value"
@input="$emit('input', $event.target.value.toLowerCase())"
@keyup.enter.exact="$emit('search:open')"
@keyup.alt.enter="$emit('search:open', '_blank')"
@keyup.enter.exact="$emit('search-open')"
@keyup.alt.enter="$emit('search-open', '_blank')"
/>
</div>
</template>
@@ -20,7 +20,7 @@ export default {
this._keyListener = function (event) {
if (event.key === "/") {
event.preventDefault();
this.$emit("search:focus");
this.$emit("search-focus");
this.$nextTick(() => {
this.$refs.search.focus();
});
@@ -28,7 +28,7 @@ export default {
if (event.key === "Escape") {
this.$refs.search.value = "";
this.$refs.search.blur();
this.$emit("search:cancel");
this.$emit("search-cancel");
}
};
document.addEventListener("keydown", this._keyListener.bind(this));