Blame view

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