diff --git a/web/src/components/Plugin/PluginDetail.tsx b/web/src/components/Plugin/PluginDetail.tsx index 41480125e5..882a910c7a 100644 --- a/web/src/components/Plugin/PluginDetail.tsx +++ b/web/src/components/Plugin/PluginDetail.tsx @@ -107,6 +107,7 @@ const PluginDetail: React.FC = ({ const [UIForm] = Form.useForm(); const data = initialData[name] || {}; const pluginType = pluginList.find((item) => item.name === name)?.originType; + const pluginSchema = pluginList.find((item) => item.name === name)?.schema; const [content, setContent] = useState(JSON.stringify(data, null, 2)); const [monacoMode, setMonacoMode] = useState(monacoModeList.JSON); const modeOptions: { label: string; value: string }[] = [ @@ -411,7 +412,7 @@ const PluginDetail: React.FC = ({ ]} /> - {Boolean(monacoMode === monacoModeList.UIForm) && } + {Boolean(monacoMode === monacoModeList.UIForm) && }
| undefined, form: FormInstance, renderForm: boolean } export const PLUGIN_UI_LIST = ['api-breaker', 'basic-auth', 'cors', 'limit-req', 'limit-conn', 'proxy-mirror', 'referer-restriction', 'limit-count']; -export const PluginForm: React.FC = ({ name, renderForm, form }) => { +export const PluginForm: React.FC = ({ name, schema, renderForm, form }) => { const { formatMessage } = useIntl();