From b286397202466eb519bccf4c6e60bc6e45d8d6a3 Mon Sep 17 00:00:00 2001 From: luoxiao Date: Wed, 11 Oct 2023 09:28:44 +0800 Subject: [PATCH] feat: NavBar component text show --- Cargo.toml | 2 +- gh-pages/Cargo.toml | 4 ++-- gh-pages/src/pages/checkbox/mod.rs | 4 ++-- src/mobile/nav_bar/mod.rs | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 56212f9..e993f21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -leptos = { version = "0.5.0", features = ["csr"] } +leptos = { version = "0.5.1", features = ["csr"] } web-sys = { version = "0.3.62", features = ["DomRect"] } wasm-bindgen = "0.2.85" icondata = { version = "0.0.7", features = [ diff --git a/gh-pages/Cargo.toml b/gh-pages/Cargo.toml index 33ec338..e7164e6 100644 --- a/gh-pages/Cargo.toml +++ b/gh-pages/Cargo.toml @@ -6,13 +6,13 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -leptos = { version = "0.5.0", features = ["csr"] } +leptos = { version = "0.5.1", features = ["csr"] } melt-ui = { path = "../" } icondata = { version = "0.0.7", features = [ "AiCloseOutlined", "AiCheckOutlined", ] } -leptos_router = { version = "0.5.0", features = ["csr"] } +leptos_router = { version = "0.5.1", features = ["csr"] } regex = "1.8.2" leptos_devtools = "0.0.1" prisms = { git = "https://github.com/luoxiaozero/prisms" } diff --git a/gh-pages/src/pages/checkbox/mod.rs b/gh-pages/src/pages/checkbox/mod.rs index 0a232b9..ed56034 100644 --- a/gh-pages/src/pages/checkbox/mod.rs +++ b/gh-pages/src/pages/checkbox/mod.rs @@ -7,13 +7,13 @@ use prisms::highlight_str; #[component] pub fn CheckboxPage() -> impl IntoView { - let value = create_rw_signal(false); + let checked = create_rw_signal(false); let value = create_rw_signal(HashSet::new()); view! {

"Checkbox"

- "Click" + "Click" impl IntoView { mount_style("nav-bar", include_str!("./nav-bar.css")); - let on_click_left = SignalSetter::map(move |ev| { + let on_click_left = move |ev| { if let Some(click_left) = click_left.as_ref() { click_left.call(ev); } - }); + }; - let on_click_right = SignalSetter::map(move |ev| { + let on_click_right = move |ev| { if let Some(click_right) = click_right.as_ref() { click_right.call(ev); } - }); + }; view! {
-
+
- {left_text.get()} + {move || left_text.get()}
{move || title.get()}
-
- {right_text.get()} +
+ {move || right_text.get()}