-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleetcode.html
More file actions
39 lines (36 loc) · 904 Bytes
/
leetcode.html
File metadata and controls
39 lines (36 loc) · 904 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
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>LeetCode test</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
<ul>
<!-- <todo-list v-for="i in array" :fck="i"></todo-list> -->
<li v-for="i in array">{{i.text}} -- hehe</li>
</ul>
</div>
</body>
<script>
Vue.component('todo-list', {
props: ['fck'],
template: "<li>{{fck.text}} ---- <span>{{fck.text+'hehe'}}</span></li>",
})
var app = new Vue({
el: '#app',
data: {
array: [{ text: 'fcssk' }, { text: 'this' }, { text: 'hehe' }],
},
})
console.log(app)
app.fck = 'asd'
app.$watch('fck', function (newVal, oldVal) {
console.log(newVal)
console.log(oldVal)
})
var a = [0, 1, 2, 3, 4, 5].splice(2, 2)
console.log(a)
</script>
</html>