Props passing value warning in vue

hint:warning Prop 'column' requires default value to be set vue/require-default-prop

The default writing method of props in vue:

props: {
    
    
    rowClick: {
    
    
      type: Function,
      default: function() {
    
    }
    },
    title: {
    
    
      type: String,
      default: ""
    },
    stuCount: {
    
    
      type: Number,
      default: 0
    },
    columns: {
    
    
      type: Array,
      default() {
    
    
        return [];
      }
    },
    showPage: {
    
    
      type: Boolean,
      default: true
    },
    api: {
    
    
      type: Object,
      default() {
    
    
        return {
    
    };
      }
    }
  }

Guess you like

Origin blog.csdn.net/Min_nna/article/details/128382174