@ -23,17 +23,17 @@
import { BasicForm , FormSchema , useForm } from '/@/components/Form/index' ;
import { CollapseContainer } from '/@/components/Container/index' ;
import { useMessage } from '/@/hooks/web/useMessage' ;
import { Input , FormItem , Select } from 'ant-design-vue' ;
import { Input , FormItem , FormItemRest , Select } from 'ant-design-vue' ;
import { PageWrapper } from '/@/components/Page' ;
const custom_typeKey2typeValueRules = ( model ) => {
return [
{
required : true ,
validator : ( rule , value , callback ) => {
if ( ! model . typeKey ) return callback ( '请选择类型' ) ;
if ( ! model . typeValue ) return callback ( '请输入数据' ) ;
callback ( ) ;
validator : async ( ) => {
if ( ! model . typeKey ) return Promise . reject ( '请选择类型' ) ;
if ( ! model . typeValue ) return Promise . reject ( '请输入数据' ) ;
Promise . resolve ( ) ;
} ,
} ,
] ;
@ -145,7 +145,13 @@
< Select .Option value = "测试名称" > 测试名称 < / S e l e c t . O p t i o n >
< / Select >
< FormItem name = "typeValue2" class = "local_typeValue" rules = { [ { required : true } ] } >
< Input placeholder = "请输入" v -model : value = { model [ 'typeValue2' ] } disabled = { disabled } / >
< FormItemRest >
< Input
placeholder = "请输入"
v - model : value = { model [ 'typeValue2' ] }
disabled = { disabled }
/ >
< / FormItemRest >
< / FormItem >
< / I n p u t . G r o u p >
) ;
@ -183,12 +189,14 @@
< Select .Option value = "公司名称" > 公司名称 < / S e l e c t . O p t i o n >
< Select .Option value = "产品名称" > 产品名称 < / S e l e c t . O p t i o n >
< / Select >
< Input
style = "width: calc(100% - 120px); margin-left: -1px;"
placeholder = "请输入"
v - model : value = { model [ 'typeValue' ] }
disabled = { disabled }
/ >
< FormItemRest >
< Input
style = "width: calc(100% - 120px); margin-left: -1px;"
placeholder = "请输入"
v - model : value = { model [ 'typeValue' ] }
disabled = { disabled }
/ >
< / FormItemRest >
< / I n p u t . G r o u p >
< / FormItem >
) ;