[Vuejs]-How to pass i18n data $t as prop to a component

0👍

Make infonews a computed property. The title and content of each should be the translation keys.

export default {
  computed: {
    infonews() {
      return [
        {
          id: "01",
          title: this.$t("what we do"),
          content: this.$t("industke aecimen book"),
        },
        {
          id: "02",
          title: this.$t("our mission"),
          content: this.$t("ggdddg"),
        },
      ]
    };
  }
}

Leave a comment