@netang/quasar 0.2.48 → 0.2.50

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.
@@ -267,7 +267,7 @@
267
267
  >
268
268
  <q-item-section>
269
269
  <q-input
270
- class="n-field-fieldset"
270
+ class="n-field-fieldset n-field--console"
271
271
  v-model="formData.requestQuery.list[itemIndex]"
272
272
  placeholder="请输入参数"
273
273
  outlined
@@ -301,7 +301,7 @@
301
301
  >
302
302
  <q-item-section>
303
303
  <q-input
304
- class="n-field-fieldset"
304
+ class="n-field-fieldset n-field--console"
305
305
  v-model="formData.requestQuery.query[itemIndex]"
306
306
  placeholder="请输入参数"
307
307
  outlined
@@ -331,7 +331,7 @@
331
331
  <div class="col-xs-12">
332
332
  <q-input
333
333
  style="max-width:800px"
334
- class="n-field-fieldset"
334
+ class="n-field-fieldset n-field--console"
335
335
  v-model="formData.params"
336
336
  placeholder="请输入参数"
337
337
  outlined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netang/quasar",
3
- "version": "0.2.48",
3
+ "version": "0.2.50",
4
4
 
5
5
  "description": "netang-quasar",
6
6
  "scripts": {
package/utils/$table.js CHANGED
@@ -10,6 +10,7 @@ import $n_findIndex from 'lodash/findIndex'
10
10
  import $n_uniq from 'lodash/uniq'
11
11
  import $n_concat from 'lodash/concat'
12
12
  import $n_isNil from 'lodash/isNil'
13
+ import $n_isArray from 'lodash/isArray'
13
14
 
14
15
  import $n_router from '@netang/utils/vue/router'
15
16
 
@@ -336,7 +337,16 @@ function create(options) {
336
337
  // 如果有数据字典
337
338
  } else if ($n_has(item, 'dict')) {
338
339
  if (! $n_has(item, 'format')) {
339
- item.format = val => $n_dict(item.dict, val)
340
+ item.format = $n_isArray(item.dict)
341
+ ? function (val) {
342
+ for (const e of item.dict) {
343
+ if (e.value === val) {
344
+ return e.label
345
+ }
346
+ }
347
+ return ''
348
+ }
349
+ : val => $n_dict(item.dict, val)
340
350
  }
341
351
 
342
352
  // 如果有图片
@@ -381,7 +381,7 @@ export async function getOptions(rawSearchOptions, format) {
381
381
  $n_merge(newItem, {
382
382
  searchType: 'select',
383
383
  select: {
384
- options: $n_dictOptions(newItem.dict)
384
+ options: $n_isArray(newItem.dict) ? newItem.dict : $n_dictOptions(newItem.dict),
385
385
  },
386
386
  })
387
387