link.rs 584 B

123456789101112131415161718192021222324252627
  1. use dioxus::prelude::*;
  2. fn main() {
  3. dioxus::desktop::launch(app);
  4. }
  5. fn app(cx: Scope) -> Element {
  6. cx.render(rsx! (
  7. div {
  8. p {
  9. a {
  10. href: "http://dioxuslabs.com/",
  11. "default link"
  12. }
  13. }
  14. p {
  15. a {
  16. href: "http://dioxuslabs.com/",
  17. onclick: |_| {
  18. println!("Hello Dioxus");
  19. },
  20. "custom event link",
  21. }
  22. }
  23. }
  24. ))
  25. }