@netang/quasar 0.1.97 → 0.1.98
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/search-item/index.vue +0 -2
- package/package.json +1 -1
- package/utils/getImage.js +12 -1
- package/utils/uploader.js +1 -1
package/package.json
CHANGED
package/utils/getImage.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import $n_get from 'lodash/get'
|
|
1
2
|
import $n_has from 'lodash/has'
|
|
2
3
|
import $n_isString from 'lodash/isString'
|
|
3
4
|
|
|
@@ -6,6 +7,7 @@ import $n_isValidObject from '@netang/utils/isValidObject'
|
|
|
6
7
|
import $n_isValidString from '@netang/utils/isValidString'
|
|
7
8
|
import $n_isNumeric from '@netang/utils/isNumeric'
|
|
8
9
|
import $n_split from '@netang/utils/split'
|
|
10
|
+
import $n_slash from '@netang/utils/slash'
|
|
9
11
|
|
|
10
12
|
import $n_uploader from './uploader'
|
|
11
13
|
|
|
@@ -113,7 +115,7 @@ export default function getImage(src, options) {
|
|
|
113
115
|
const {
|
|
114
116
|
type,
|
|
115
117
|
domain,
|
|
116
|
-
} = $n_uploader.getUpload()
|
|
118
|
+
} = $n_uploader.getUpload(null, $n_get(options, 'upload', ''))
|
|
117
119
|
|
|
118
120
|
// 判断图片上传方式
|
|
119
121
|
switch (type) {
|
|
@@ -171,6 +173,15 @@ export default function getImage(src, options) {
|
|
|
171
173
|
break
|
|
172
174
|
}
|
|
173
175
|
|
|
176
|
+
// 【调试模式】
|
|
177
|
+
// --------------------------------------------------
|
|
178
|
+
// #ifdef IS_DEBUG
|
|
179
|
+
if ($n_get(options, 'upload')) {
|
|
180
|
+
return $n_slash(domain, 'end', true) + src
|
|
181
|
+
}
|
|
182
|
+
// #endif
|
|
183
|
+
// --------------------------------------------------
|
|
184
|
+
|
|
174
185
|
return useFileUrl(domain, src)
|
|
175
186
|
}
|
|
176
187
|
}
|
package/utils/uploader.js
CHANGED
|
@@ -1604,7 +1604,7 @@ function create(options) {
|
|
|
1604
1604
|
*/
|
|
1605
1605
|
export function getUpload(userConfig = null, defaultUpload = '') {
|
|
1606
1606
|
const uploadConfig = $n_get((userConfig ? userConfig : configs.userConfig), 'uploader.upload', {})
|
|
1607
|
-
const type = defaultUpload ? defaultUpload : uploadConfig.default
|
|
1607
|
+
const type = $n_isValidString(defaultUpload) ? defaultUpload : uploadConfig.default
|
|
1608
1608
|
return Object.assign(
|
|
1609
1609
|
{},
|
|
1610
1610
|
$n_get(uploadConfig, type, {}),
|