You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
361 B
13 lines
361 B
import { importAll } from '@/utils/utils'
|
|
|
|
const context = require.context('../directives', true, /\.js$/)
|
|
const directives = importAll(context)
|
|
|
|
export function initDirectives(app) {
|
|
//全局自定义指令
|
|
for (const key in directives) {
|
|
if (Object.hasOwnProperty.call(directives, key)) {
|
|
app.directive(key, directives[key].default)
|
|
}
|
|
}
|
|
}
|
|
|