-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstep08_filter.html
More file actions
33 lines (33 loc) · 935 Bytes
/
step08_filter.html
File metadata and controls
33 lines (33 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>step08_filter</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<h2>Vue instance의 filters 라는 필터링 기능의 속성</h2>
<div id="app">
자동 연산 작업 - 입력된 데이터에 10을 더하기 <br>
<input type="text" v-model.number="age">준호양이 떡국10번더먹으면?
{{age | sum | sum2}}
</div>
<script>
let vm = new Vue({
el : "#app",
data : {
age : 0
},
filters : {
sum : function(v){
return v+ 10;
},
sum2 : function(v){
return v+ 100;
}
}
});
</script>
</body>
</html>