mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-27 16:40:50 +08:00
fix: 操作ldrs
This commit is contained in:
12
frontend_nuxt/plugins/ldrs.client.ts
Normal file
12
frontend_nuxt/plugins/ldrs.client.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// plugins/ldrs.client.ts
|
||||
import { defineNuxtPlugin } from '#app'
|
||||
|
||||
export default defineNuxtPlugin(async () => {
|
||||
// 动态引入,防止打包时把 ldrs 拉进 SSR bundle
|
||||
const { hatch, helix, spiral } = await import('ldrs')
|
||||
|
||||
// 想用几个就注册几个
|
||||
hatch.register()
|
||||
helix.register()
|
||||
spiral.register()
|
||||
})
|
||||
Reference in New Issue
Block a user