From 605cfb718287fb3e9c02d126f8508d6393b77148 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Mon, 7 Jul 2025 23:31:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E5=B0=9D=E8=AF=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service-web/client/src/util/amis.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/service-web/client/src/util/amis.tsx b/service-web/client/src/util/amis.tsx index a0c130a..54f8aa2 100644 --- a/service-web/client/src/util/amis.tsx +++ b/service-web/client/src/util/amis.tsx @@ -1,4 +1,4 @@ -import {AlertComponent, attachmentAdpator, makeTranslator, render, type Schema, ToastComponent} from 'amis' +import {addRule, AlertComponent, attachmentAdpator, makeTranslator, render, type Schema, ToastComponent} from 'amis' import 'amis/lib/themes/antd.css' import 'amis/lib/helper.css' @@ -162,6 +162,14 @@ export const amisRender = (schema: Schema, data: Record = {}) => { ) } +addRule( + 'isOptionsValid', + (values, value: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => { + console.log(values, value, arg1, arg2, arg3, arg4, arg5) + return false + }, +) + function generateLokiPanel(queries: Array) { return { LWF: {