doway-coms 2.6.6 → 2.6.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "2.6.6",
3
+ "version": "2.6.7",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -443,6 +443,9 @@ export function secondDisplayTime(value) {
443
443
  export function gridDefaultValueDisplay(rowInfo,colInfo){
444
444
  let colControlType = colInfo.params.controlType
445
445
  let displayValue = rowInfo[colInfo.field]
446
+ if(displayValue===null){
447
+ return ''
448
+ }
446
449
  switch(colControlType){
447
450
  case controlType.checkbox:
448
451
  displayValue = displayValue===true?'是':'否'
@@ -475,10 +478,9 @@ export function gridDefaultValueDisplay(rowInfo,colInfo){
475
478
  if(colInfo.params&&colInfo.params.formatMethod){
476
479
  displayValue=colInfo.params.formatMethod(displayValue)
477
480
  }else{
478
- displayValue=moment(displayValue).format(colInfo.params.format)
481
+ displayValue=moment(displayValue).format(colInfo.params.format?colInfo.params.format:'YYYY-MM-DD')
479
482
  }
480
483
  break
481
-
482
484
  }
483
485
  return displayValue
484
486
  }