mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
Fix up TodoMVC example and add build script on client side
This commit is contained in:
parent
07a9be5bcf
commit
2c90922385
4 changed files with 4 additions and 3 deletions
|
@ -9,7 +9,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
[dependencies]
|
||||
console_log = "0.2"
|
||||
leptos = { path = "../../../leptos", features = ["hydrate"] }
|
||||
todomvc = { path = "../../todomvc", features = ["hydrate"] }
|
||||
todomvc = { path = "../../todomvc", default-features = false, features = ["hydrate"] }
|
||||
log = "0.4"
|
||||
wasm-bindgen = "0.2"
|
||||
wee_alloc = "0.4"
|
||||
|
|
1
examples/todomvc-ssr/todomvc-ssr-client/build.sh
Normal file
1
examples/todomvc-ssr/todomvc-ssr-client/build.sh
Normal file
|
@ -0,0 +1 @@
|
|||
wasm-pack build --target=web --release
|
|
@ -19,7 +19,7 @@ lto = true
|
|||
opt-level = 'z'
|
||||
|
||||
[features]
|
||||
default = ["hydrate"]
|
||||
default = ["csr"]
|
||||
csr = ["leptos/csr"]
|
||||
hydrate = ["leptos/hydrate"]
|
||||
ssr = ["leptos/ssr"]
|
||||
|
|
|
@ -273,7 +273,7 @@ pub fn Todo(cx: Scope, todo: Todo) -> Element {
|
|||
class="edit"
|
||||
class:hidden={move || !(editing)()}
|
||||
prop:value={move || todo.title.get()}
|
||||
on:focusout=|ev| save(&event_target_value(&ev))
|
||||
on:focusout=move |ev| save(&event_target_value(&ev))
|
||||
on:keyup={move |ev| {
|
||||
let key_code = ev.unchecked_ref::<web_sys::KeyboardEvent>().key_code();
|
||||
if key_code == ENTER_KEY {
|
||||
|
|
Loading…
Reference in a new issue