2016-11-27 01:42:39 +08:00
|
|
|
// es6 polyfill
|
|
|
|
import 'core-js/fn/array/find-index'
|
|
|
|
|
2016-10-31 17:41:42 +08:00
|
|
|
import Affix from './components/affix';
|
|
|
|
import Alert from './components/alert';
|
|
|
|
import BackTop from './components/back-top';
|
|
|
|
import Badge from './components/badge';
|
|
|
|
import Breadcrumb from './components/breadcrumb';
|
2016-09-09 14:29:19 +08:00
|
|
|
import Button from './components/button';
|
2016-10-31 17:41:42 +08:00
|
|
|
import Card from './components/card';
|
2016-11-15 10:43:00 +08:00
|
|
|
import Cascader from './components/cascader';
|
2016-10-31 17:41:42 +08:00
|
|
|
import Checkbox from './components/checkbox';
|
|
|
|
import Circle from './components/circle';
|
|
|
|
import Collapse from './components/collapse';
|
2016-12-03 23:46:25 +08:00
|
|
|
import Dropdown from './components/dropdown';
|
2016-09-09 14:29:19 +08:00
|
|
|
import Icon from './components/icon';
|
|
|
|
import Input from './components/input';
|
|
|
|
import InputNumber from './components/input-number';
|
2016-10-31 17:41:42 +08:00
|
|
|
import LoadingBar from './components/loading-bar';
|
2016-12-07 12:10:47 +08:00
|
|
|
import Menu from './components/menu';
|
2016-10-31 17:41:42 +08:00
|
|
|
import Message from './components/message';
|
|
|
|
import Modal from './components/modal';
|
|
|
|
import Notice from './components/notice';
|
2016-09-09 14:29:19 +08:00
|
|
|
import Page from './components/page';
|
2016-10-31 17:41:42 +08:00
|
|
|
import Poptip from './components/poptip';
|
2016-09-09 14:29:19 +08:00
|
|
|
import Progress from './components/progress';
|
2016-10-31 17:41:42 +08:00
|
|
|
import Radio from './components/radio';
|
|
|
|
import Slider from './components/slider';
|
2016-09-09 14:29:19 +08:00
|
|
|
import Spin from './components/spin';
|
|
|
|
import Steps from './components/steps';
|
2016-10-31 17:41:42 +08:00
|
|
|
import Switch from './components/switch';
|
2016-11-23 16:27:17 +08:00
|
|
|
import Table from './components/table';
|
2016-12-05 18:04:30 +08:00
|
|
|
import Tabs from './components/tabs';
|
2016-10-31 17:41:42 +08:00
|
|
|
import Tag from './components/tag';
|
|
|
|
import Timeline from './components/timeline';
|
2016-10-26 10:03:16 +08:00
|
|
|
import Tooltip from './components/tooltip';
|
2016-11-18 11:46:55 +08:00
|
|
|
import Transfer from './components/transfer';
|
2016-10-31 17:41:42 +08:00
|
|
|
import { Row, Col } from './components/layout';
|
|
|
|
import { Select, Option, OptionGroup } from './components/select';
|
2016-09-09 14:29:19 +08:00
|
|
|
|
|
|
|
const iview = {
|
2016-10-31 17:41:42 +08:00
|
|
|
Affix,
|
|
|
|
Alert,
|
|
|
|
BackTop,
|
|
|
|
Badge,
|
|
|
|
Breadcrumb,
|
|
|
|
BreadcrumbItem: Breadcrumb.Item,
|
2016-11-03 17:21:04 +08:00
|
|
|
iButton: Button,
|
2016-10-25 09:58:10 +08:00
|
|
|
ButtonGroup: Button.Group,
|
2016-10-31 17:41:42 +08:00
|
|
|
Card,
|
2016-11-15 10:43:00 +08:00
|
|
|
Cascader,
|
2016-10-31 17:41:42 +08:00
|
|
|
Checkbox,
|
|
|
|
CheckboxGroup: Checkbox.Group,
|
|
|
|
Circle,
|
2016-12-03 23:46:25 +08:00
|
|
|
Dropdown,
|
|
|
|
DropdownItem: Dropdown.Item,
|
|
|
|
DropdownMenu: Dropdown.Menu,
|
2016-11-03 17:21:04 +08:00
|
|
|
iCol: Col,
|
2016-10-31 17:41:42 +08:00
|
|
|
Collapse,
|
2016-09-09 14:29:19 +08:00
|
|
|
Icon,
|
2016-11-03 17:21:04 +08:00
|
|
|
iInput: Input,
|
2016-10-31 17:41:42 +08:00
|
|
|
InputNumber,
|
|
|
|
LoadingBar,
|
2016-12-07 12:10:47 +08:00
|
|
|
Menu,
|
|
|
|
MenuGroup: Menu.Group,
|
|
|
|
MenuItem: Menu.Item,
|
|
|
|
Submenu: Menu.Sub,
|
2016-10-31 17:41:42 +08:00
|
|
|
Message,
|
|
|
|
Modal,
|
|
|
|
Notice,
|
2016-11-03 17:21:04 +08:00
|
|
|
iOption: Option,
|
2016-11-09 18:37:24 +08:00
|
|
|
OptionGroup,
|
2016-10-31 17:41:42 +08:00
|
|
|
Page,
|
|
|
|
Panel: Collapse.Panel,
|
|
|
|
Poptip,
|
|
|
|
Progress,
|
2016-09-09 14:29:19 +08:00
|
|
|
Radio,
|
2016-10-25 09:58:10 +08:00
|
|
|
RadioGroup: Radio.Group,
|
2016-09-09 14:29:19 +08:00
|
|
|
Row,
|
2016-11-03 17:21:04 +08:00
|
|
|
iSelect: Select,
|
2016-10-31 17:41:42 +08:00
|
|
|
Slider,
|
|
|
|
Spin,
|
|
|
|
Step: Steps.Step,
|
|
|
|
Steps,
|
|
|
|
Switch,
|
2016-11-23 16:27:17 +08:00
|
|
|
iTable: Table,
|
2016-12-05 18:04:30 +08:00
|
|
|
Tabs: Tabs,
|
|
|
|
TabPane: Tabs.Pane,
|
2016-09-09 14:29:19 +08:00
|
|
|
Tag,
|
|
|
|
Timeline,
|
2016-10-25 09:58:10 +08:00
|
|
|
TimelineItem: Timeline.Item,
|
2016-11-18 11:46:55 +08:00
|
|
|
Tooltip,
|
|
|
|
Transfer
|
2016-09-09 14:29:19 +08:00
|
|
|
};
|
|
|
|
|
2016-11-03 10:19:35 +08:00
|
|
|
const install = function (Vue) {
|
|
|
|
Object.keys(iview).forEach((key) => {
|
2016-11-03 17:21:04 +08:00
|
|
|
Vue.component(key, iview[key])
|
2016-11-14 13:49:06 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
Vue.prototype.$Loading = LoadingBar;
|
|
|
|
Vue.prototype.$Message = Message;
|
2016-11-16 20:48:58 +08:00
|
|
|
Vue.prototype.$Modal = Modal;
|
2016-11-14 13:49:06 +08:00
|
|
|
Vue.prototype.$Notice = Notice;
|
|
|
|
};
|
2016-11-03 10:19:35 +08:00
|
|
|
|
|
|
|
// auto install
|
|
|
|
if (typeof window !== 'undefined' && window.Vue) {
|
|
|
|
install(window.Vue);
|
2016-11-14 13:49:06 +08:00
|
|
|
}
|
2016-11-03 10:19:35 +08:00
|
|
|
|
|
|
|
module.exports = Object.assign(iview, {install});
|