im-ui-mobile 0.0.73 → 0.0.75
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 +2 -1
- package/package.json +1 -1
- package/utils/emoji.js +2 -6
package/index.js
CHANGED
|
@@ -50,11 +50,12 @@ const install = (app, options = {}) => {
|
|
|
50
50
|
config = { ...defaultConfig, ...options }
|
|
51
51
|
|
|
52
52
|
// 提供全局配置
|
|
53
|
-
app.provide('im-config',
|
|
53
|
+
app.provide('im-config', config)
|
|
54
54
|
|
|
55
55
|
// 应用配置到各个模块
|
|
56
56
|
if (config.emojiUrl) {
|
|
57
57
|
// 设置 emoji 模块
|
|
58
|
+
console.log('设置 emoji 模块', config)
|
|
58
59
|
emoji.setEmojiUrl(config.emojiUrl);
|
|
59
60
|
}
|
|
60
61
|
|
package/package.json
CHANGED
package/utils/emoji.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { inject } from 'vue'
|
|
2
1
|
/**
|
|
3
2
|
* 表情工具类
|
|
4
3
|
*/
|
|
@@ -9,11 +8,8 @@ class Emoji {
|
|
|
9
8
|
* @param {string} options.emojiUrl - 表情图片基础URL
|
|
10
9
|
*/
|
|
11
10
|
constructor(options = {}) {
|
|
12
|
-
const config = inject('im-config', {})
|
|
13
|
-
console.log('config', config)
|
|
14
|
-
|
|
15
11
|
// 表情图片基础URL
|
|
16
|
-
this.emojiUrl = options.emojiUrl || config
|
|
12
|
+
this.emojiUrl = options.emojiUrl || 'not config url';
|
|
17
13
|
|
|
18
14
|
// 表情文本列表
|
|
19
15
|
this.emoTextList = [
|
|
@@ -89,7 +85,7 @@ class Emoji {
|
|
|
89
85
|
if (idx === -1) {
|
|
90
86
|
return '';
|
|
91
87
|
}
|
|
92
|
-
|
|
88
|
+
console.log('textToPath('+emoText+'):', this.emojiUrl )
|
|
93
89
|
return this.emojiUrl + idx + ".gif";
|
|
94
90
|
}
|
|
95
91
|
|