feat 搭建架构骨架
This commit is contained in:
12
src/directives/index.ts
Normal file
12
src/directives/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { App } from 'vue'
|
||||
import lazy from './lazy'
|
||||
import debounce from './debounce'
|
||||
import throttle from './throttle'
|
||||
|
||||
/** main.ts 调用:统一注册自定义指令 */
|
||||
export function setupDirectives(app: App): void {
|
||||
app
|
||||
.directive('lazy', lazy)
|
||||
.directive('debounce', debounce)
|
||||
.directive('throttle', throttle)
|
||||
}
|
||||
Reference in New Issue
Block a user