Sort items by type:
and/or
@@ -53,6 +65,7 @@ export default {
selectedCat: this.categories[0],
selectedTags: [],
searchedWords: [],
+ selectedInput: 0,
}
},
computed: {
@@ -81,6 +94,29 @@ export default {
value: text,
})
},
+ focusOnSubmit() {
+ this.$refs.select2.focus()
+ },
+ handleKeyUp(switcher) {
+ const futureFocus = this.selectedInput + switcher
+ let futureIndex = 2
+
+ if (switcher === -1) {
+ futureIndex = futureFocus >= 0 ? futureFocus : 2
+ } else {
+ futureIndex = futureFocus <= 2 ? futureFocus : 0
+ }
+
+ if (futureIndex === 2) {
+ this.focusOnSubmit()
+ this.selectedInput = 2
+ } else {
+ this.$refs['select' + futureIndex].$el.focus()
+ }
+ },
+ setSelected(index) {
+ this.selectedInput = index
+ },
},
}
diff --git a/src/.vuepress/theme/layouts/Blog.vue b/src/.vuepress/theme/layouts/Blog.vue
index 305b7934..e3c3b9eb 100644
--- a/src/.vuepress/theme/layouts/Blog.vue
+++ b/src/.vuepress/theme/layouts/Blog.vue
@@ -34,7 +34,11 @@
/>