vue項目中實現多語言(i18n)

一、安裝 npm install i18n 二、在main.js中引入 import VueI18n from 'vue-i18n' Vue.use(VueI18n) // 多語言實例 const i18n = new VueI18n({ locale: (function () { if (localStorage.getItem('lang')) { return l
相關文章
相關標籤/搜索