You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var re =/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
147
163
returnre.test(email);
148
164
}
@@ -198,29 +214,36 @@ const app = new Vue({
198
214
199
215
```js
200
216
constapp=newVue({
201
-
el:'#app',
217
+
el:'#app',
202
218
data:{
203
-
errors:[],
204
-
weapons:0,
205
-
shields:0,
206
-
coffee:0,
207
-
ac:0,
208
-
mousedroids:0
219
+
errors:[],
220
+
weapons:0,
221
+
shields:0,
222
+
coffee:0,
223
+
ac:0,
224
+
mousedroids:0
209
225
},
210
-
computed:{
211
-
total:function() {
226
+
computed:{
227
+
total:function() {
212
228
// Vue は空の値を string に変換するので、パースする必要があります
213
-
returnNumber(this.weapons)+
214
-
Number(this.shields)+
215
-
Number(this.coffee)+
229
+
returnNumber(this.weapons)+
230
+
Number(this.shields)+
231
+
Number(this.coffee)+
216
232
Number(this.ac+this.mousedroids);
217
233
}
218
234
},
219
235
methods:{
220
-
checkForm:function(e) {
236
+
checkForm:function(e) {
221
237
this.errors= [];
222
-
if(this.total!=100) this.errors.push("Total must be 100!");
0 commit comments