jd-opensource / drip-form

基于React和JSONSchema的动态表单解决方案
https://jd-opensource.github.io/drip-form/
MIT License
613 stars 73 forks source link

0.8.2版本引入theme渲染报错unknown keyword: "showError" #275

Closed HangCloud closed 10 months ago

HangCloud commented 10 months ago

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

// 引入@jdfed/drip-form包和@jdfed/drip-form-theme-antd主题包

import DripForm from '@jdfed/drip-form'; import dripTheme from '@jdfed/drip-form-theme-antd';

// 进行渲染 <DripForm onSubmit={(submitReturn) => {}} unitedSchema={themeJson} uiComponents={{ antd: dripTheme }} />

// 控制台报错:Error: strict mode: unknown keyword: "showError"

经过排查发现,drip-form内调用了@jdfed/hooks包中的validate函数,validate函数内调用了ajv.compile函数报错,@jdfed/ajv包中注入ajv对象配置时,registerAjv函数里添加关键字的调用ajv.addVocabulary,缺少了"showError"关键字和“flow”关键字。

Steps to reproduce

  1. 初始化一个react项目
  2. 引入@jdfed/drip-form包和@jdfed/drip-form-theme-antd主题包
  3. 进行组件渲染 <DripForm onSubmit={(submitReturn) => {}} unitedSchema={themeJson} uiComponents={{ antd: dripTheme }} />
  4. 控制台报错

Current behavior

![Uploading 1700636336602.jpg…]()

Expected behavior

期望能尽快发布一个修复版本

Your environment

Reproducible demo

No response

Self-service

mengshang918 commented 10 months ago

可以先试试最新的alpha版本应该已经修复了

github-actions[bot] commented 10 months ago

This issue has been automatically marked as no-issue-activity because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.