質問編集履歴
2
インデントが壊れているのを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -17,33 +17,20 @@
|
|
17
17
|
|
18
18
|
### 該当のソースコード
|
19
19
|
|
20
|
+
```ここに言語を入力
|
20
21
|
<template>
|
21
|
-
|
22
|
-
<button @click="goHome">GO GO</button>
|
22
|
+
<button @click="goHome">GO GO</button>
|
23
|
-
|
24
|
-
|
23
|
+
</template>
|
25
24
|
|
26
25
|
<script lang="ts">
|
27
26
|
import { defineComponent } from 'vue'
|
28
27
|
import { useRouter } from 'vue-router'
|
29
28
|
import Home from './Home.vue';
|
30
29
|
|
31
|
-
|
32
30
|
export default defineComponent({
|
33
31
|
setup() {
|
34
|
-
|
35
|
-
const router = useRouter()
|
32
|
+
const router = useRouter()
|
36
33
|
|
37
|
-
|
38
|
-
const routes = {
|
39
|
-
'/': Home,
|
40
|
-
|
41
|
-
};
|
42
|
-
|
43
|
-
// const fetch = () => {
|
44
|
-
// const { id } = route.params
|
45
|
-
|
46
|
-
// }
|
47
34
|
const goHome = async () => {
|
48
35
|
try {
|
49
36
|
router.push("/hello");
|
@@ -60,6 +47,7 @@
|
|
60
47
|
})
|
61
48
|
</script>
|
62
49
|
|
50
|
+
```
|
63
51
|
### 試したこと
|
64
52
|
似たエラーで詰まっている人の記事を見つけたのですが、
|
65
53
|
解決にはいたりませんでした。
|
1
インデント修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,13 +6,13 @@
|
|
6
6
|
|
7
7
|
### 解決したいエラー
|
8
8
|
|
9
|
-
ですが 、ボタンクリックに以下エラーがでて遷移できません。
|
9
|
+
> ですが 、ボタンクリックに以下エラーがでて遷移できません。
|
10
|
-
[signinError] TypeError: Cannot read properties of undefined (reading 'push')
|
10
|
+
> > [signinError] TypeError: Cannot read properties of undefined (reading 'push')
|
11
|
-
at Proxy.goHome (Hello.vue:30:20)
|
11
|
+
> > at Proxy.goHome (Hello.vue:30:20)
|
12
|
-
at _createElementBlock.onClick._cache.<computed>._cache.<computed> (Hello.vue:3:21)
|
12
|
+
> > at _createElementBlock.onClick._cache.<computed>._cache.<computed> (Hello.vue:3:21)
|
13
|
-
at callWithErrorHandling (runtime-core.esm-bundler.js:157:22)
|
13
|
+
> > at callWithErrorHandling (runtime-core.esm-bundler.js:157:22)
|
14
|
-
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:21)
|
14
|
+
> > at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:21)
|
15
|
-
at HTMLButtonElement.invoker (runtime-dom.esm-bundler.js:345:9)
|
15
|
+
> > at HTMLButtonElement.invoker (runtime-dom.esm-bundler.js:345:9)
|
16
16
|
|
17
17
|
|
18
18
|
### 該当のソースコード
|