Blame view

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