fix: 时间范围动态时间兼容老版本
This commit is contained in:
parent
f678ae96ef
commit
62a9a50899
@ -1,4 +1,7 @@
|
||||
import { BASE_MOBILE_STYLE, HYPERLINKS } from '@/components/canvas/custom-component/component-list'
|
||||
import {
|
||||
BASE_MOBILE_STYLE,
|
||||
HYPERLINKS
|
||||
} from '@/components/canvas/custom-component/component-list'
|
||||
|
||||
export function deepCopy(target) {
|
||||
if (typeof target === 'object') {
|
||||
@ -61,7 +64,7 @@ export function mobile2MainCanvas(mainSource, mobileSource) {
|
||||
export function panelInit(componentDatas) {
|
||||
componentDatas.forEach(item => {
|
||||
if (item.component && item.component === 'de-date') {
|
||||
if (item.options.attrs && !item.options.attrs.default) {
|
||||
if (item.serviceName === 'timeDateWidget' && item.options.attrs && !item.options.attrs.default) {
|
||||
item.options.attrs.default = {
|
||||
isDynamic: false,
|
||||
dkey: 0,
|
||||
@ -70,6 +73,18 @@ export function panelInit(componentDatas) {
|
||||
dynamicSuffix: 'before'
|
||||
}
|
||||
}
|
||||
if (item.serviceName === 'timeDateRangeWidget' && item.options.attrs && !item.options.attrs.default) {
|
||||
item.options.attrs.default = {
|
||||
isDynamic: false,
|
||||
dkey: 0,
|
||||
sDynamicPrefix: 1,
|
||||
sDynamicInfill: 'day',
|
||||
sDynamicSuffix: 'before',
|
||||
eDynamicPrefix: 1,
|
||||
eDynamicInfill: 'day',
|
||||
eDynamicSuffix: 'after'
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.filters && item.filters.length > 0) {
|
||||
item.filters = []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user