Skip to content

Fix examples in HTML mode #1636

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

Merged
merged 1 commit into from
Mar 25, 2022
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
2 changes: 1 addition & 1 deletion src/examples/src/cells/Cell/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
@change="update"
@blur="update"
@vnode-mounted="({ el }) => el.focus()"
/>
>
<span v-else>{{ evalCell(cells[c][r]) }}</span>
</div>
2 changes: 2 additions & 0 deletions src/examples/src/circle-drawer/App/composition.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ export default {

return {
history,
index,
circles,
selected,
adjusting,
onClick,
adjust,
undo,
redo
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/src/circle-drawer/App/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@

<div class="dialog" v-if="adjusting" @click.stop>
<p>Adjust radius of circle at ({{ selected.cx }}, {{ selected.cy }})</p>
<input type="range" v-model="selected.r" min="1" max="300" />
<input type="range" v-model="selected.r" min="1" max="300">
</div>
4 changes: 2 additions & 2 deletions src/examples/src/flight-booker/App/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<option value="return flight">Return Flight</option>
</select>

<input type="date" v-model="departureDate" />
<input type="date" v-model="returnDate" :disabled="!isReturn" />
<input type="date" v-model="departureDate">
<input type="date" v-model="returnDate" :disabled="!isReturn">

<button :disabled="!canBook" @click="book">Book</button>

Expand Down
20 changes: 10 additions & 10 deletions src/examples/src/form-bindings/App/template.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<h2>Text Input</h2>
<input v-model="text" /> {{ text }}
<input v-model="text"> {{ text }}

<h2>Checkbox</h2>
<input type="checkbox" id="checkbox" v-model="checked" />
<input type="checkbox" id="checkbox" v-model="checked">
<label for="checkbox">Checked: {{ checked }}</label>

<!--
multiple checkboxes can bind to the same
array v-model value
-->
<h2>Multi Checkbox</h2>
<input type="checkbox" id="jack" value="Jack" v-model="checkedNames" />
<input type="checkbox" id="jack" value="Jack" v-model="checkedNames">
<label for="jack">Jack</label>
<input type="checkbox" id="john" value="John" v-model="checkedNames" />
<input type="checkbox" id="john" value="John" v-model="checkedNames">
<label for="john">John</label>
<input type="checkbox" id="mike" value="Mike" v-model="checkedNames" />
<input type="checkbox" id="mike" value="Mike" v-model="checkedNames">
<label for="mike">Mike</label>
<p>Checked names: <pre>{{ checkedNames }}</pre></p>

<h2>Radio</h2>
<input type="radio" id="one" value="One" v-model="picked" />
<input type="radio" id="one" value="One" v-model="picked">
<label for="one">One</label>
<br />
<input type="radio" id="two" value="Two" v-model="picked" />
<br>
<input type="radio" id="two" value="Two" v-model="picked">
<label for="two">Two</label>
<br />
<br>
<span>Picked: {{ picked }}</span>

<h2>Select</h2>
Expand All @@ -42,4 +42,4 @@ <h2>Multi Select</h2>
<option>B</option>
<option>C</option>
</select>
<span>Selected: {{ multiSelected }}</span>
<span>Selected: {{ multiSelected }}</span>
2 changes: 1 addition & 1 deletion src/examples/src/timer/App/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div>{{ (elapsed / 1000).toFixed(1) }}s</div>

<div>
Duration: <input type="range" v-model="duration" min="1" max="30000" />
Duration: <input type="range" v-model="duration" min="1" max="30000">
{{ (duration / 1000).toFixed(1) }}s
</div>

Expand Down
10 changes: 5 additions & 5 deletions src/examples/src/todomvc/App/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h1>todos</h1>
autofocus
placeholder="What needs to be done?"
@keyup.enter="addTodo"
/>
>
</header>
<section class="main" v-show="todos.length">
<input
Expand All @@ -15,7 +15,7 @@ <h1>todos</h1>
type="checkbox"
:checked="remaining === 0"
@change="toggleAll"
/>
>
<label for="toggle-all">Mark all as complete</label>
<ul class="todo-list">
<li
Expand All @@ -25,7 +25,7 @@ <h1>todos</h1>
:class="{ completed: todo.completed, editing: todo === editedTodo }"
>
<div class="view">
<input class="toggle" type="checkbox" v-model="todo.completed" />
<input class="toggle" type="checkbox" v-model="todo.completed">
<label @dblclick="editTodo(todo)">{{ todo.title }}</label>
<button class="destroy" @click="removeTodo(todo)"></button>
</div>
Expand All @@ -38,7 +38,7 @@ <h1>todos</h1>
@blur="doneEdit(todo)"
@keyup.enter="doneEdit(todo)"
@keyup.escape="cancelEdit(todo)"
/>
>
</li>
</ul>
</section>
Expand All @@ -62,4 +62,4 @@ <h1>todos</h1>
Clear completed
</button>
</footer>
</section>
</section>