remove(DatePicker): useless code

This commit is contained in:
songwanli2025@163.com 2020-02-19 16:48:15 +08:00
parent 655860b9e5
commit a9eef23457

View File

@ -158,12 +158,6 @@ const DATE_FORMAT = {
daterange: 'yyyy-MM-dd', daterange: 'yyyy-MM-dd',
datetimerange: 'yyyy-MM-dd HH:mm:ss' datetimerange: 'yyyy-MM-dd HH:mm:ss'
} }
const DATE_VALIDATE_FORMAT = {
date: ['yyyy-MM-dd', 'yyyy-MM-D', 'yyyy-M-D', 'yyyy-M-dd'],
datetime: ['yyyy-MM-dd HH:mm:ss', 'yyyy-MM-D HH:mm:ss', 'yyyy-M-D HH:mm:ss', 'yyyy-M-dd HH:mm:ss'],
daterange: ['yyyy-MM-dd', 'yyyy-MM-D', 'yyyy-M-D', 'yyyy-M-dd'],
datetimerange: ['yyyy-MM-dd HH:mm:ss', 'yyyy-MM-D HH:mm:ss', 'yyyy-M-D HH:mm:ss', 'yyyy-M-dd HH:mm:ss']
}
export default { export default {
name: 'NDatePicker', name: 'NDatePicker',
@ -311,9 +305,6 @@ export default {
return this.endPlaceholder return this.endPlaceholder
} }
}, },
computedValidateFormat () {
return DATE_VALIDATE_FORMAT[this.type]
},
computedFormat () { computedFormat () {
return this.format || DATE_FORMAT[this.type] return this.format || DATE_FORMAT[this.type]
} }