|
@@ -2,7 +2,8 @@ import App from './App'
|
|
|
import request from './common/request';
|
|
import request from './common/request';
|
|
|
import emotion from './common/emotion.js';
|
|
import emotion from './common/emotion.js';
|
|
|
import url from './common/url.js';
|
|
import url from './common/url.js';
|
|
|
-import * as enums from './common/enums.js';
|
|
|
|
|
|
|
+import str from './common/str.js';
|
|
|
|
|
+import * as enums from './common/enums.js';
|
|
|
import * as date from './common/date';
|
|
import * as date from './common/date';
|
|
|
import * as socketApi from './common/wssocket';
|
|
import * as socketApi from './common/wssocket';
|
|
|
import * as messageType from './common/messageType';
|
|
import * as messageType from './common/messageType';
|
|
@@ -21,10 +22,10 @@ import switchBar from '@/components/bar/switch-bar'
|
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
|
import * as recorder from './common/recorder-h5';
|
|
import * as recorder from './common/recorder-h5';
|
|
|
import ImageResize from "quill-image-resize-mp";
|
|
import ImageResize from "quill-image-resize-mp";
|
|
|
-import Quill from "quill";
|
|
|
|
|
|
|
+import Quill from "quill";
|
|
|
// 以下组件用于兼容部分手机聊天边框无法输入的问题
|
|
// 以下组件用于兼容部分手机聊天边框无法输入的问题
|
|
|
-window.Quill = Quill;
|
|
|
|
|
-window.ImageResize = { default: ImageResize };
|
|
|
|
|
|
|
+window.Quill = Quill;
|
|
|
|
|
+window.ImageResize = { default: ImageResize };
|
|
|
// 调试器
|
|
// 调试器
|
|
|
// import VConsole from 'vconsole'
|
|
// import VConsole from 'vconsole'
|
|
|
// new VConsole();
|
|
// new VConsole();
|
|
@@ -33,31 +34,32 @@ window.ImageResize = { default: ImageResize };
|
|
|
import * as recorder from './common/recorder-app';
|
|
import * as recorder from './common/recorder-app';
|
|
|
// #endif
|
|
// #endif
|
|
|
export function createApp() {
|
|
export function createApp() {
|
|
|
- const app = createSSRApp(App)
|
|
|
|
|
- app.use(uviewPlus);
|
|
|
|
|
- app.use(pinia.createPinia());
|
|
|
|
|
- app.component('bar-group', barGroup);
|
|
|
|
|
- app.component('arrow-bar', arrowBar);
|
|
|
|
|
- app.component('btn-bar', btnBar);
|
|
|
|
|
- app.component('switch-bar', switchBar);
|
|
|
|
|
- app.config.globalProperties.$http = request;
|
|
|
|
|
- app.config.globalProperties.$wsApi = socketApi;
|
|
|
|
|
- app.config.globalProperties.$msgType = messageType;
|
|
|
|
|
- app.config.globalProperties.$emo = emotion;
|
|
|
|
|
- app.config.globalProperties.$url = url;
|
|
|
|
|
- app.config.globalProperties.$enums = enums;
|
|
|
|
|
- app.config.globalProperties.$date = date;
|
|
|
|
|
- app.config.globalProperties.$rc = recorder;
|
|
|
|
|
- // 初始化时再挂载store对象
|
|
|
|
|
- app.config.globalProperties.$mountStore = () => {
|
|
|
|
|
- app.config.globalProperties.chatStore = useChatStore();
|
|
|
|
|
- app.config.globalProperties.friendStore = useFriendStore();
|
|
|
|
|
- app.config.globalProperties.groupStore = useGroupStore();
|
|
|
|
|
- app.config.globalProperties.configStore = useConfigStore();
|
|
|
|
|
- app.config.globalProperties.userStore = useUserStore();
|
|
|
|
|
- }
|
|
|
|
|
- return {
|
|
|
|
|
- app,
|
|
|
|
|
- pinia
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ const app = createSSRApp(App)
|
|
|
|
|
+ app.use(uviewPlus);
|
|
|
|
|
+ app.use(pinia.createPinia());
|
|
|
|
|
+ app.component('bar-group', barGroup);
|
|
|
|
|
+ app.component('arrow-bar', arrowBar);
|
|
|
|
|
+ app.component('btn-bar', btnBar);
|
|
|
|
|
+ app.component('switch-bar', switchBar);
|
|
|
|
|
+ app.config.globalProperties.$http = request;
|
|
|
|
|
+ app.config.globalProperties.$wsApi = socketApi;
|
|
|
|
|
+ app.config.globalProperties.$msgType = messageType;
|
|
|
|
|
+ app.config.globalProperties.$emo = emotion;
|
|
|
|
|
+ app.config.globalProperties.$url = url;
|
|
|
|
|
+ app.config.globalProperties.$str = str;
|
|
|
|
|
+ app.config.globalProperties.$enums = enums;
|
|
|
|
|
+ app.config.globalProperties.$date = date;
|
|
|
|
|
+ app.config.globalProperties.$rc = recorder;
|
|
|
|
|
+ // 初始化时再挂载store对象
|
|
|
|
|
+ app.config.globalProperties.$mountStore = () => {
|
|
|
|
|
+ app.config.globalProperties.chatStore = useChatStore();
|
|
|
|
|
+ app.config.globalProperties.friendStore = useFriendStore();
|
|
|
|
|
+ app.config.globalProperties.groupStore = useGroupStore();
|
|
|
|
|
+ app.config.globalProperties.configStore = useConfigStore();
|
|
|
|
|
+ app.config.globalProperties.userStore = useUserStore();
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ app,
|
|
|
|
|
+ pinia
|
|
|
|
|
+ }
|
|
|
|
|
+}
|