@netang/quasar 0.1.48 → 0.1.49
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/img/index.vue +1 -0
- package/package.json +1 -1
- package/utils/getImage.js +8 -0
package/components/img/index.vue
CHANGED
package/package.json
CHANGED
package/utils/getImage.js
CHANGED
|
@@ -6,6 +6,7 @@ import $n_isValidObject from '@netang/utils/isValidObject'
|
|
|
6
6
|
import $n_isValidString from '@netang/utils/isValidString'
|
|
7
7
|
import $n_isNumeric from '@netang/utils/isNumeric'
|
|
8
8
|
import $n_slash from '@netang/utils/slash'
|
|
9
|
+
import $n_split from '@netang/utils/split'
|
|
9
10
|
|
|
10
11
|
import $n_config from './config'
|
|
11
12
|
|
|
@@ -16,6 +17,13 @@ export default function getImage(src, options) {
|
|
|
16
17
|
|
|
17
18
|
if (src) {
|
|
18
19
|
|
|
20
|
+
// 如果是字符串
|
|
21
|
+
if ($n_isValidString(src)) {
|
|
22
|
+
|
|
23
|
+
// 则按照逗号隔开转为数租
|
|
24
|
+
src = $n_split(src, ',')
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
// 如果为数组, 则获取第一个
|
|
20
28
|
if ($n_isValidArray(src)) {
|
|
21
29
|
src = src[0]
|