Blame view

src/index.js 3.47 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
5
6
7
8
  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';
7fa943eb   梁灏   init
9
  import Button from './components/button';
3735e376   jingsam   sort components
10
  import Card from './components/card';
6c9acb08   Rijn   initialize carousel
11
  import Carousel from './components/carousel';
0a48ac45   梁灏   Input add readonl...
12
  import Cascader from './components/cascader';
3735e376   jingsam   sort components
13
14
15
  import Checkbox from './components/checkbox';
  import Circle from './components/circle';
  import Collapse from './components/collapse';
17e1fcf1   梁灏   init DatePicker
16
  import DatePicker from './components/date-picker';
ab8aaf95   梁灏   add Dropdown comp...
17
  import Dropdown from './components/dropdown';
8a22e84f   梁灏   init Form component
18
  import Form from './components/form';
7fa943eb   梁灏   init
19
20
  import Icon from './components/icon';
  import Input from './components/input';
7fa943eb   梁灏   init
21
  import InputNumber from './components/input-number';
3735e376   jingsam   sort components
22
  import LoadingBar from './components/loading-bar';
8778b343   梁灏   init Menu components
23
  import Menu from './components/menu';
3735e376   jingsam   sort components
24
25
26
  import Message from './components/message';
  import Modal from './components/modal';
  import Notice from './components/notice';
7fa943eb   梁灏   init
27
  import Page from './components/page';
3735e376   jingsam   sort components
28
  import Poptip from './components/poptip';
7fa943eb   梁灏   init
29
  import Progress from './components/progress';
3735e376   jingsam   sort components
30
  import Radio from './components/radio';
49d380cf   梁灏   init Rate component
31
  import Rate from './components/rate';
3735e376   jingsam   sort components
32
  import Slider from './components/slider';
7fa943eb   梁灏   init
33
34
  import Spin from './components/spin';
  import Steps from './components/steps';
3735e376   jingsam   sort components
35
  import Switch from './components/switch';
2cb8a6d9   梁灏   commit Table comp...
36
  import Table from './components/table';
871ed4d8   梁灏   init Tabs component
37
  import Tabs from './components/tabs';
3735e376   jingsam   sort components
38
39
  import Tag from './components/tag';
  import Timeline from './components/timeline';
9d844d53   梁灏   fixed Layout bug
40
  import TimePicker from './components/time-picker';
dce3e753   梁灏   add Tooltip compo...
41
  import Tooltip from './components/tooltip';
77f7bb95   梁灏   add Transfer comp...
42
  import Transfer from './components/transfer';
89f2ba8b   梁灏   init Tree component
43
  import Tree from './components/tree';
3affd6f3   梁灏   init upload compo...
44
  import Upload from './components/upload';
3735e376   jingsam   sort components
45
46
  import { Row, Col } from './components/layout';
  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
51
52
53
54
55
      Affix,
      Alert,
      BackTop,
      Badge,
      Breadcrumb,
      BreadcrumbItem: Breadcrumb.Item,
5e8a2915   jingsam   add umd library b...
56
      iButton: Button,
c67c7095   梁灏   add some component
57
      ButtonGroup: Button.Group,
3735e376   jingsam   sort components
58
      Card,
6c9acb08   Rijn   initialize carousel
59
60
      Carousel,
      CarouselItem: Carousel.Item,
0a48ac45   梁灏   Input add readonl...
61
      Cascader,
3735e376   jingsam   sort components
62
63
64
      Checkbox,
      CheckboxGroup: Checkbox.Group,
      Circle,
17e1fcf1   梁灏   init DatePicker
65
      DatePicker,
ab8aaf95   梁灏   add Dropdown comp...
66
67
68
      Dropdown,
      DropdownItem: Dropdown.Item,
      DropdownMenu: Dropdown.Menu,
103cd353   梁灏   init Form
69
      iForm: Form,
8a22e84f   梁灏   init Form component
70
      FormItem: Form.Item,
5e8a2915   jingsam   add umd library b...
71
      iCol: Col,
3735e376   jingsam   sort components
72
      Collapse,
7fa943eb   梁灏   init
73
      Icon,
5e8a2915   jingsam   add umd library b...
74
      iInput: Input,
3735e376   jingsam   sort components
75
76
      InputNumber,
      LoadingBar,
8778b343   梁灏   init Menu components
77
78
79
80
      Menu,
      MenuGroup: Menu.Group,
      MenuItem: Menu.Item,
      Submenu: Menu.Sub,
3735e376   jingsam   sort components
81
82
83
      Message,
      Modal,
      Notice,
5e8a2915   jingsam   add umd library b...
84
      iOption: Option,
f36b2970   jingsam   merge upstream/ma...
85
      OptionGroup,
3735e376   jingsam   sort components
86
87
88
89
      Page,
      Panel: Collapse.Panel,
      Poptip,
      Progress,
7fa943eb   梁灏   init
90
      Radio,
c67c7095   梁灏   add some component
91
      RadioGroup: Radio.Group,
49d380cf   梁灏   init Rate component
92
      Rate,
7fa943eb   梁灏   init
93
      Row,
5e8a2915   jingsam   add umd library b...
94
      iSelect: Select,
3735e376   jingsam   sort components
95
96
97
98
99
      Slider,
      Spin,
      Step: Steps.Step,
      Steps,
      Switch,
2cb8a6d9   梁灏   commit Table comp...
100
      iTable: Table,
871ed4d8   梁灏   init Tabs component
101
102
      Tabs: Tabs,
      TabPane: Tabs.Pane,
7fa943eb   梁灏   init
103
      Tag,
7fa943eb   梁灏   init
104
      Timeline,
c67c7095   梁灏   add some component
105
      TimelineItem: Timeline.Item,
9d844d53   梁灏   fixed Layout bug
106
      TimePicker,
77f7bb95   梁灏   add Transfer comp...
107
      Tooltip,
3affd6f3   梁灏   init upload compo...
108
      Transfer,
89f2ba8b   梁灏   init Tree component
109
      Tree,
3affd6f3   梁灏   init upload compo...
110
      Upload
7fa943eb   梁灏   init
111
112
  };
  
d33b5143   梁灏   support i18n
113
114
115
116
  const install = function (Vue, opts = {}) {
      locale.use(opts.locale);
      locale.i18n(opts.i18n);
  
343abe50   jingsam   add iview.install()
117
      Object.keys(iview).forEach((key) => {
b0893113   jingsam   :art: add eslint
118
          Vue.component(key, iview[key]);
451b52ce   梁灏   Global install iView
119
120
121
122
      });
  
      Vue.prototype.$Loading = LoadingBar;
      Vue.prototype.$Message = Message;
2f71cf55   梁灏   fixed bug $Modal
123
      Vue.prototype.$Modal = Modal;
451b52ce   梁灏   Global install iView
124
125
      Vue.prototype.$Notice = Notice;
  };
343abe50   jingsam   add iview.install()
126
127
128
129
  
  // auto install
  if (typeof window !== 'undefined' && window.Vue) {
      install(window.Vue);
451b52ce   梁灏   Global install iView
130
  }
343abe50   jingsam   add iview.install()
131
  
b0893113   jingsam   :art: add eslint
132
  module.exports = Object.assign(iview, {install});   // eslint-disable-line no-undef