@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.
@@ -134,6 +134,7 @@ export default {
134
134
  * 当前图片地址
135
135
  */
136
136
  const currentSrc = computed(function () {
137
+ console.log('---props.src', props.src)
137
138
  const res = $n_getImage(props.src, { w: props.width, zoom: true })
138
139
  if (res) {
139
140
  return res
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netang/quasar",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "netang-quasar",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
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]