Merge pull request #133 from mrxiaozhuox/master

The desktop app will default open link in browser
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2022-01-18 23:09:40 -05:00
commit 887f69d5b4
4 files changed
+65

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
use dioxus::prelude::*;
fn main() {
dioxus::desktop::launch(app);
}
fn app(cx: Scope) -> Element {
cx.render(rsx! (
div {
p {
a {
href: "http://dioxuslabs.com/",
"default link"
}
}
p {
a {
href: "http://dioxuslabs.com/",
prevent_default: "onclick",
onclick: |_| {
println!("Hello Dioxus");
},
"custom event link",
}
}
}
))
}