1
0

link.rs 628 B

12345678910111213141516171819202122232425262728
  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. "browser-open": "false",
  18. onclick: |_| {
  19. println!("Hello Dioxus");
  20. },
  21. "custom event link",
  22. }
  23. }
  24. }
  25. ))
  26. }