@netang/quasar 0.0.48 → 0.0.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.
Files changed (56) hide show
  1. package/components/dialog/index.vue +10 -10
  2. package/components/dialog-table/index.vue +1 -1
  3. package/components/dragger/index.vue +2 -2
  4. package/components/drawer/index.vue +7 -7
  5. package/components/field-date/index.vue +35 -35
  6. package/components/field-table/index.vue +34 -34
  7. package/components/field-text/index.vue +2 -2
  8. package/components/field-tree/index.vue +18 -18
  9. package/components/input-number/index.vue +2 -2
  10. package/components/list-menu/index.vue +2 -2
  11. package/components/private/components/move-to-tree/index.vue +2 -2
  12. package/components/private/edit-power-data/index.vue +50 -50
  13. package/components/private/table-visible-columns-button/index.vue +2 -2
  14. package/components/render/index.vue +6 -6
  15. package/components/search/index.vue +2 -2
  16. package/components/search-item/index.vue +5 -5
  17. package/components/select/index.vue +2 -2
  18. package/components/splitter/index.vue +7 -7
  19. package/components/table/index.vue +5 -5
  20. package/components/table-splitter/index.vue +3 -3
  21. package/components/table-summary/index.vue +3 -3
  22. package/components/thumbnail/index.vue +6 -6
  23. package/components/uploader/index.vue +1 -1
  24. package/components/uploader-query/index.vue +25 -25
  25. package/components/value-format/index.vue +12 -12
  26. package/package.json +1 -1
  27. package/utils/$area.js +13 -13
  28. package/utils/$auth.js +6 -6
  29. package/utils/$dialog.js +3 -3
  30. package/utils/$form.js +2 -2
  31. package/utils/$power.js +118 -118
  32. package/utils/$rule.js +4 -4
  33. package/utils/$search.js +50 -50
  34. package/utils/$table.js +76 -76
  35. package/utils/$tree.js +43 -43
  36. package/utils/$uploader.js +47 -47
  37. package/utils/alert.js +1 -1
  38. package/utils/arr.js +2 -2
  39. package/utils/bus.js +1 -1
  40. package/utils/config.js +4 -4
  41. package/utils/confrim.js +1 -1
  42. package/utils/dict.js +5 -5
  43. package/utils/getData.js +9 -9
  44. package/utils/getFile.js +5 -5
  45. package/utils/getImage.js +12 -12
  46. package/utils/getTime.js +4 -4
  47. package/utils/http.js +20 -20
  48. package/utils/loading.js +1 -1
  49. package/utils/notify.js +1 -1
  50. package/utils/previewImage.js +2 -2
  51. package/utils/price.js +3 -3
  52. package/utils/timestamp.js +1 -1
  53. package/utils/toast.js +1 -1
  54. package/utils/uploader/qiniu.js +11 -11
  55. package/utils/useAuth.js +2 -2
  56. package/utils/useRouter.js +4 -4
