From 2170371b0205b18179198c5a3b6e60f6d3d07667 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 12 Jan 2022 11:27:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=B9=B4?= =?UTF-8?q?=E6=9C=88=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index dbc4161bd4..f0ef0184bd 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -66,7 +66,8 @@ 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.options.attrs && + (!item.options.attrs.default || (item.serviceName === 'timeYearWidget' && item.options.attrs.default.dynamicInfill !== 'year') || (item.serviceName === 'timeMonthWidget' && item.options.attrs.default.dynamicInfill !== 'month'))) { const widget = ApplicationContext.getService(item.serviceName) if (widget && widget.defaultSetting) { item.options.attrs.default = widget.defaultSetting()