export default {
  data() {
    return {
      rules: {
        "swiadd.strinf": [{
            type: "string",
            required: false,
            message: "必输项"
          },
          {
            max: 35,
            message: "长度不能超过35"
          }
        ],
        "gidgrp.rec.purcan": [{
          type: "string",
          required: true,
          message: "必输项"
        }, ],
        "newref": [{
          // 表示校验规则对象
          validator: (rule, value, callback) => {
              // 如果输入值为空,则直接返回校验结果(false表示校验失败)
              if (this.model.gidgrp.rec.purcan === 'RN' && !value) {
                  callback('该项不能为空');
              } else {
                  callback();
              }
          },
          trigger: 'blur'
      }],
      }
    }
  }
}