feat(web): 尝试增加校验
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user