vue props默认值国际化报错

未做国际化处理

    tabLabel: {
      type: Array,
      default: () => (["a", "b", "c"])
    }

初次国际化处理 出现报错

    tabLabel: {
      type: Array,
      default: () => ([this.$t('status.a'), this.$t('status.b'), this.$t('status.c')])
    }

修改之后国际化处理

    tabLabel: {
      type: Array,
      default () {
        return [this.$t('status.a'), this.$t('status.b'), this.$t('status.c')]
      }
    }
原文地址:https://www.cnblogs.com/samsara-yx/p/13517230.html