vue での小道具渡しの値の警告

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

vue での props のデフォルトの記述方法:

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 {
    
    };
      }
    }
  }

おすすめ

転載: blog.csdn.net/Min_nna/article/details/128382174