jd-opensource / drip-form

基于React和JSONSchema的动态表单解决方案

Home Page:https://jd-opensource.github.io/drip-form/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

HangCloud opened this issue · comments

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of DripForm、DripFormTheme.
  • I have read the console error message carefully (if applicable).

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

  • DripForm version used:
  • DripFormTheme used:
  • DripFormTheme version used:

Reproducible demo

No response

Self-service

  • I'd be willing to fix this bug myself.

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

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.