Makise Von
Makise Von
> 首先我用的 pjax,虽然不是 vue,但是导致问题的原因大体相同 > > 由于在pjax完成时Meting会调用 APlayer 的析构,其会取消异步请求,导致其绑定的 switch函数被调用 > switch 函数在调用时会更新页面的元素,而 pjax 此时已经刷新了页面,故会抛出一个undefined的异常 > `error code: this.player.container.querySelectorAll('.aplayer-list li')[this.index].classList.add('aplayer-list-light');` > > 问题来自: > `this.player.container.querySelectorAll('.aplayer-list li') 取不到` > 如果使用侵入式编程,解决起来比较麻烦,需要重新打包,也不太友好 >...
在其他人的帮助下找到了另一种解决方案。 删去 `Aplayer.min.js` 中 `Aplayer` 类下的析构函数 `destroy()` 中的 `this.audio.src=''` 这一句即可。 目前使用中,没有遇到其他问题。
+1
> 一年了,还没有解决办法吗 好像是过24小时就会自动更新了
> 我现在+1晚不晚 看上一条回复。
It's a render problem since goldmark will convert `\\` to `\` . See gohugoio/hugo#6694 for more details. Possible solutions: 1. Preprocess math, perfect but complicated, see [litao91/goldmark-mathjax](https://github.com/litao91/goldmark-mathjax). 2. Use MathML...
> I just found this now where I just opened a PR for this exact issue in the [contain-rs/linked-list](https://github.com/contain-rs/linked-list/pull/19) project. > > It is actually quite easily fixed, I'd be...
+1
有一个类似的情况,我切换页面的时候hexo-tag-aplayer不显示,刷新一下才会加载。
> > 有一个类似的情况,我切换页面的时候hexo-tag-aplayer不显示,刷新一下才会加载。 > > 同遇到 在适当位置添加以下代码即可 ```javascript window.addEventListener('pjax:success', () => { loadMeting(); }); ``` 参考:[pjax导致无法初始化aplayer音乐播放器](https://yxyvpn.com/2020/04/15/pjax%E5%AF%BC%E8%87%B4%E6%97%A0%E6%B3%95%E5%88%9D%E5%A7%8B%E5%8C%96aplayer%E9%9F%B3%E4%B9%90%E6%92%AD%E6%94%BE%E5%99%A8/)