elementUI 表单验证required动态接收参数

转自:https://www.cnblogs.com/qdlhj/p/12332407.html

采用方式:

if (val == 1) {
        this.$refs['createForm'].rules.stopPushTime[0].required = false;
      }else{
        this.$refs['createForm'].rules.stopPushTime[0].required = true;
      }
posted @ 2021-08-02 16:25  入门级小菜  阅读(1657)  评论(0编辑  收藏  举报