Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix .toggle-all checkbox was hidden #761

Merged
merged 1 commit into from
May 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/todomvc/components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
</header>
<!-- main section -->
<section class="main" v-show="todos.length">
<input class="toggle-all"
<input class="toggle-all" id="toggle-all"
Copy link
Member

@posva posva Apr 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does the id come from? It's not on the todomvc repo

Copy link
Contributor Author

@huguangju huguangju Apr 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's not. The checkbox arrow(.toggle-all) need a label tag next to it, and can't be wrapped with label, because it was written like this in todomvc-app-css:

.toggle-all + label:before {
    content: '❯';
    font-size: 22px;
    color: #e6e6e6;
    padding: 10px 27px 10px 27px;
}

Then if i want to click the arrow and trigger the event, need to bind the label tag to input with the for attribute, so i set id on input. Is there any other way better than this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, yeah the + doesn't leave us other option here (at least none that I'm aware of)

type="checkbox"
:checked="allChecked"
@change="toggleAll({ done: !allChecked })">
<label for="toggle-all"></label>
<ul class="todo-list">
<todo v-for="(todo, index) in filteredTodos" :key="index" :todo="todo"></todo>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"rollup-plugin-replace": "^1.1.1",
"rollup-watch": "^3.2.2",
"selenium-server": "^2.53.1",
"todomvc-app-css": "^2.0.6",
"todomvc-app-css": "^2.1.0",
"typescript": "^2.1.5",
"uglify-js": "^2.7.5",
"vue": "^2.1.10",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4244,14 +4244,14 @@ selenium-server@^2.53.1:
version "2.53.1"
resolved "https://registry.yarnpkg.com/selenium-server/-/selenium-server-2.53.1.tgz#d681528812f3c2e0531a6b7e613e23bb02cce8a6"

"semver@2 || 3 || 4 || 5", semver@~5.0.1:
version "5.0.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"

semver@~5.3.0:
"semver@2 || 3 || 4 || 5", semver@~5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"

semver@~5.0.1:
version "5.0.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"

[email protected]:
version "0.14.2"
resolved "https://registry.yarnpkg.com/send/-/send-0.14.2.tgz#39b0438b3f510be5dc6f667a11f71689368cdeef"
Expand Down Expand Up @@ -4609,9 +4609,9 @@ to-fast-properties@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"

todomvc-app-css@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/todomvc-app-css/-/todomvc-app-css-2.0.6.tgz#0b3667c5e189f1568d9a9bf7947ebd928406961d"
todomvc-app-css@^2.1.0:
version "2.1.0"
resolved "http://registry.npm.taobao.org/todomvc-app-css/download/todomvc-app-css-2.1.0.tgz#b6f2716d339afa2e5f799347d2a48b05396242a5"

tough-cookie@~2.3.0:
version "2.3.2"
Expand Down