diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2022-06-04 22:40:48 +0200 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2022-07-02 21:16:41 +0200 |
commit | cbbed6346a437e6b9f05f646f1df0c77d2fb36eb (patch) | |
tree | 50d887f10739036a374065ebea047f891ad223a7 /src/components | |
parent | 95c589ba71d80ed0073158bbb6f81ec449b058d6 (diff) | |
download | homer-cbbed6346a437e6b9f05f646f1df0c77d2fb36eb.tar.gz homer-cbbed6346a437e6b9f05f646f1df0c77d2fb36eb.tar.zst homer-cbbed6346a437e6b9f05f646f1df0c77d2fb36eb.zip |
Migrate to VueJS 3
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/SearchInput.vue | 2 | ||||
-rw-r--r-- | src/components/Service.vue | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue index 165c992..53480e7 100644 --- a/src/components/SearchInput.vue +++ b/src/components/SearchInput.vue | |||
@@ -75,7 +75,7 @@ export default { | |||
75 | this.$emit("input", value.toLowerCase()); | 75 | this.$emit("input", value.toLowerCase()); |
76 | }, | 76 | }, |
77 | }, | 77 | }, |
78 | beforeDestroy() { | 78 | beforeUnmount() { |
79 | document.removeEventListener("keydown", this._keyListener); | 79 | document.removeEventListener("keydown", this._keyListener); |
80 | }, | 80 | }, |
81 | }; | 81 | }; |
diff --git a/src/components/Service.vue b/src/components/Service.vue index 25b86d5..ac378ec 100644 --- a/src/components/Service.vue +++ b/src/components/Service.vue | |||
@@ -1,8 +1,9 @@ | |||
1 | <template> | 1 | <template> |
2 | <component v-bind:is="component" :item="item" :proxy="proxy"></component> | 2 | <component :is="component" :item="item" :proxy="proxy"></component> |
3 | </template> | 3 | </template> |
4 | 4 | ||
5 | <script> | 5 | <script> |
6 | import { defineAsyncComponent } from "vue"; | ||
6 | import Generic from "./services/Generic.vue"; | 7 | import Generic from "./services/Generic.vue"; |
7 | 8 | ||
8 | export default { | 9 | export default { |
@@ -17,7 +18,7 @@ export default { | |||
17 | if (type === "Generic") { | 18 | if (type === "Generic") { |
18 | return Generic; | 19 | return Generic; |
19 | } | 20 | } |
20 | return () => import(`./services/${type}.vue`); | 21 | return defineAsyncComponent(() => import(`./services/${type}.vue`)); |
21 | }, | 22 | }, |
22 | }, | 23 | }, |
23 | }; | 24 | }; |