teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

説明文変更

2020/08/30 11:15

投稿

apple_love
apple_love

スコア0

title CHANGED
File without changes
body CHANGED
@@ -45,6 +45,59 @@
45
45
 
46
46
  ```
47
47
 
48
- ### 試したこと
48
+ ### jsonファイル
49
+ ```
50
+ [
51
+ {
52
+ "number": 1,
53
+ "id": "apple",
54
+ "color": [
55
+ {
56
+ "id": "red",
57
+ "taste": [
58
+ {
59
+ "id":"like"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "id":"green",
65
+ "taste": [
66
+ {
67
+ "id":"unlike"
68
+ }
69
+ ]
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "number": 2,
75
+ "id": "watermeron",
76
+ "color": [
77
+ {
78
+ "id": "yellow",
79
+ "taste": [
80
+ {
81
+ "id":"like"
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "id":"purple",
87
+ "taste": [
88
+ {
89
+ "id":"unlike"
90
+ }
91
+ ]
92
+ }
93
+ ]
94
+ }
95
+ ]
96
+ ```
97
+ ### 以下ページ構成です
98
+ pages/index.vue
99
+ pages/_fruitsId/index.vue
100
+ pages/_fruitsId/_colorsId/index.vue
101
+ pages/_fruitsId/_colorsId/_choiceId/index.vue
49
102
 
50
- ここに問題に対て試たことを記載してださ
103
+ ご教授願えますでょうか?宜しくお願いたします

2

nuxt.js変更

2020/08/30 11:15

投稿

apple_love
apple_love

スコア0

title CHANGED
File without changes
body CHANGED
@@ -26,7 +26,7 @@
26
26
  ### 該当のソースコード ※以下nuxt.config.jsです
27
27
 
28
28
  ```
29
- const kudamonoList = require('./data/area.json');
29
+ const kudamonoList = require('./data/kudamono.json');
30
30
  module.exports = {
31
31
  generate: {
32
32
  routes() {

1

nuxt.jsを変更しました

2020/08/30 11:11

投稿

apple_love
apple_love

スコア0

title CHANGED
File without changes
body CHANGED
@@ -33,7 +33,8 @@
33
33
  const i = [];
34
34
  kudamonoList.forEach(item => {
35
35
  i.push(`${item.id}`);
36
- i.push(`${item.id}/${item.prefecture['id']}`);
36
+ i.push(`${item.id}/${item.color.id}}`);
37
+ i.push(`${item.id}/${item.color.id}/${item.color.taste.id}}`);
37
38
  });
38
39
 
39
40
  return i;