Blame view

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