im-ui-mobile 0.0.93 → 0.0.94
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 +30 -13
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -40,26 +40,45 @@ for (const key in importComponents) {
|
|
|
40
40
|
// 全局配置对象
|
|
41
41
|
let config = {}
|
|
42
42
|
|
|
43
|
-
// 默认配置
|
|
44
|
-
const defaultConfig = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
43
|
+
// // 默认配置
|
|
44
|
+
// const defaultConfig = {
|
|
45
|
+
// emojiUrl: '',
|
|
46
|
+
// baseUrl: ''
|
|
47
|
+
// }
|
|
48
48
|
|
|
49
49
|
let emoji = null
|
|
50
50
|
|
|
51
|
-
const install = (app,
|
|
52
|
-
// 合并配置
|
|
53
|
-
config = { ...defaultConfig, ...options }
|
|
51
|
+
const install = (app, upuiParams = '') => {
|
|
52
|
+
// // 合并配置
|
|
53
|
+
// config = { ...defaultConfig, ...options }
|
|
54
54
|
|
|
55
|
-
// 提供全局配置
|
|
56
|
-
app.provide('im-config', config)
|
|
57
|
-
configManager.setConfig(config)
|
|
55
|
+
// // 提供全局配置
|
|
56
|
+
// app.provide('im-config', config)
|
|
57
|
+
// configManager.setConfig(config)
|
|
58
58
|
|
|
59
59
|
// if (!emoji) {
|
|
60
60
|
// emoji = new Emoji({ emojiUrl: config.emojiUrl })
|
|
61
61
|
// }
|
|
62
62
|
|
|
63
|
+
console.log('upuiParams', upuiParams)
|
|
64
|
+
|
|
65
|
+
// 初始化
|
|
66
|
+
if (upuiParams) {
|
|
67
|
+
uni.upuiParams = upuiParams
|
|
68
|
+
let temp = upuiParams()
|
|
69
|
+
if (temp.httpIns) {
|
|
70
|
+
temp.httpIns(http)
|
|
71
|
+
}
|
|
72
|
+
if (temp.options) {
|
|
73
|
+
// 合并配置
|
|
74
|
+
config = temp.options
|
|
75
|
+
configManager.setConfig(temp.options)
|
|
76
|
+
console.log('install', configManager.get('emojiUrl'))
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
63
82
|
// 安装插件
|
|
64
83
|
app.use(UViewPlusPlugin)
|
|
65
84
|
|
|
@@ -67,8 +86,6 @@ const install = (app, options = {}) => {
|
|
|
67
86
|
components.forEach(component => {
|
|
68
87
|
app.component(component.name || '', component)
|
|
69
88
|
})
|
|
70
|
-
|
|
71
|
-
console.log('install', configManager.get('emojiUrl'))
|
|
72
89
|
}
|
|
73
90
|
|
|
74
91
|
nextTick(() => {
|