Unverified 提交 abf0a4a5 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw 提交者: GitHub

Merge pull request #1628 from dataease/pr@dev@refactor_dynamic_filter_year_month

refactor: 优化年月过滤组件动态时间
......@@ -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()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论