Blame view

src/index.js 3.59 KB
c6f21c2f   jingsam   :bug: fix ie bug
1
  // es6 polyfill
b0893113   jingsam   :art: add eslint
2
  import 'core-js/fn/array/find-index';
c6f21c2f   jingsam   :bug: fix ie bug
3
  
3735e376   jingsam   sort components
4
  import Affix from './components/affix';
5d122b37   梁灏   support Alert
5
  import Alert from './components/alert';
1d8f7767   mod   support BackTop t...
6
  import BackTop from './components/back-top';
15368be1   梁灏   Support Badge
7
  import Badge from './components/badge';
c06e99d0   huixisheng   Support Breadcrumb
8
  import Breadcrumb from './components/breadcrumb';
d47ea998   梁灏   support Button an...
9
  import Button from './components/button';
a8cb711c   huixisheng   Support Card
10
  import Card from './components/card';
bb71140e   梁灏   support Carousel
11
  import Carousel from './components/carousel';
47a7f21d   梁灏   support Cascader
12
  import Cascader from './components/cascader';
cbe03a12   梁灏   support Checkbox
13
  import Checkbox from './components/checkbox';
b2d29401   梁灏   support Circle
14
  import Circle from './components/circle';
a190ce84   梁灏   support Collapse
15
  import Collapse from './components/collapse';
531cd165   梁灏   support DatePicke...
16
  import DatePicker from './components/date-picker';
b1c118d8   梁灏   support Dropdown
17
  import Dropdown from './components/dropdown';
257f80f1   梁灏   support Form
18
  import Form from './components/form';
d47ea998   梁灏   support Button an...
19
  import Icon from './components/icon';
fc7ef072   梁灏   support Input
20
  import Input from './components/input';
c97c42ab   梁灏   support InputNumber
21
  import InputNumber from './components/input-number';
f97e5bb0   梁灏   support LoadingBar
22
  import LoadingBar from './components/loading-bar';
fd1582c5   梁灏   support Menu & La...
23
  import Menu from './components/menu';
6cadeba4   梁灏   support Message
24
  import Message from './components/message';
6259471f   梁灏   support Modal
25
  import Modal from './components/modal';
833501a4   梁灏   support Notice
26
  import Notice from './components/notice';
87c51597   梁灏   support Page
27
  import Page from './components/page';
79288d43   梁灏   support Poptip & ...
28
  import Poptip from './components/poptip';
5d08ddf2   梁灏   support Progress ...
29
  import Progress from './components/progress';
06322514   梁灏   support Radio
30
  import Radio from './components/radio';
6aa72722   huixisheng   Support rate
31
  import Rate from './components/rate';
d6f644e1   梁灏   support Tooltip
32
  import Slider from './components/slider';
2d43f26b   梁灏   support Spin
33
  import Spin from './components/spin';
bd596e7a   huixisheng   support Steps
34
  import Steps from './components/steps';
2d5ba278   梁灏   support Switch
35
  import Switch from './components/switch';
486d4fda   梁灏   update Table
36
  import Table from './components/table';
30510c3d   梁灏   support Tabs
37
  import Tabs from './components/tabs';
456daf34   梁灏   support Tag
38
  import Tag from './components/tag';
6c9e0282   huixisheng   Support timeline
39
  import Timeline from './components/timeline';
531cd165   梁灏   support DatePicke...
40
  import TimePicker from './components/time-picker';
d6f644e1   梁灏   support Tooltip
41
  import Tooltip from './components/tooltip';
5b19b5f5   梁灏   support Transfer
42
  import Transfer from './components/transfer';
34ee7b4a   梁灏   support Tree & ad...
43
  import Tree from './components/tree';
5d08ddf2   梁灏   support Progress ...
44
  import Upload from './components/upload';
c755733a   梁灏   support Grid
45
  import { Row, Col } from './components/grid';
4aec6a66   梁灏   support Select
46
  import { Select, Option, OptionGroup } from './components/select';
d33b5143   梁灏   support i18n
47
  import locale from './locale';
