Skip to content

Commit cb1d69c

Browse files
committed
update todomvc example to be same as lended version
1 parent 120af4b commit cb1d69c

File tree

13 files changed

+915
-174
lines changed

13 files changed

+915
-174
lines changed

dist/vue.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
Vue.js v0.8.3
3+
(c) 2014 Evan You
4+
License: MIT
5+
*/
16
;(function(){
27
'use strict';
38

@@ -3538,8 +3543,8 @@ module.exports = {
35383543
var prop = this.prop
35393544
this.el.style[prop] = value
35403545
if (this.prefixed) {
3541-
var i = prefixes.length,
3542-
prop = prop.charAt(0).toUpperCase() + prop.slice(1)
3546+
prop = prop.charAt(0).toUpperCase() + prop.slice(1)
3547+
var i = prefixes.length
35433548
while (i--) {
35443549
this.el.style[prefixes[i] + prop] = value
35453550
}

dist/vue.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/commits/app.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
var demo = new Vue({
2+
3+
el: '#demo',
4+
5+
data: {
6+
branch: 'master'
7+
},
8+
9+
created: function () {
10+
this.$watch('branch', function () {
11+
this.fetchData()
12+
})
13+
},
14+
15+
filters: {
16+
truncate: function (v) {
17+
var newline = v.indexOf('\n')
18+
return newline > 0 ? v.slice(0, newline) : v
19+
},
20+
formatDate: function (v) {
21+
return v.replace(/T|Z/g, ' ')
22+
}
23+
},
24+
25+
methods: {
26+
fetchData: function () {
27+
var xhr = new XMLHttpRequest(),
28+
self = this
29+
xhr.open('GET', 'https://api.github.com/repos/yyx990803/vue/commits?per_page=3&sha=' + self.branch)
30+
xhr.onload = function () {
31+
self.commits = JSON.parse(xhr.responseText)
32+
}
33+
xhr.send()
34+
}
35+
}
36+
})

examples/commits/index.html

+1-38
Original file line numberDiff line numberDiff line change
@@ -35,41 +35,4 @@ <h1>Latest Vue.js Commits</h1>
3535
</div>
3636

3737
<script src="../../dist/vue.js"></script>
38-
<script>
39-
var demo = new Vue({
40-
41-
el: '#demo',
42-
43-
data: {
44-
branch: 'master'
45-
},
46-
47-
created: function () {
48-
this.$watch('branch', function () {
49-
this.fetchData()
50-
})
51-
},
52-
53-
filters: {
54-
truncate: function (v) {
55-
var newline = v.indexOf('\n')
56-
return newline > 0 ? v.slice(0, newline) : v
57-
},
58-
formatDate: function (v) {
59-
return v.replace(/T|Z/g, ' ')
60-
}
61-
},
62-
63-
methods: {
64-
fetchData: function () {
65-
var xhr = new XMLHttpRequest(),
66-
self = this
67-
xhr.open('GET', 'https://api.github.com/repos/yyx990803/vue/commits?per_page=3&sha=' + self.branch)
68-
xhr.onload = function () {
69-
self.commits = JSON.parse(xhr.responseText)
70-
}
71-
xhr.send()
72-
}
73-
}
74-
})
75-
</script>
38+
<script src="app.js"></script>

0 commit comments

Comments
 (0)