-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
78 lines (64 loc) · 1.55 KB
/
index.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
$message = "Hello Vue!";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Test</title>
<script src="https://unpkg.com/vue@3"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
<body>
<div id="app" class="m-3">
<button class="btn btn-primary" @click="count++">{{ message }} : {{ count }} {{ test }}</button>
<div v-bind="objectOfAttrs">test</div>
{{ ok ? 'YES' : 'NO' }} <br>
{{ number + 1 }} <br>
{{ message.split('').reverse().join('') }}
<div :id="list-${id}">{{ id }}</div>
</div>
<div id="test2" class="m-3">
<p>Name: {{ name }}</p>
<input type="text" v-on:input="changeName">
<input type="text" v-on:keyup.enter="klavyeKullanimi">
</div>
<script>
Vue.createApp({
data() {
return {
message: '<?=$message?>',
count: 0,
objectOfAttrs: {
id: 'container',
class: 'wrapper my-3'
},
ok: 0,
number: 10,
id: 4
}
}
}).mount('#app')
/* function test() {
alert("test")
}
*/
Vue.createApp({
data() {
return {
name: "omer"
}
},
methods : {
changeName: function(e) {
this.name = e.target.value;
},
klavyeKullanimi: function (e) {
console.log(e.target.value)
}
}
}).mount('#test2')
</script>
</body>
</html>