feat(web): 尝试增加校验

This commit is contained in:
2025-07-07 23:31:04 +08:00
parent 3afdff0a05
commit 605cfb7182

View File

@@ -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<any, any> = {}) => {
)
}
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<any>) {
return {
LWF: {