@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.
@@ -116,8 +116,6 @@ export default {
116
116
  */
117
117
  watch(() => props.modelValue[0].compare, function(compare) {
118
118
 
119
- console.log('compare', props.data, props.modelValue[0].compare)
120
-
121
119
  // 获取当前值
122
120
  const value = props.modelValue[0].value
123
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netang/quasar",
3
- "version": "0.1.97",
3
+ "version": "0.1.98",
4
4
  "description": "netang-quasar",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
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, {}),