mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2025-11-10 19:30:27 +08:00
更新文档
This commit is contained in:
15
docs/assets/js/component.js
Normal file
15
docs/assets/js/component.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// 使用 mkdocs-material 与第三方 JavaScript 库集成的方法
|
||||
document$.subscribe(function () {
|
||||
// 重新初始化组件
|
||||
ComponentSystem.reinitializeAll()
|
||||
// 延迟初始化以确保DOM完全渲染
|
||||
setTimeout(() => {
|
||||
ComponentSystem.initAll()
|
||||
}, 300)
|
||||
})
|
||||
|
||||
// 首次加载事件
|
||||
window.addEventListener('load', function () {
|
||||
// 初始化所有组件
|
||||
ComponentSystem.initAll()
|
||||
})
|
||||
Reference in New Issue
Block a user