im-ui-mobile 0.0.76 → 0.0.78
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/index.js +7 -8
- package/package.json +1 -1
- package/types/utils/emoji.d.ts +2 -4
- package/utils/emoji.js +3 -1
package/index.js
CHANGED
|
@@ -51,14 +51,12 @@ const install = (app, options = {}) => {
|
|
|
51
51
|
// 提供全局配置
|
|
52
52
|
app.provide('im-config', config)
|
|
53
53
|
|
|
54
|
-
// 应用配置到各个模块
|
|
55
|
-
if (config.emojiUrl) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
// // 应用配置到各个模块
|
|
55
|
+
// if (config.emojiUrl) {
|
|
56
|
+
// // 设置 emoji 模块
|
|
57
|
+
// console.log('设置 emoji 模块', config)
|
|
58
|
+
// emoji.setEmojiUrl(config.emojiUrl);
|
|
59
|
+
// }
|
|
62
60
|
|
|
63
61
|
// 安装插件
|
|
64
62
|
app.use(UViewPlusPlugin)
|
|
@@ -72,6 +70,7 @@ const install = (app, options = {}) => {
|
|
|
72
70
|
const getConfig = () => ({ ...config });
|
|
73
71
|
const webSocket = new WebSocket();
|
|
74
72
|
const emoji = new Emoji({ emojiUrl: config.emojiUrl })
|
|
73
|
+
emoji.setEmojiUrl(config.emojiUrl)
|
|
75
74
|
|
|
76
75
|
export {
|
|
77
76
|
getConfig,
|
package/package.json
CHANGED
package/types/utils/emoji.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare class Emoji {
|
|
2
|
-
constructor();
|
|
2
|
+
constructor(options: any);
|
|
3
3
|
setEmojiUrl: (url: string) => void;
|
|
4
4
|
getEmojiUrl: (F) => string;
|
|
5
5
|
containEmoji: (content: string) => boolean;
|
|
@@ -8,6 +8,4 @@ declare class Emoji {
|
|
|
8
8
|
textToPath: (emoText: string) => string;
|
|
9
9
|
pathToText: (path: string) => string;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
export { emoji, Emoji };
|
|
13
|
-
export default emoji;
|
|
11
|
+
export default Emoji;
|
package/utils/emoji.js
CHANGED
|
@@ -8,6 +8,7 @@ class Emoji {
|
|
|
8
8
|
* @param {string} options.emojiUrl - 表情图片基础URL
|
|
9
9
|
*/
|
|
10
10
|
constructor(options = {}) {
|
|
11
|
+
console.log('Emoji constructor > options', options)
|
|
11
12
|
// 表情图片基础URL
|
|
12
13
|
this.emojiUrl = options.emojiUrl || 'not config url';
|
|
13
14
|
|
|
@@ -30,6 +31,7 @@ class Emoji {
|
|
|
30
31
|
* @param {string} url - 表情图片基础URL
|
|
31
32
|
*/
|
|
32
33
|
setEmojiUrl(url) {
|
|
34
|
+
console.log('setEmojiUrl>url:', url)
|
|
33
35
|
this.emojiUrl = url;
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -85,7 +87,7 @@ class Emoji {
|
|
|
85
87
|
if (idx === -1) {
|
|
86
88
|
return '';
|
|
87
89
|
}
|
|
88
|
-
console.log('textToPath('+emoText+'):', this.emojiUrl
|
|
90
|
+
console.log('textToPath(' + emoText + '):', this.emojiUrl)
|
|
89
91
|
return this.emojiUrl + idx + ".gif";
|
|
90
92
|
}
|
|
91
93
|
|