ElementUI를 일본어로 사용하는 방법을 요약했습니다.

4436 단어 ElementUIVue.js

이 기사에서


최근에 vue에서 일하고 있습니다. 구성 요소 라이브러리?ElementUI도 사용됩니다.
기본적으로 일본어로 검색할 수 있지만 필요하면 (버튼만 읽는 경우) 찾을 수 없기 때문에 먼저 모아 놓는다.

ElementUI


아마도 중국제 라이브러리일 것입니다. 기본값은 중국어입니다.
자세한 내용↓
http://element.eleme.io/#/en-US

일본어 방법


모두 불러올 때
import Vue from 'vue'
import ElementUI from 'element-ui'
import locale from 'element-ui/lib/locale/lang/ja'

Vue.use(ElementUI, { locale })
이놈이 알아내면 나올 거야.

어느 날 이변이 일어났다.


여러 가지 테스트를 했는데 결과가 표 데이터가 없을 때.???어떻게 읽어요???

한 마디로 하면gitLog을 거슬러 올라가면 경량화를 위해 필요에 따라 읽는 수가 된다.
요청 시 불러올 때
import Vue from 'vue'
import {Table, TableColumn} from 'element-ui'
import locale from 'element-ui/lib/locale/lang/ja'

Vue.use(Table, { locale })
Vue.use(TableColumn, { locale })
원서에 의하면 위에서 말한 바와 같다.
공식 doc에 부표가 하나 있는 것을 보고 다시 쓰면 움직인다.
정답
import Vue from 'vue'
import { Button, TableColumn} from 'element-ui'
import lang from 'element-ui/lib/locale/lang/ja'
import locale from 'element-ui/lib/locale'

// configure language
locale.use(lang)

// import components
Vue.use(Table)
Vue.use(TableColumn)
자세한 내용↓
http://element.eleme.io/#/en-US/component/i18n#internationalization

좋은 웹페이지 즐겨찾기