質問編集履歴
1
ソースコード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -49,3 +49,119 @@
|
|
49
49
|
span.error-info(v-show="touched.category && !formData.category") 必須項目です
|
50
50
|
|
51
51
|
```
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
```formModal.vue
|
56
|
+
|
57
|
+
.modal
|
58
|
+
|
59
|
+
div.infomation.info_confirm(:class="myStatus") {{ dataResponse ? dataResponse.message : 'ご入力内容にお間違いがないかご確認の上、「送信」ボタンを押してください。入力内容を編集する場合は「戻る」を押してください。' }}
|
60
|
+
|
61
|
+
.confirm(v-if="!dataResponse")
|
62
|
+
|
63
|
+
dl
|
64
|
+
|
65
|
+
dt お問合せカテゴリ
|
66
|
+
|
67
|
+
dd {{ getFormData.category }}
|
68
|
+
|
69
|
+
dl
|
70
|
+
|
71
|
+
dt 名前
|
72
|
+
|
73
|
+
dd {{ getFormData.yourName }}
|
74
|
+
|
75
|
+
dl
|
76
|
+
|
77
|
+
dt 会社名
|
78
|
+
|
79
|
+
dd {{ getFormData.campany }}
|
80
|
+
|
81
|
+
dl
|
82
|
+
|
83
|
+
dt メールアドレス
|
84
|
+
|
85
|
+
dd {{ getFormData.yourEmail }}
|
86
|
+
|
87
|
+
dl
|
88
|
+
|
89
|
+
dt お問い合わせ内容
|
90
|
+
|
91
|
+
dd(v-html="getFormData.message")
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
```
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
```index.js
|
100
|
+
|
101
|
+
// # Modules Mode Vuex Store
|
102
|
+
|
103
|
+
export default {
|
104
|
+
|
105
|
+
state: () => ({
|
106
|
+
|
107
|
+
formData: {
|
108
|
+
|
109
|
+
category: null,
|
110
|
+
|
111
|
+
yourName: null,
|
112
|
+
|
113
|
+
campany: null,
|
114
|
+
|
115
|
+
yourEmail: null,
|
116
|
+
|
117
|
+
message: null
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
}),
|
122
|
+
|
123
|
+
getters: {
|
124
|
+
|
125
|
+
getFormData: state => state.formData
|
126
|
+
|
127
|
+
},
|
128
|
+
|
129
|
+
mutations: {
|
130
|
+
|
131
|
+
setFormData(state, payload) {
|
132
|
+
|
133
|
+
state.formData = payload
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
},
|
138
|
+
|
139
|
+
actions: {
|
140
|
+
|
141
|
+
resetForm(context) {
|
142
|
+
|
143
|
+
const emptyForm = {
|
144
|
+
|
145
|
+
category: null,
|
146
|
+
|
147
|
+
yourName: null,
|
148
|
+
|
149
|
+
campany: null,
|
150
|
+
|
151
|
+
yourEmail: null,
|
152
|
+
|
153
|
+
message: null
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
context.commit('setFormData', emptyForm)
|
158
|
+
|
159
|
+
}
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
```
|