Blame view

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