Bläddra i källkod

content can now be placed in router_frame

Rodja Trappe 2 år sedan
förälder
incheckning
49f8ae62d8
2 ändrade filer med 1 tillägg och 2 borttagningar
  1. 0 1
      examples/single_page_app/main.py
  2. 1 1
      examples/single_page_app/router_frame.js

+ 0 - 1
examples/single_page_app/main.py

@@ -30,5 +30,4 @@ with ui.row():
 # this places the frame for the content which should be displayed
 router.frame().classes('w-full pt-8')
 
-
 ui.run()

+ 1 - 1
examples/single_page_app/router_frame.js

@@ -1,5 +1,5 @@
 export default {
-  template: `<div>Test</div>`,
+  template: `<div><slot></slot></div>`,
   mounted() {
     window.addEventListener("popstate", (event) => {
       if (event.state && event.state.page) {