7fa943eb   梁灏   init
48
49
  
  const iview = {
3735e376   jingsam   sort components
50
      Affix,
5d122b37   梁灏   support Alert
51
      Alert,
1d8f7767   mod   support BackTop t...
52
      BackTop,
15368be1   梁灏   Support Badge
53
      Badge,
c06e99d0   huixisheng   Support Breadcrumb
54
55
      Breadcrumb,
      BreadcrumbItem: Breadcrumb.Item,
c0b2524d   梁灏   update Table cell...
56
      iButton: Button,
d47ea998   梁灏   support Button an...
57
58
      Button,
      ButtonGroup: Button.Group,
a8cb711c   huixisheng   Support Card
59
      Card,
bb71140e   梁灏   support Carousel
60
61
      Carousel,
      CarouselItem: Carousel.Item,
47a7f21d   梁灏   support Cascader
62
      Cascader,
cbe03a12   梁灏   support Checkbox
63
64
      Checkbox,
      CheckboxGroup: Checkbox.Group,
b2d29401   梁灏   support Circle
65
      iCircle: Circle,
531cd165   梁灏   support DatePicke...
66
      DatePicker,
b1c118d8   梁灏   support Dropdown
67
68
69
      Dropdown,
      DropdownItem: Dropdown.Item,
      DropdownMenu: Dropdown.Menu,
257f80f1   梁灏   support Form
70
71
      iForm: Form,
      FormItem: Form.Item,
c755733a   梁灏   support Grid
72
      iCol: Col,
a190ce84   梁灏   support Collapse
73
      Collapse,
d47ea998   梁灏   support Button an...
74
      Icon,
fc7ef072   梁灏   support Input
75
      Input,
ded95b46   梁灏   fixed #372
76
      iInput: Input,
c97c42ab   梁灏   support InputNumber
77
      InputNumber,
f97e5bb0   梁灏   support LoadingBar
78
      LoadingBar,
fd1582c5   梁灏   support Menu & La...
79
      Menu,
ded95b46   梁灏   fixed #372
80
      iMenu: Menu,
fd1582c5   梁灏   support Menu & La...
81
82
83
      MenuGroup: Menu.Group,
      MenuItem: Menu.Item,
      Submenu: Menu.Sub,
6cadeba4   梁灏   support Message
84
      Message,
6259471f   梁灏   support Modal
85
      Modal,
833501a4   梁灏   support Notice
86
      Notice,
50168478   young   config(compontent...
87
      Option: Option,
4aec6a66   梁灏   support Select
88
89
      iOption: Option,
      OptionGroup,
87c51597   梁灏   support Page
90
      Page,
a190ce84   梁灏   support Collapse
91
      Panel: Collapse.Panel,
79288d43   梁灏   support Poptip & ...
92
      Poptip,
5d08ddf2   梁灏   support Progress ...
93
      Progress,
6ae7b86b   梁灏   fixed #377
94
      iProgress: Progress,
06322514   梁灏   support Radio
95
96
      Radio,
      RadioGroup: Radio.Group,
6aa72722   huixisheng   Support rate
97
      Rate,
c755733a   梁灏   support Grid
98
      Row,
4a5d5cc9   梁灏   更新几个标签名称
99
      Select,
4aec6a66   梁灏   support Select
100
      iSelect: Select,
d6f644e1   梁灏   support Tooltip
101
      Slider,
2d43f26b   梁灏   support Spin
102
      Spin,
bd596e7a   huixisheng   support Steps
103
104
      Step: Steps.Step,
      Steps,
2d5ba278   梁灏   support Switch
105
      iSwitch: Switch,
4a5d5cc9   梁灏   更新几个标签名称
106
      iTable: Table,
486d4fda   梁灏   update Table
107
      Table,
30510c3d   梁灏   support Tabs
108
109
      Tabs: Tabs,
      TabPane: Tabs.Pane,
456daf34   梁灏   support Tag
110
      Tag,
6c9e0282   huixisheng   Support timeline
111
112
      Timeline,
      TimelineItem: Timeline.Item,
531cd165   梁灏   support DatePicke...
113
      TimePicker,
d6f644e1   梁灏   support Tooltip
114
      Tooltip,
5b19b5f5   梁灏   support Transfer
115
      Transfer,
34ee7b4a   梁灏   support Tree & ad...
116
      Tree,
5d08ddf2   梁灏   support Progress ...
117
      Upload
7fa943eb   梁灏   init
118
  };
fb189f16   young   cancel the compon...
119
  
d33b5143   梁灏   support i18n
120
  const install = function (Vue, opts = {}) {
d33b5143   梁灏   support i18n
121
122
123
      locale.use(opts.locale);
      locale.i18n(opts.i18n);
  
343abe50   jingsam   add iview.install()
124
      Object.keys(iview).forEach((key) => {
fb189f16   young   cancel the compon...
125
          Vue.component(key, iview[key]);
451b52ce   梁灏   Global install iView
126
127
      });
  
f97e5bb0   梁灏   support LoadingBar
128
      Vue.prototype.$Loading = LoadingBar;
6cadeba4   梁灏   support Message
129
      Vue.prototype.$Message = Message;
6259471f   梁灏   support Modal
130
      Vue.prototype.$Modal = Modal;
833501a4   梁灏   support Notice
131
      Vue.prototype.$Notice = Notice;
451b52ce   梁灏   Global install iView
132
  };
343abe50   jingsam   add iview.install()
133
134
135
136
  
  // auto install
  if (typeof window !== 'undefined' && window.Vue) {
      install(window.Vue);
451b52ce   梁灏   Global install iView
137
  }
343abe50   jingsam   add iview.install()
138
  
b0893113   jingsam   :art: add eslint
139
  module.exports = Object.assign(iview, {install});   // eslint-disable-line no-undef