html
<el-form-item label="是否及时任务:" prop="taskType">
<el-switch
v-model="taskForm.taskType"
:disabled="ifEdit"
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item
label="任务启动时间:"
prop="startTime"
:rules="taskForm.taskType === 2?rules.startTime:[{ required: false, message: '请选择任务启动时间', trigger: 'blur' }]">
<el-date-picker
v-model="taskForm.startTime"
type="datetime" :disabled="ifEdit || taskForm.taskType === 1"
placeholder="选择任务启动时间">
</el-date-picker>
</el-form-item>
网友评论