support i18n
support i18n
This commit is contained in:
parent
86b4da54d4
commit
d33b51432d
10 changed files with 151 additions and 15 deletions
|
@ -40,6 +40,7 @@ import Tooltip from './components/tooltip';
|
|||
import Transfer from './components/transfer';
|
||||
import { Row, Col } from './components/layout';
|
||||
import { Select, Option, OptionGroup } from './components/select';
|
||||
import locale from './locale';
|
||||
|
||||
const iview = {
|
||||
Affix,
|
||||
|
@ -100,7 +101,10 @@ const iview = {
|
|||
Transfer
|
||||
};
|
||||
|
||||
const install = function (Vue) {
|
||||
const install = function (Vue, opts = {}) {
|
||||
locale.use(opts.locale);
|
||||
locale.i18n(opts.i18n);
|
||||
|
||||
Object.keys(iview).forEach((key) => {
|
||||
Vue.component(key, iview[key]);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue