Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
ae2dd195
Commit
ae2dd195
authored
Dec 31, 2016
by
Sun Zheng'an
Committed by
Pascal Hartig
Dec 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vue.js: Update to 2.1.8 (#1734)
parent
50d46b4c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8525 additions
and
10343 deletions
+8525
-10343
examples/vue/index.html
examples/vue/index.html
+4
-4
examples/vue/js/app.js
examples/vue/js/app.js
+9
-8
examples/vue/node_modules/vue/dist/vue.js
examples/vue/node_modules/vue/dist/vue.js
+8511
-10330
examples/vue/package.json
examples/vue/package.json
+1
-1
No files found.
examples/vue/index.html
View file @
ae2dd195
...
...
@@ -8,12 +8,12 @@
<style>
[
v-cloak
]
{
display
:
none
;
}
</style>
</head>
<body>
<section
class=
"todoapp"
>
<section
class=
"todoapp"
v-cloak
>
<header
class=
"header"
>
<h1>
todos
</h1>
<input
class=
"new-todo"
autofocus
autocomplete=
"off"
placeholder=
"What needs to be done?"
v-model=
"newTodo"
@
keyup.enter=
"addTodo"
>
</header>
<section
class=
"main"
v-show=
"todos.length"
v-cloak
>
<section
class=
"main"
v-show=
"todos.length"
>
<input
class=
"toggle-all"
type=
"checkbox"
v-model=
"allDone"
>
<ul
class=
"todo-list"
>
<li
class=
"todo"
v-for=
"todo in filteredTodos"
:class=
"{completed: todo.completed, editing: todo == editedTodo}"
>
...
...
@@ -26,9 +26,9 @@
</li>
</ul>
</section>
<footer
class=
"footer"
v-show=
"todos.length"
v-cloak
>
<footer
class=
"footer"
v-show=
"todos.length"
>
<span
class=
"todo-count"
>
<strong
v-text=
"remaining"
></strong>
{{
remaining | pluralize 'item'
}} left
<strong
v-text=
"remaining"
></strong>
{{
pluralize('item', remaining)
}} left
</span>
<ul
class=
"filters"
>
<li><a
href=
"#/all"
:class=
"{selected: visibility == 'all'}"
>
All
</a></li>
...
...
examples/vue/js/app.js
View file @
ae2dd195
...
...
@@ -66,6 +66,10 @@
// note there's no DOM manipulation here at all.
methods
:
{
pluralize
:
function
(
word
,
count
)
{
return
word
+
(
count
===
1
?
''
:
'
s
'
);
},
addTodo
:
function
()
{
var
value
=
this
.
newTodo
&&
this
.
newTodo
.
trim
();
if
(
!
value
)
{
...
...
@@ -76,7 +80,8 @@
},
removeTodo
:
function
(
todo
)
{
this
.
todos
.
$remove
(
todo
);
var
index
=
this
.
todos
.
indexOf
(
todo
);
this
.
todos
.
splice
(
index
,
1
);
},
editTodo
:
function
(
todo
)
{
...
...
@@ -109,14 +114,10 @@
// before focusing on the input field.
// http://vuejs.org/guide/custom-directive.html
directives
:
{
'
todo-focus
'
:
function
(
value
)
{
if
(
!
value
)
{
return
;
}
var
el
=
this
.
el
;
Vue
.
nextTick
(
function
()
{
'
todo-focus
'
:
function
(
el
,
binding
)
{
if
(
binding
.
value
)
{
el
.
focus
();
}
);
}
}
}
});
...
...
examples/vue/node_modules/vue/dist/vue.js
View file @
ae2dd195
This diff is collapsed.
Click to expand it.
examples/vue/package.json
View file @
ae2dd195
...
...
@@ -2,7 +2,7 @@
"private"
:
true
,
"dependencies"
:
{
"director"
:
"^1.2.0"
,
"vue"
:
"^
1.0.1
"
,
"vue"
:
"^
2.1.8
"
,
"todomvc-common"
:
"^1.0.1"
,
"todomvc-app-css"
:
"^2.0.0"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment