im-ui-mobile 0.0.87 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/im-cell/im-cell.vue +1 -1
- package/index.js +4 -2
- package/package.json +1 -1
- package/types/index.d.ts +0 -2
- package/utils/emoji.js +2 -19
package/index.js
CHANGED
|
@@ -56,7 +56,9 @@ const install = (app, options = {}) => {
|
|
|
56
56
|
app.provide('im-config', config)
|
|
57
57
|
configManager.setConfig(config)
|
|
58
58
|
|
|
59
|
-
// emoji
|
|
59
|
+
// if (!emoji) {
|
|
60
|
+
// emoji = new Emoji({ emojiUrl: config.emojiUrl })
|
|
61
|
+
// }
|
|
60
62
|
|
|
61
63
|
// 安装插件
|
|
62
64
|
app.use(UViewPlusPlugin)
|
|
@@ -70,6 +72,7 @@ const install = (app, options = {}) => {
|
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
nextTick(() => {
|
|
75
|
+
console.log('new an emoji instance.')
|
|
73
76
|
emoji = new Emoji();
|
|
74
77
|
})
|
|
75
78
|
|
|
@@ -78,7 +81,6 @@ const webSocket = new WebSocket();
|
|
|
78
81
|
|
|
79
82
|
export {
|
|
80
83
|
getConfig,
|
|
81
|
-
Emoji,
|
|
82
84
|
emoji,
|
|
83
85
|
eventBus,
|
|
84
86
|
datetime,
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import eventBus from "./utils/eventBus.d.ts";
|
|
4
4
|
import datetime from "./utils/datetime.d.ts";
|
|
5
5
|
import Emoji from "./utils/emoji.d.ts";
|
|
6
|
-
import { emoji } from "./utils/emoji.d.ts";
|
|
7
6
|
import { MESSAGE_TYPE, RTC_STATE, TERMINAL_TYPE, MESSAGE_STATUS } from "./utils/enums.d.ts";
|
|
8
7
|
import * as dom from "./utils/dom.d.ts";
|
|
9
8
|
import messageType from "./utils/messageType.d.ts";
|
|
@@ -53,7 +52,6 @@ declare module 'im-ui-mobile' {
|
|
|
53
52
|
eventBus,
|
|
54
53
|
datetime,
|
|
55
54
|
Emoji,
|
|
56
|
-
emoji,
|
|
57
55
|
dom,
|
|
58
56
|
messageType,
|
|
59
57
|
Requester,
|
package/utils/emoji.js
CHANGED
|
@@ -11,7 +11,7 @@ class Emoji {
|
|
|
11
11
|
*/
|
|
12
12
|
constructor(options = {}) {
|
|
13
13
|
// 表情图片基础URL
|
|
14
|
-
this.emojiUrl = options.emojiUrl || 'url not config.';
|
|
14
|
+
// this.emojiUrl = options.emojiUrl || 'url not config.';
|
|
15
15
|
|
|
16
16
|
// 表情文本列表
|
|
17
17
|
this.emoTextList = [
|
|
@@ -157,21 +157,4 @@ class Emoji {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
export default Emoji
|
|
161
|
-
|
|
162
|
-
// 使用示例:
|
|
163
|
-
/*
|
|
164
|
-
// 方式1:创建实例
|
|
165
|
-
import Emoji from './emoji.js';
|
|
166
|
-
|
|
167
|
-
const emoji = new Emoji({
|
|
168
|
-
emojiUrl: 'https://example.com/emojis/'
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
// 使用实例方法
|
|
172
|
-
const hasEmoji = emoji.containEmoji('你好#开心;');
|
|
173
|
-
const transformed = emoji.transform('今天很开心#开心;', 'emoji-img');
|
|
174
|
-
|
|
175
|
-
// 方式2:使用静态方法创建
|
|
176
|
-
const emoji = Emoji.create('https://example.com/emojis/');
|
|
177
|
-
*/
|
|
160
|
+
export default Emoji
|