// 数据
const modelRef = reactive({
name: ‘’,
region: undefined,
type: [],
});
// 表单域规则
const rulesRef = reactive({
name: [
{
required: true,
message: ‘Please input name’,
},
],
region: [
{
required: true,
message: ‘Please select region’,
},
],
type: [
{
required: true,
message: ‘Please select type’,
type: ‘array’,
},
],
});
// 数据
const modelRef = reactive({
name: ‘’,
region: undefined,
type: [],
});
// 表单域规则
const rulesRef = reactive({
name: [
{
required: true,
message: ‘Please input name’,
},
],
region: [
{
required: true,
message: ‘Please select region’,
},
],
type: [
{
required: true,
message: ‘Please select type’,
type: ‘array’,
},
],
});
定义一个响应式的数据和表单域规则:
最新推荐文章于 2023-07-30 12:55:28 发布