簡體   English   中英

Html 頁面在 barba js 轉換后未加載

[英]Html page not loading after barba js transition

我有這個問題,當我單擊指向 go 的鏈接到另一個頁面時,barba 轉換運行完美,但它保持在同一個 html 頁面中,我必須刷新頁面才能加載其他頁面

我嘗試在過渡運行后設置一個 window.open 以暫時修復它,但我不知道會發生什么

這是代碼: https://github.com/david1opez/Mentes-Brillantes/issues/5

經過幾個小時的努力,我發現錯誤出現在 html 頁面中

 barba.init({ sync: true, transitions: [{ async leave(data) { const done = this.async(); pageTransition(); await delay(1500); }, async enter(data) {} }] });

我忘了把done(); await delay(1500)

所以現在這是工作代碼

 barba.init({ sync: true, transitions: [{ async leave(data) { const done = this.async(); pageTransition(); await delay(1500); done(); }, async enter(data) {} }] });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM