z自定义指令

This commit is contained in:
李志鹏
2026-05-14 14:23:32 +08:00
parent 2ab2466f3d
commit 25919e5b1b
8 changed files with 155 additions and 92 deletions

View File

@@ -2,8 +2,13 @@ import { ViteSSG } from 'vite-ssg'
import App from './App.vue'
import { routes } from './routes'
import './style.css'
import directives from './directives/index'
// 注册指令
export const createApp = ViteSSG(App, {
routes,
base: import.meta.env.BASE_URL,
routes,
base: import.meta.env.BASE_URL,
}, ({ app }) => {
app.use(directives)
})