fix: 日期过滤默认值兼容老版本

This commit is contained in:
fit2cloud-chenyw 2022-02-08 10:55:20 +08:00
parent 9fc6cedca3
commit a846a8fe74
4 changed files with 4 additions and 4 deletions

View File

@ -227,7 +227,7 @@ class TimeDateRangeServiceImpl extends WidgetService {
}
getParam(element) {
let timeArr = []
if (element.options.attrs.default.isDynamic) {
if (element.options.attrs.default && element.options.attrs.default.isDynamic) {
let value = this.dynamicDateFormNow(element)
value = this.formatFilterValue(value)
timeArr = this.formatValues(value, element)

View File

@ -157,7 +157,7 @@ class TimeDateServiceImpl extends WidgetService {
}
getParam(element) {
let timeArr = []
if (element.options.attrs.default.isDynamic) {
if (element.options.attrs.default && element.options.attrs.default.isDynamic) {
let value = this.dynamicDateFormNow(element)
value = this.formatFilterValue(value)
timeArr = this.formatValues(value, element)

View File

@ -123,7 +123,7 @@ class TimeMonthServiceImpl extends WidgetService {
}
getParam(element) {
let timeArr = []
if (element.options.attrs.default.isDynamic) {
if (element.options.attrs.default && element.options.attrs.default.isDynamic) {
let value = this.dynamicDateFormNow(element)
value = this.formatFilterValue(value)
timeArr = this.formatValues(value, element)

View File

@ -114,7 +114,7 @@ class TimeYearServiceImpl extends WidgetService {
}
getParam(element) {
let timeArr = []
if (element.options.attrs.default.isDynamic) {
if (element.options.attrs.default && element.options.attrs.default.isDynamic) {
let value = this.dynamicDateFormNow(element)
value = this.formatFilterValue(value)
timeArr = this.formatValues(value, element)