flat: 优化语音
This commit is contained in:
13
main.js
13
main.js
@@ -4,7 +4,12 @@ import globalFunction from '@/common/globalFunction'
|
||||
import '@/lib/string-similarity.min.js'
|
||||
import similarityJobs from '@/utils/similarity_Job.js';
|
||||
import NoBouncePage from '@/components/NoBouncePage/NoBouncePage.vue'
|
||||
import MsgTips from '@/components/MsgTips/MsgTips.vue'
|
||||
// import Tabbar from '@/components/tabbar/midell-box.vue'
|
||||
// 自动导入 directives 目录下所有指令
|
||||
const directives = import.meta.glob('./directives/*.js', {
|
||||
eager: true
|
||||
});
|
||||
|
||||
import {
|
||||
createSSRApp,
|
||||
@@ -15,8 +20,16 @@ export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
|
||||
app.component('NoBouncePage', NoBouncePage)
|
||||
app.component('MsgTips', MsgTips)
|
||||
// app.component('tabbar-custom', Tabbar)
|
||||
|
||||
for (const path in directives) {
|
||||
const directiveModule = directives[path];
|
||||
// 文件名作为指令名,./directives/fade.js => v-fade
|
||||
const name = path.match(/\.\/directives\/(.*)\.js$/)[1];
|
||||
app.directive(name, directiveModule.default);
|
||||
}
|
||||
|
||||
app.provide('globalFunction', {
|
||||
...globalFunction,
|
||||
similarityJobs
|
||||
|
Reference in New Issue
Block a user