im-ui-mobile 0.0.72 → 0.0.73

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.
@@ -19,10 +19,10 @@
19
19
  <im-long-press-menu :items="menuItems" @select="onSelectMenu">
20
20
  <!-- up-parse支持点击a标签,但是不支持显示emo表情,也不支持换行 -->
21
21
  <up-parse
22
- v-if="$url.containUrl(msgInfo.content) && !$emotion.containEmoji(msgInfo.content)"
23
- class="message-text" :showImgMenu="false" :content="nodesText"></up-parse>
22
+ v-if="$url.containUrl(msgInfo.content) && !$emoji.containEmoji(msgInfo.content)"
23
+ class="message-text" :showImgMenu="false" :content="nodesText" />
24
24
  <!-- rich-text支持显示emo表情以及消息换行,但是不支持点击a标签 -->
25
- <rich-text v-else class="message-text" :nodes="nodesText"></rich-text>
25
+ <rich-text v-else class="message-text" :nodes="nodesText" />
26
26
  </im-long-press-menu>
27
27
  </view>
28
28
  <view class="message-image" v-else-if="msgInfo.type == MESSAGE_TYPE.IMAGE">
@@ -113,7 +113,7 @@ interface Emits {
113
113
  (e: 'download', msgInfo: any): void;
114
114
  }
115
115
 
116
- const $emotion = emoji
116
+ const $emoji = emoji
117
117
  const $url = url
118
118
  const $datetime = datetime
119
119
  const props = defineProps<Props>();
package/index.js CHANGED
@@ -50,7 +50,7 @@ const install = (app, options = {}) => {
50
50
  config = { ...defaultConfig, ...options }
51
51
 
52
52
  // 提供全局配置
53
- app.provide('im-config', options || {})
53
+ app.provide('im-config', options)
54
54
 
55
55
  // 应用配置到各个模块
56
56
  if (config.emojiUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.0.72",
3
+ "version": "0.0.73",
4
4
  "description": "A Vue3.0 + typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/utils/emoji.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { inject } from 'vue'
1
2
  /**
2
3
  * 表情工具类
3
4
  */
@@ -8,8 +9,11 @@ class Emoji {
8
9
  * @param {string} options.emojiUrl - 表情图片基础URL
9
10
  */
10
11
  constructor(options = {}) {
12
+ const config = inject('im-config', {})
13
+ console.log('config', config)
14
+
11
15
  // 表情图片基础URL
12
- this.emojiUrl = options.emojiUrl || '';
16
+ this.emojiUrl = options.emojiUrl || config.emojiUrl;
13
17
 
14
18
  // 表情文本列表
15
19
  this.emoTextList = [