@@ -184,10 +184,10 @@ export default {
184
184
 
185
185
  function setWH(style, field, sign) {
186
186
  if (props[field]) {
187
- if (utils.indexOf(props[field], '%') > -1) {
187
+ if ($n.indexOf(props[field], '%') > -1) {
188
188
  style[field] = props[field].replace('%', sign)
189
189
  } else {
190
- style[field] = utils.px(props[field])
190
+ style[field] = $n.px(props[field])
191
191
  }
192
192
  }
193
193
  }
@@ -231,10 +231,10 @@ export default {
231
231
  // 如果是路由路径
232
232
  if (props.route) {
233
233
  // 获取路由组件
234
- comp = _.get(routers, `${utils.slash(props.route, 'start', false)}.component`)
234
+ comp = $n.get(routers, `${$n.slash(props.route, 'start', false)}.component`)
235
235
 
236
236
  // 如果有组件标识
237
- } else if (props.name && _.has(components, props.name)) {
237
+ } else if (props.name && $n.has(components, props.name)) {
238
238
  // 获取自定义组件
239
239
  comp = components[props.name]
240
240
  }
@@ -245,7 +245,7 @@ export default {
245
245
  }
246
246
 
247
247
  // 如果是方法, 则说明是异步组件
248
- if (_.isFunction(comp)) {
248
+ if ($n.isFunction(comp)) {
249
249
  return defineAsyncComponent(comp)
250
250
  }
251
251
 
@@ -265,7 +265,7 @@ export default {
265
265
 
266
266
  return props.route ?
267
267
  // 如果是路由路径, 则获取路由标题
268
- _.get(routers, `${utils.slash(props.route, 'start', false)}.meta.title`, '')
268
+ $n.get(routers, `${$n.slash(props.route, 'start', false)}.meta.title`, '')
269
269
  : ''
270
270
  })
271
271
 
@@ -285,17 +285,17 @@ export default {
285
285
  async function onDialogConfirm() {
286
286
 
287
287
  // 如果有确定按钮
288
- if (_.isFunction(props.onConfirm)) {
288
+ if ($n.isFunction(props.onConfirm)) {
289
289
 
290
- if (! _.isFunction(compSubmit)) {
290
+ if (! $n.isFunction(compSubmit)) {
291
291
  // 轻提示
292
- utils.toast({
292
+ $n.toast({
293
293
  message: '未调用 $dialog.submit 方法',
294
294
  })
295
295
  return
296
296
  }
297
297
 
298
- const res = await utils.runAsync(props.onConfirm)(await utils.runAsync(compSubmit)(), hide)
298
+ const res = await $n.runAsync(props.onConfirm)(await $n.runAsync(compSubmit)(), hide)
299
299
  if (res === false) {
300
300
  return
301
301
  }
@@ -53,7 +53,7 @@ export default {
53
53
  function onDialog() {
54
54
 
55
55
  // 创建对话框
56
- utils.$dialog.create({
56
+ $n.$dialog.create({
57
57
  // 标题
58
58
  title: props.title,
59
59
  // 宽
@@ -68,7 +68,7 @@ export default {
68
68
  */
69
69
  const isDrag = computed(function() {
70
70
  return props.drag
71
- && utils.isValidArray(props.modelValue)
71
+ && $n.isValidArray(props.modelValue)
72
72
  && props.modelValue.length > 1
73
73
  })
74
74
 
@@ -101,7 +101,7 @@ export default {
101
101
  if (isDrag.value) {
102
102
 
103
103
  // 如果为火狐浏览器, 则必须要setData
104
- // if (_.ua.firefox) {
104
+ // if ($n.ua.firefox) {
105
105
  // e.dataTransfer.setData('info', e.target.id)
106
106
  // }
107
107
 
@@ -126,7 +126,7 @@ export default {
126
126
  }
127
127
 
128
128
  // 创建防抖睡眠方法
129
- const sleep = utils.debounceSleep()
129
+ const sleep = $n.debounceSleep()
130
130
 
131
131
  // 缓存名
132
132
  let cacheName = ''
@@ -138,10 +138,10 @@ export default {
138
138
  if ($q.platform.is.mobile) {
139
139
 
140
140
  // 获取手机端百分比值
141
- let res = utils.percentValue(props.mobileWidth, true)
141
+ let res = $n.percentValue(props.mobileWidth, true)
142
142
 
143
143
  // 如果是百分比值
144
- if (! _.isNil(res)) {
144
+ if (! $n.isNil(res)) {
145
145
  // 原始尺寸 = 屏幕宽度 * 百分比
146
146
  if (res) {
147
147
  originalWidth = $q.screen.width * res
@@ -149,7 +149,7 @@ export default {
149
149
 
150
150
  } else {
151
151
  // 原始尺寸 = 屏幕宽度像素
152
- res = utils.pxValue(props.mobileWidth)
152
+ res = $n.pxValue(props.mobileWidth)
153
153
  if (res) {
154
154
  originalWidth = res
155
155
  }
@@ -159,10 +159,10 @@ export default {
159
159
  } else if (props.drag && props.cache) {
160
160
 
161
161
  // 设置缓存名
162
- cacheName = `drawer:${props.side}:${props.cache === true ? ($power && $power.routePath ? $power.routePath : utils.router.getRoute('path')) : props.cache}`
162
+ cacheName = `drawer:${props.side}:${props.cache === true ? ($power && $power.routePath ? $power.routePath : $n.router.getRoute('path')) : props.cache}`
163
163
 
164
164
  // 从缓存获取宽度
165
- const cache = utils.storage.get(cacheName)
165
+ const cache = $n.storage.get(cacheName)
166
166
  if (cache) {
167
167
  originalWidth = cache
168
168
  }
@@ -247,7 +247,7 @@ export default {
247
247
  sleep(500)
248
248
  .then(function () {
249
249
  // 设置缓存(永久缓存)
250
- utils.storage.set(cacheName, newWidth, 0)
250
+ $n.storage.set(cacheName, newWidth, 0)
251
251
  })
252
252
  }
253
253
  }
@@ -197,17 +197,17 @@ export default {
197
197
 
198
198
  // 是否为选择
199
199
  const isSelect = computed(function() {
200
- return utils.indexOf(['year', 'month', 'time'], props.type) > -1
200
+ return $n.indexOf(['year', 'month', 'time'], props.type) > -1
201
201
  })
202
202
 
203
203
  // 是否为范围
204
204
  const isRange = computed(function() {
205
- return utils.indexOf(['daterange', 'datetimerange'], props.type) > -1
205
+ return $n.indexOf(['daterange', 'datetimerange'], props.type) > -1
206
206
  })
207
207
 
208
208
  // 是否为选择时间
209
209
  const isDatetime = computed(function() {
210
- return utils.indexOf(['datetime', 'datetimerange'], props.type) > -1
210
+ return $n.indexOf(['datetime', 'datetimerange'], props.type) > -1
211
211
  })
212
212
 
213
213
  // 选择数据列表
@@ -222,14 +222,14 @@ export default {
222
222
  lists: []
223
223
  }
224
224
  for (let i = 0; i <= 23; i++) {
225
- hh.lists.push([i, _.padStart(String(i), 2, '0')])
225
+ hh.lists.push([i, $n.padStart(String(i), 2, '0')])
226
226
  }
227
227
  const ii = {
228
228
  type: 'ii',
229
229
  lists: []
230
230
  }
231
231
  for (let i = 0; i <= 59; i++) {
232
- ii.lists.push([i, _.padStart(String(i), 2, '0')])
232
+ ii.lists.push([i, $n.padStart(String(i), 2, '0')])
233
233
  }
234
234
  arr.push(hh, ii)
235
235
  if (props.showSecond) {
@@ -238,7 +238,7 @@ export default {
238
238
  lists: []
239
239
  }
240
240
  for (let i = 0; i <= 59; i++) {
241
- ss.lists.push([i, _.padStart(String(i), 2, '0')])
241
+ ss.lists.push([i, $n.padStart(String(i), 2, '0')])
242
242
  }
243
243
  arr.push(ss)
244
244
  }
@@ -267,7 +267,7 @@ export default {
267
267
  lists: []
268
268
  }
269
269
  for (let i = 1; i <= 12; i++) {
270
- mm.lists.push([i, _.padStart(String(i), 2, '0')])
270
+ mm.lists.push([i, $n.padStart(String(i), 2, '0')])
271
271
  }
272
272
 
273
273
  arr.push(mm)
@@ -333,9 +333,9 @@ export default {
333
333
  ii: '',
334
334
  })
335
335
 
336
- if (utils.isDate(val)) {
336
+ if ($n.isDate(val)) {
337
337
 
338
- const { hh, ii, ss } = utils.dateObject(val)
338
+ const { hh, ii, ss } = $n.dateObject(val)
339
339
 
340
340
  // 设置时间数据
341
341
  Object.assign(obj, {
@@ -368,8 +368,8 @@ export default {
368
368
  obj.y = val
369
369
 
370
370
  // 否则如果是日期格式
371
- } else if (utils.isDate(val)) {
372
- const { y } = utils.dateObject(val)
371
+ } else if ($n.isDate(val)) {
372
+ const { y } = $n.dateObject(val)
373
373
  obj.y = y
374
374
  }
375
375
  }
@@ -380,13 +380,13 @@ export default {
380
380
  // 否则是选择月
381
381
 
382
382
  // 如果是这样的格式 202207, 则转换为 2022-07
383
- const newVal = utils.ymd.toString(val)
383
+ const newVal = $n.ymd.toString(val)
384
384
  if (newVal) {
385
385
  val = newVal
386
386
  }
387
387
 
388
- if (utils.isDate(val)) {
389
- const { y, mm } = utils.dateObject(val)
388
+ if ($n.isDate(val)) {
389
+ const { y, mm } = $n.dateObject(val)
390
390
  Object.assign(obj, {
391
391
  y,
392
392
  mm,
@@ -404,13 +404,13 @@ export default {
404
404
  let to = ''
405
405
 
406
406
  // 如果是这样的格式 20220708, 则转换为 2022-07-08
407
- const newVal = utils.ymd.toString(val)
407
+ const newVal = $n.ymd.toString(val)
408
408
  if (newVal) {
409
409
  val = newVal
410
410
  }
411
411
 
412
- if (utils.isDate(val)) {
413
- const { y, mm, dd } = utils.dateObject(val)
412
+ if ($n.isDate(val)) {
413
+ const { y, mm, dd } = $n.dateObject(val)
414
414
  from = `${y}/${mm}/${dd}`
415
415
 
416
416
  // 如果不是日期选择范围, 则返回单个日期
@@ -420,8 +420,8 @@ export default {
420
420
  }
421
421
 
422
422
  // 如果是日期选择范围
423
- if (isRange.value && utils.isDate(props.end)) {
424
- const { y, mm, dd } = utils.dateObject(props.end)
423
+ if (isRange.value && $n.isDate(props.end)) {
424
+ const { y, mm, dd } = $n.dateObject(props.end)
425
425
  to = `${y}/${mm}/${dd}`
426
426
  }
427
427
 
@@ -441,8 +441,8 @@ export default {
441
441
  to: '',
442
442
  }
443
443
 
444
- if (utils.isDate(props.modelValue)) {
445
- const { hh, ii, ss } = utils.dateObject(props.modelValue)
444
+ if ($n.isDate(props.modelValue)) {
445
+ const { hh, ii, ss } = $n.dateObject(props.modelValue)
446
446
  obj.from = `${hh}:${ii}`
447
447
  if (props.showSecond) {
448
448
  obj.from += `:${ss}`
@@ -455,8 +455,8 @@ export default {
455
455
  obj.from = props.showSecond ? '00:00:00' : '00:00'
456
456
  }
457
457
 
458
- if (isRange.value && utils.isDate(props.end)) {
459
- const { hh, ii, ss } = utils.dateObject(props.end)
458
+ if (isRange.value && $n.isDate(props.end)) {
459
+ const { hh, ii, ss } = $n.dateObject(props.end)
460
460
  obj.to = `${hh}:${ii}`
461
461
  if (props.showSecond) {
462
462
  obj.to += `:${ss}`
@@ -482,9 +482,9 @@ export default {
482
482
  // 如果是选择时间
483
483
  if (props.type === 'time') {
484
484
  if (
485
- ! utils.isValidValue(dateValue.hh)
486
- || ! utils.isValidValue(dateValue.ii)
487
- || (props.showSecond && ! utils.isValidValue(dateValue.ss))) {
485
+ ! $n.isValidValue(dateValue.hh)
486
+ || ! $n.isValidValue(dateValue.ii)
487
+ || (props.showSecond && ! $n.isValidValue(dateValue.ss))) {
488
488
  return ''
489
489
  }
490
490
  format = 'HH:mm'
@@ -495,13 +495,13 @@ export default {
495
495
 
496
496
  // 否则是选择年月
497
497
  } else {
498
- if (! utils.isValidValue(dateValue.y)) {
498
+ if (! $n.isValidValue(dateValue.y)) {
499
499
  return ''
500
500
  }
501
501
 
502
502
  const isMonth = props.type === 'month'
503
503
  if (isMonth) {
504
- if (! utils.isValidValue(dateValue.mm)) {
504
+ if (! $n.isValidValue(dateValue.mm)) {
505
505
  return ''
506
506
  }
507
507
 
@@ -526,7 +526,7 @@ export default {
526
526
  return ''
527
527
  }
528
528
 
529
- if (! utils.isRequired(dateValue)) {
529
+ if (! $n.isRequired(dateValue)) {
530
530
  return ''
531
531
  }
532
532
 
@@ -538,8 +538,8 @@ export default {
538
538
  } = dateValue
539
539
 
540
540
  if (
541
- ! utils.isValidValue(from)
542
- || ! utils.isValidValue(to)
541
+ ! $n.isValidValue(from)
542
+ || ! $n.isValidValue(to)
543
543
  ) {
544
544
  return ''
545
545
  }
@@ -616,7 +616,7 @@ export default {
616
616
  function onUpdateDateValue(val) {
617
617
 
618
618
  // 如果为 null, 则清空数据
619
- if (_.isNil(val)) {
619
+ if ($n.isNil(val)) {
620
620
  emit('update:modelValue', null)
621
621
  if (isRange.value) {
622
622
  emit('update:end', null)
@@ -698,7 +698,7 @@ export default {
698
698
  * 提交
699
699
  */
700
700
  function onEmit(key, value) {
701
- emit(key, utils.numberDeep(value))
701
+ emit(key, $n.numberDeep(value))
702
702
  }
703
703
 
704
704
  /**
@@ -712,9 +712,9 @@ export default {
712
712
  nextTick(function() {
713
713
 
714
714
  // 遍历选择列表
715
- utils.forEach(selectLists.value, function(selectItem, selectItemIndex) {
715
+ $n.forEach(selectLists.value, function(selectItem, selectItemIndex) {
716
716
  // 遍历选单个列表
717
- utils.forEach(selectItem.lists, function(item, itemIndex) {
717
+ $n.forEach(selectItem.lists, function(item, itemIndex) {
718
718
  if (dateValue.value[selectItem.type] !== '' && dateValue.value[selectItem.type] == item[0]) {
719
719
  scrollRef.value[selectItemIndex].setScrollPosition('vertical', 32 * itemIndex, 0)
720
720
  return true
@@ -287,7 +287,7 @@ export default {
287
287
  * 插槽标识
288
288
  */
289
289
  const slotNames = computed(function() {
290
- return utils.isValidObject(slots) ? Object.keys(slots) : []
290
+ return $n.isValidObject(slots) ? Object.keys(slots) : []
291
291
  })
292
292
 
293
293
  /**
@@ -301,7 +301,7 @@ export default {
301
301
  * 当前显示字段
302
302
  */
303
303
  const currentShowKeys = computed(function() {
304
- return _.uniq(utils.isValidArray(props.showKeys)
304
+ return $n.uniq($n.isValidArray(props.showKeys)
305
305
  ? props.showKeys
306
306
  : [ props.valueKey, currentlabelKey.value ])
307
307
  })
@@ -319,7 +319,7 @@ export default {
319
319
  const showValue = computed(function () {
320
320
 
321
321
  // 如果有已选数据
322
- return utils.isValidArray(selected.value)
322
+ return $n.isValidArray(selected.value)
323
323
  // 取已选数据第一条
324
324
  ? currentFormatLabel(selected.value[0])
325
325
  : ''
@@ -329,9 +329,9 @@ export default {
329
329
 
330
330
 
331
331
  // 创建权限实例
332
- const $power = utils.$power.create({
332
+ const $power = $n.$power.create({
333
333
  // 路由路径
334
- path: utils.isValidString(props.path) ? props.path : false,
334
+ path: $n.isValidString(props.path) ? props.path : false,
335
335
  // 路由参数
336
336
  query: props.query,
337
337
  // 关闭权限页面
@@ -344,7 +344,7 @@ export default {
344
344
  } = $power
345
345
 
346
346
  // 创建表格实例
347
- const $table = utils.$table.create({
347
+ const $table = $n.$table.create({
348
348
  // 权限实例
349
349
  $power,
350
350
  // 附加请求数据
@@ -372,7 +372,7 @@ export default {
372
372
  })
373
373
 
374
374
  // 创建防抖睡眠方法
375
- const sleep = utils.debounceSleep()
375
+ const sleep = $n.debounceSleep()
376
376
 
377
377
  // 输入框节点
378
378
  const inputRef = ref(null)
@@ -502,7 +502,7 @@ export default {
502
502
  await sleep(props.inputDebounce)
503
503
 
504
504
  // 是否有值
505
- const hasValue = utils.isValidValue(val)
505
+ const hasValue = $n.isValidValue(val)
506
506
 
507
507
  const n_search = {}
508
508
  n_search[currentFilterKey.value] = [
@@ -605,14 +605,14 @@ export default {
605
605
  function currentFormatLabel(item) {
606
606
 
607
607
  // 如果有格式化显示标签方法
608
- if (_.isFunction(props.formatLabel)) {
608
+ if ($n.isFunction(props.formatLabel)) {
609
609
  // 执行格式化显示标签方法
610
610
  return props.formatLabel(item)
611
611
  }
612
612
 
613
613
  // 否则显示该值的标签字段
614
614
  const val = item[currentlabelKey.value]
615
- return utils.isValidValue(val) ? val : item[props.valueKey]
615
+ return $n.isValidValue(val) ? val : item[props.valueKey]
616
616
  }
617
617
 
618
618
  /**
@@ -634,13 +634,13 @@ export default {
634
634
  if (props.valueType === 'objectArray') {
635
635
 
636
636
  // 如果是有效数组
637
- if (utils.isValidArray(val)) {
637
+ if ($n.isValidArray(val)) {
638
638
  for (const item of val) {
639
639
  if (
640
640
  // 如果元素不是有效对象
641
- ! utils.isValidObject(item)
641
+ ! $n.isValidObject(item)
642
642
  // 如果元素没有值字段
643
- || ! _.has(item, props.valueKey)
643
+ || ! $n.has(item, props.valueKey)
644
644
  ) {
645
645
  return []
646
646
  }
@@ -660,11 +660,11 @@ export default {
660
660
  || ! routePath
661
661
  ) {
662
662
  // 将值转为数组
663
- val = props.valueType === 'string' ? utils.split(val, props.valueSeparator) : val
663
+ val = props.valueType === 'string' ? $n.split(val, props.valueSeparator) : val
664
664
 
665
665
  // 如果是有效数组
666
- if (utils.isValidArray(val)) {
667
- val = val.filter(e => utils.isValidValue(e))
666
+ if ($n.isValidArray(val)) {
667
+ val = val.filter(e => $n.isValidValue(e))
668
668
  return toSelected ? val.map(e => setSelectedItem(e)) : val
669
669
  }
670
670
  }
@@ -705,7 +705,7 @@ export default {
705
705
  }
706
706
 
707
707
  // 返回转为分隔符隔开的字符串
708
- return utils.numberDeep(utils.join(values, props.valueSeparator))
708
+ return $n.numberDeep($n.join(values, props.valueSeparator))
709
709
  }
710
710
 
711
711
  /**
@@ -714,7 +714,7 @@ export default {
714
714
  async function onRequestSelected(value) {
715
715
 
716
716
  // 请求数据
717
- const { status, data } = await utils.http({
717
+ const { status, data } = await $n.http({
718
718
  url: $table.routePath,
719
719
  data: Object.assign(
720
720
  // 获取表格请求数据
@@ -743,7 +743,7 @@ export default {
743
743
  ),
744
744
  })
745
745
 
746
- return status && utils.isValidArray(_.get(data, 'rows')) ? data.rows : []
746
+ return status && $n.isValidArray($n.get(data, 'rows')) ? data.rows : []
747
747
  }
748
748
 
749
749
  /**
@@ -754,24 +754,24 @@ export default {
754
754
  let columns
755
755
 
756
756
  // 如果有声明路由表格列数据
757
- if (utils.isValidArray(props.columns)) {
758
- columns = _.cloneDeep(props.columns)
757
+ if ($n.isValidArray(props.columns)) {
758
+ columns = $n.cloneDeep(props.columns)
759
759
 
760
760
  // 如果有路由路径
761
761
  } else if (routePath) {
762
762
  // 否则如果有路由表格列数据
763
- const rawTableColumns = utils.$table.config(routePath, 'columns')
764
- if (utils.isValidArray(rawTableColumns)) {
765
- columns = _.cloneDeep(rawTableColumns)
763
+ const rawTableColumns = $n.$table.config(routePath, 'columns')
764
+ if ($n.isValidArray(rawTableColumns)) {
765
+ columns = $n.cloneDeep(rawTableColumns)
766
766
  }
767
767
  }
768
768
 
769
- if (utils.isValidArray(columns)) {
770
- if (utils.isValidArray(props.hideSearchKeys)) {
769
+ if ($n.isValidArray(columns)) {
770
+ if ($n.isValidArray(props.hideSearchKeys)) {
771
771
  for (const item of columns) {
772
772
  if (
773
773
  props.hideSearchKeys.indexOf(item.name) > -1
774
- && _.has(item, 'search')
774
+ && $n.has(item, 'search')
775
775
  ) {
776
776
  item.search.hide = true
777
777
  }
@@ -791,21 +791,21 @@ export default {
791
791
  const columns = []
792
792
 
793
793
  // 如果有原始表格列数据
794
- if (utils.isValidArray($table.tableColumns)) {
794
+ if ($n.isValidArray($table.tableColumns)) {
795
795
 
796
796
  // 克隆原始表格列数据
797
- const rawTableColumns = _.cloneDeep($table.tableColumns)
797
+ const rawTableColumns = $n.cloneDeep($table.tableColumns)
798
798
 
799
799
  // 快捷表格显示的属性名称数组
800
- utils.forEach(currentShowKeys.value, function (key) {
800
+ $n.forEach(currentShowKeys.value, function (key) {
801
801
  for (const item of rawTableColumns) {
802
802
  if (item.name === key) {
803
803
  // 删除搜索字段
804
- if (_.has(item, 'search')) {
804
+ if ($n.has(item, 'search')) {
805
805
  delete item.search
806
806
  }
807
807
  // 删除可见字段
808
- if (_.has(item, 'visible')) {
808
+ if ($n.has(item, 'visible')) {
809
809
  delete item.visible
810
810
  }
811
811
  columns.push(item)
@@ -982,7 +982,7 @@ export default {
982
982
  opt[props.valueKey] = row[props.valueKey]
983
983
 
984
984
  // 获取当前数据索引
985
- const itemIndex = _.findIndex(_selected, opt)
985
+ const itemIndex = $n.findIndex(_selected, opt)
986
986
 
987
987
  // 如果不存在
988
988
  if (itemIndex === -1) {
@@ -1049,7 +1049,7 @@ export default {
1049
1049
  onUpdated(function () {
1050
1050
  if (
1051
1051
  popupRef.value
1052
- && _.has(popupRef.value, 'currentComponent.ref.updatePosition')
1052
+ && $n.has(popupRef.value, 'currentComponent.ref.updatePosition')
1053
1053
  ) {
1054
1054
  popupRef.value.currentComponent.ref.updatePosition()
1055
1055
  }
@@ -131,7 +131,7 @@ export default {
131
131
  const slotNames = computed(function() {
132
132
  const lists = []
133
133
 
134
- utils.forIn(slots, function(val, key) {
134
+ $n.forIn(slots, function(val, key) {
135
135
  if (key !== 'default') {
136
136
  lists.push(key)
137
137
  }
@@ -148,7 +148,7 @@ export default {
148
148
  function onCopy() {
149
149
  const val = props.copyText || props.value
150
150
  if (val) {
151
- utils.copy(val, `复制【${props.label}】成功`)
151
+ $n.copy(val, `复制【${props.label}】成功`)
152
152
  }
153
153
  }
154
154