xaboy / form-create

:fire::fire::fire: 强大的动态表单生成器,通过数据驱动表单渲染,支持可视化设计。提高开发者对表单的开发效率。目前在OA系统、ERP系统、电商系统、流程管理等系统中已稳定应用。

Home Page:https://www.form-create.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MonthPicker 使用getValue值错误

YLeeXIE opened this issue · comments

版本号 (version): @form-create/ant-design-vue@2.5.33

UI 框架的版本 (UI version) :ant-design@3.2.2

问题描述 (Issue):
组件field为MonthPicker 月份组件时使用api.getValue获取到的值出现异常,无法使用dayjs解析;而使用inject.rule[0].value获取到的moment对象value值可以正常进行dayjs格式化,猜测原因可能是/core/src/frame/api.js文件中getValue方法 copy(ctx.rule.value)问题,
dayjs

 {
          type:"MonthPicker",
          field:"startDate",
          inject:true,
          title:'开始月份',
          props:{
               format:"YYYY-MM",
            disabledDate(inject,currentDate){
              const endDate = inject.api.getValue('endDate')
              return false
            }
          }
        },
        {
          type:"MonthPicker",
          field:"endDate",
          inject:true,
          title:'结束月份',
        }

其中endDate 使用dayjs解析报错

endDate 使用dayjs解析正常

猜测原因可能是/core/src/frame/api.js文件中getValue方法 copy(ctx.rule.value)问题,copy方法问题