update export & i18n
This commit is contained in:
parent
32e8393a19
commit
c7e432f7e3
2 changed files with 76 additions and 4 deletions
76
src/index.js
76
src/index.js
|
@ -150,4 +150,78 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|||
install(window.Vue);
|
||||
}
|
||||
|
||||
module.exports = Object.assign(iview, {install, locales}); // eslint-disable-line no-undef
|
||||
// module.exports = Object.assign(iview, {install, locales}); // eslint-disable-line no-undef
|
||||
module.exports = { // eslint-disable-line no-undef
|
||||
version: '2.6.0',
|
||||
locale: locale.use,
|
||||
i18n: locale.i18n,
|
||||
install,
|
||||
locales,
|
||||
Affix,
|
||||
Alert,
|
||||
AutoComplete,
|
||||
Avatar,
|
||||
BackTop,
|
||||
Badge,
|
||||
Breadcrumb,
|
||||
BreadcrumbItem: Breadcrumb.Item,
|
||||
Button,
|
||||
ButtonGroup: Button.Group,
|
||||
Card,
|
||||
Carousel,
|
||||
CarouselItem: Carousel.Item,
|
||||
Cascader,
|
||||
Checkbox,
|
||||
CheckboxGroup: Checkbox.Group,
|
||||
Circle,
|
||||
Col,
|
||||
Collapse,
|
||||
ColorPicker,
|
||||
DatePicker,
|
||||
Dropdown,
|
||||
DropdownItem: Dropdown.Item,
|
||||
DropdownMenu: Dropdown.Menu,
|
||||
Form,
|
||||
FormItem: Form.Item,
|
||||
Icon,
|
||||
Input,
|
||||
InputNumber,
|
||||
Scroll,
|
||||
LoadingBar,
|
||||
Menu,
|
||||
MenuGroup: Menu.Group,
|
||||
MenuItem: Menu.Item,
|
||||
Submenu: Menu.Sub,
|
||||
Message,
|
||||
Modal,
|
||||
Notice,
|
||||
Option: Option,
|
||||
OptionGroup,
|
||||
Page,
|
||||
Panel: Collapse.Panel,
|
||||
Poptip,
|
||||
Progress,
|
||||
Radio,
|
||||
RadioGroup: Radio.Group,
|
||||
Rate,
|
||||
Row,
|
||||
Select,
|
||||
Slider,
|
||||
Spin,
|
||||
Step: Steps.Step,
|
||||
Steps,
|
||||
Switch,
|
||||
Table,
|
||||
Tabs: Tabs,
|
||||
TabPane: Tabs.Pane,
|
||||
Tag,
|
||||
Timeline,
|
||||
TimelineItem: Timeline.Item,
|
||||
TimePicker,
|
||||
Tooltip,
|
||||
Transfer,
|
||||
Tree,
|
||||
Upload
|
||||
};
|
||||
|
||||
module.exports.default = module.exports; // eslint-disable-line no-undef
|
|
@ -1,5 +1,3 @@
|
|||
// https://github.com/ElemeFE/element/blob/dev/src/locale/index.js
|
||||
|
||||
import defaultLang from './lang/zh-CN';
|
||||
import Vue from 'vue';
|
||||
import deepmerge from 'deepmerge';
|
||||
|
@ -10,7 +8,7 @@ let lang = defaultLang;
|
|||
let merged = false;
|
||||
let i18nHandler = function() {
|
||||
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
||||
if (typeof vuei18n === 'function') {
|
||||
if (typeof vuei18n === 'function' && !!Vue.locale) {
|
||||
if (!merged) {
|
||||
merged = true;
|
||||
Vue.locale(
|
||||
|
|
Loading…
Add table
Reference in a new issue