初始化
This commit is contained in:
27
main.js
Normal file
27
main.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import App from './App'
|
||||
import { createSSRApp } from 'vue'
|
||||
//引入组件库
|
||||
import uviewPlus from '@/uni_modules/uview-plus'
|
||||
import LUI from '@/components/l-ui'
|
||||
//引入Layout组件
|
||||
import mescrollDiy from '@/components/layouts/mescroll-diy.vue';
|
||||
//引入 pinia
|
||||
// import pinia from '@/stores/index';
|
||||
import * as Pinia from 'pinia';
|
||||
//引入工具类Tools
|
||||
import tools from '@/tools/index.ts';
|
||||
import i18n from './i18n'
|
||||
import tabI18n from './locale/index'
|
||||
uni.$tools = tools;
|
||||
//引入插件
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App);
|
||||
app.component('mescrollDiy', mescrollDiy);
|
||||
app.use(Pinia.createPinia()).use(uviewPlus).use(LUI).use(i18n);
|
||||
// 如此配置即可
|
||||
uni.$u.config.unit = 'rpx'
|
||||
return {
|
||||
app,
|
||||
Pinia
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user