Commit 6d9afa9c19e64cca95e2718dbdd2e3767ff7570b

Authored by yangd
1 parent c703e2b4

修改d.ts中的类名,并添加全局方法的d.ts定义

types/affix.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Affix extends Vue {
8 8 /**
... ...
types/alert.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Alert extends Vue {
8 8 /**
... ...
types/anchor.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Anchor extends Vue {
8 8 /**
... ...
types/auto-complete.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class AutoComplete extends Vue {
8 8 /**
... ...
types/avatar.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Avatar extends Vue {
8 8 /**
... ...
types/back-top.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class BackTop extends Vue {
8 8 /**
... ...
types/badge.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Badge extends Vue {
8 8 /**
... ...
types/breadcrumb.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Breadcrumb extends Vue {
8 8 /**
... ...
types/button.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Button extends Vue {
8 8 /**
... ...
types/card.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Card extends Vue {
8 8 /**
... ...
types/carousel.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Carousel extends Vue {
8 8 /**
... ... @@ -58,4 +58,8 @@ export declare class Carousel extends Vue {
58 58 * 幻灯片切换时触发,目前激活的幻灯片的索引,原幻灯片的索引
59 59 */
60 60 $emit(eventName: 'on-change', oldValue: number, value: number): this;
  61 +}
  62 +
  63 +export declare class CarouselItem extends Vue {
  64 +
61 65 }
62 66 \ No newline at end of file
... ...
types/cascader.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Cascader extends Vue {
8 8 /**
... ...
types/cell.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Cell extends Vue {
8 8 /**
... ...
types/checkbox.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Checkbox extends Vue {
8 8 /**
... ...
types/circle.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Circle extends Vue {
8 8 /**
... ...
types/collapse.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Collapse extends Vue {
8 8 /**
... ...
types/color-picker.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class ColorPicker extends Vue {
8 8 /**
... ...
types/content.d.ts 0 → 100644
  1 +// Type definitions for iview 3.0.1
  2 +// Project: https://github.com/iview/iview
  3 +// Definitions by: yangdan
  4 +// Definitions: https://github.com/yangdan8/iview.git
  5 +import Vue, { VNode } from 'vue';
  6 +
  7 +export declare class Content extends Vue {
  8 +}
0 9 \ No newline at end of file
... ...
types/date-picker.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class DatePicker extends Vue {
8 8 /**
... ...
types/divider.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Divider extends Vue {
8 8 /**
... ...
types/drawer.d.ts 0 → 100644
  1 +// Type definitions for iview 3.0.1
  2 +// Project: https://github.com/iview/iview
  3 +// Definitions by: yangdan
  4 +// Definitions: https://github.com/yangdan8/iview.git
  5 +import Vue, { VNode } from 'vue';
  6 +
  7 +export declare class Drawer extends Vue {
  8 +}
0 9 \ No newline at end of file
... ...
types/dropdown.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Dropdown extends Vue {
8 8 /**
... ... @@ -56,6 +56,9 @@ export declare class Dropdown extends Vue {
56 56 };
57 57 }
58 58  
  59 +export declare class DropdownMenu extends Vue {
  60 +}
  61 +
59 62 export declare class DropdownItem extends Vue {
60 63 /**
61 64 * 用来标识这一项
... ...
types/footer.d.ts 0 → 100644
  1 +// Type definitions for iview 3.0.1
  2 +// Project: https://github.com/iview/iview
  3 +// Definitions by: yangdan
  4 +// Definitions: https://github.com/yangdan8/iview.git
  5 +import Vue, { VNode } from 'vue';
  6 +
  7 +export declare class Footer extends Vue {
  8 +}
0 9 \ No newline at end of file
... ...
types/form.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Form extends Vue {
8 8 /**
... ...
types/grid.d.ts
... ... @@ -2,9 +2,9 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7   -export declare class GridRow extends Vue {
  7 +export declare class Row extends Vue {
8 8 /**
9 9 * 栅格间距,单位 px,左右平分
10 10 * @default 0
... ... @@ -28,7 +28,7 @@ export declare class GridRow extends Vue {
28 28 'class-name'?: string;
29 29 }
30 30  
31   -export declare class GridCol extends Vue {
  31 +export declare class Col extends Vue {
32 32 /**
33 33 * 栅格的占位格数,可选值为0~24的整数,为 0 时,相当于display:none
34 34 */
... ...
types/header.d.ts 0 → 100644
  1 +// Type definitions for iview 3.0.1
  2 +// Project: https://github.com/iview/iview
  3 +// Definitions by: yangdan
  4 +// Definitions: https://github.com/yangdan8/iview.git
  5 +import Vue, { VNode } from 'vue';
  6 +
  7 +export declare class Header extends Vue {
  8 +}
0 9 \ No newline at end of file
... ...
types/icon.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Icon extends Vue {
8 8 /**
... ...
types/index.d.ts
... ... @@ -2,9 +2,9 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import iView from "./iview";
  5 +import iView from './iview';
6 6  
7 7 export default iView;
8 8 export as namespace iView;
9 9  
10   -export * from "./iview.components";
11 10 \ No newline at end of file
  11 +export * from './iview.components';
12 12 \ No newline at end of file
... ...
types/input-number.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class InputNumber extends Vue {
8 8 /**
... ...
types/input.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Input extends Vue {
8 8 /**
... ...
types/iview.components.d.ts
1   -import { Affix } from "./affix";
2   -import { Alert } from "./alert";
3   -import { Anchor, AnchorLink } from "./anchor";
4   -import { AutoComplete } from "./auto-complete";
5   -import { Avatar } from "./avatar";
6   -import { BackTop } from "./back-top";
7   -import { Badge } from "./badge";
8   -import { Breadcrumb, BreadcrumbItem } from "./breadcrumb";
9   -import { Button, ButtonGroup } from "./button";
10   -import { Card } from "./card";
11   -import { Carousel } from "./carousel";
12   -import { Cascader } from "./cascader";
13   -import { Cell, CellGroup } from "./cell";
14   -import { Checkbox, CheckboxGroup } from "./checkbox";
15   -import { Circle } from "./circle";
16   -import { Collapse, CollapsePanel } from "./collapse";
17   -import { ColorPicker } from "./color-picker";
18   -import { DatePicker, DatePickerOptions } from "./date-picker";
19   -import { Divider } from "./divider";
20   -import { Dropdown, DropdownItem } from "./dropdown";
21   -import { Form, FormItem } from "./form";
22   -import { GridRow, GridCol } from "./grid";
23   -import { Icon } from "./icon";
24   -import { Input } from "./input";
25   -import { InputNumber } from "./input-number";
26   -import { Layout } from "./layout";
27   -import { LoadingBarInstance, LoadingBarConfig } from "./loading-bar";
28   -import { Menu, MenuItem, Submenu, MenuGroup } from "./menu";
29   -import { MessageInstance, MessageConfig } from "./message";
30   -import { Modal, ModalInstance, ModalConfig } from "./modal";
31   -import { NoticeInstance, NoticeConfig, NoticeGlobalConfig } from "./notice";
32   -import { Page } from "./page";
33   -import { Poptip } from "./poptip";
34   -import { Progress } from "./progress";
35   -import { Radio, RadioGroup } from "./radio";
36   -import { Rate } from "./rate";
37   -import { Scroll } from "./scroll";
38   -import { Select, SelectOption, SelectOptionGroup } from "./select";
39   -import { Spin } from "./spin";
40   -import { Split } from "./split";
41   -import { Steps, Step } from "./steps";
42   -import { Switch } from "./switch";
43   -import {
44   - Table,
45   - TableColumn,
46   - TableRenderCreateElementData,
47   - TableRenderCreateElementResult,
48   - TableColumnRenderParams,
49   - TableExportCsvParams
50   -} from "./table";
51   -import { Tabs, TabPane } from "./tabs";
52   -import { Tag } from "./tag";
53   -import { Time } from "./time";
54   -import { Timeline, TimelineItem } from "./timeline";
55   -import { TimePicker } from "./time-picker";
56   -import { Tooltip } from "./tooltip";
57   -import { Transfer } from "./transfer";
58   -import { Tree, TreeChild } from "./tree";
59   -import { Upload } from "./upload";
  1 +// Type definitions for iview 3.0.1
  2 +// Project: https://github.com/iview/iview
  3 +// Definitions by: yangdan
  4 +// Definitions: https://github.com/yangdan8/iview.git
  5 +import Vue from 'vue';
60 6  
61   -export class IAffix extends Affix {}
62   -export class IAlert extends Alert {}
63   -export class IAnchor extends Anchor {}
64   -export class IAnchorLink extends AnchorLink {}
65   -export class IAutoComplete extends AutoComplete {}
66   -export class IAvatar extends Avatar {}
67   -export class IBackTop extends BackTop {}
68   -export class IBadge extends Badge {}
69   -export class IBreadcrumb extends Breadcrumb {}
70   -export class IBreadcrumbItem extends BreadcrumbItem {}
71   -export class IButton extends Button {}
72   -export class IButtonGroup extends ButtonGroup {}
73   -export class ICard extends Card {}
74   -export class ICarousel extends Carousel {}
75   -export class ICascader extends Cascader {}
76   -export class ICell extends Cell {}
77   -export class ICellGroup extends CellGroup {}
78   -export class ICheckbox extends Checkbox {}
79   -export class ICheckboxGroup extends CheckboxGroup {}
80   -export class ICircle extends Circle {}
81   -export class ICollapse extends Collapse {}
82   -export class ICollapsePanel extends CollapsePanel {}
83   -export class IColorPicker extends ColorPicker {}
84   -export class IDatePicker extends DatePicker {}
85   -export class IDatePickerOptions extends DatePickerOptions {}
86   -export class IDivider extends Divider {}
87   -export class IDropdown extends Dropdown {}
88   -export class IDropdownItem extends DropdownItem {}
89   -export class IForm extends Form {}
90   -export class IFormItem extends FormItem {}
91   -export class IGridCol extends GridCol {}
92   -export class IGridRow extends GridRow {}
93   -export class IIcon extends Icon {}
94   -export class IInput extends Input {}
95   -export class IInputNumber extends InputNumber {}
96   -export class ILayout extends Layout {}
97   -export class ILoadingBarInstance extends LoadingBarInstance {}
98   -export class ILoadingBarConfig extends LoadingBarConfig {}
99   -export class IMenu extends Menu {}
100   -export class IMenuGroup extends MenuGroup {}
101   -export class IMenuItem extends MenuItem {}
102   -export class IMessageConfig extends MessageConfig {}
103   -export class IMessageInstance extends MessageInstance {}
104   -export class IModal extends Modal {}
105   -export class IModalConfig extends ModalConfig {}
106   -export class IModalInstance extends ModalInstance {}
107   -export class INoticeConfig extends NoticeConfig {}
108   -export class INoticeGlobalConfig extends NoticeGlobalConfig {}
109   -export class INoticeInstance extends NoticeInstance {}
110   -export class IPage extends Page {}
111   -export class IPoptip extends Poptip {}
112   -export class IProgress extends Progress {}
113   -export class IRadio extends Radio {}
114   -export class IRadioGroup extends RadioGroup {}
115   -export class IRate extends Rate {}
116   -export class IScroll extends Scroll {}
117   -export class ISelect extends Select {}
118   -export class ISelectOption extends SelectOption {}
119   -export class ISelectOptionGroup extends SelectOptionGroup {}
120   -export class ISpin extends Spin {}
121   -export class ISplit extends Split {}
122   -export class IStep extends Step {}
123   -export class ISteps extends Steps {}
124   -export class ISubmenu extends Submenu {}
125   -export class ISwitch extends Switch {}
126   -export class ITable extends Table {}
127   -export class ITableColumn extends TableColumn {}
128   -export class ITableColumnRenderParams extends TableColumnRenderParams {}
129   -export class ITableExportCsvParams extends TableExportCsvParams {}
130   -export class ITableRenderCreateElementData extends TableRenderCreateElementData {}
131   -export class ITableRenderCreateElementResult extends TableRenderCreateElementResult {}
132   -export class ITabPane extends TabPane {}
133   -export class ITabs extends Tabs {}
134   -export class ITag extends Tag {}
135   -export class ITime extends Time {}
136   -export class ITimeline extends Timeline {}
137   -export class ITimelineItem extends TimelineItem {}
138   -export class ITimePicker extends TimePicker {}
139   -export class ITooltip extends Tooltip {}
140   -export class ITransfer extends Transfer {}
141   -export class ITree extends Tree {}
142   -export class ITreeChild extends TreeChild {}
143   -export class IUpload extends Upload {}
  7 +export { Affix } from './affix';
  8 +export { Alert } from './alert';
  9 +export { Anchor, AnchorLink } from './anchor';
  10 +export { AutoComplete } from './auto-complete';
  11 +export { Avatar } from './avatar';
  12 +export { BackTop } from './back-top';
  13 +export { Badge } from './badge';
  14 +export { Breadcrumb, BreadcrumbItem } from './breadcrumb';
  15 +export { Button, ButtonGroup } from './button';
  16 +export { Card } from './card';
  17 +export { Carousel, CarouselItem } from './carousel';
  18 +export { Cascader } from './cascader';
  19 +export { Cell, CellGroup } from './cell';
  20 +export { Checkbox, CheckboxGroup } from './checkbox';
  21 +export { Circle, Circle as ICircle } from './circle';
  22 +export { Collapse, CollapsePanel } from './collapse';
  23 +export { ColorPicker } from './color-picker';
  24 +export { Content } from './content';
  25 +export { DatePicker } from './date-picker';
  26 +export { Divider } from './divider';
  27 +export { Drawer } from './drawer';
  28 +export { Dropdown, DropdownMenu, DropdownItem } from './dropdown';
  29 +export { Footer } from './footer';
  30 +export { Form, FormItem } from './form';
  31 +export { Header } from './header';
  32 +export { Icon } from './icon';
  33 +export { Input } from './input';
  34 +export { InputNumber } from './input-number';
  35 +export { Scroll } from './scroll';
  36 +export { Split } from './split';
  37 +export { Layout } from './layout';
  38 +export { LoadingBar } from './loading-bar';
  39 +export { Menu, MenuGroup, MenuItem, MenuSub } from './menu';
  40 +export { Message } from './message';
  41 +export { Modal } from './modal';
  42 +export { Notice } from './notice';
  43 +export { Page } from './page';
  44 +export { Poptip } from './poptip';
  45 +export { Progress } from './progress';
  46 +export { Radio, RadioGroup } from './radio';
  47 +export { Rate } from './rate';
  48 +export { Sider } from './sider';
  49 +export { Slider } from './slider';
  50 +export { Spin } from './spin';
  51 +export { Steps, StepsStep } from './steps';
  52 +export { Switch, Switch as ISwitch } from './switch';
  53 +export { Table } from './table';
  54 +export { Tabs, TabsPane } from './tabs';
  55 +export { Tag } from './tag';
  56 +export { Time } from './time';
  57 +export { Timeline, TimelineItem } from './timeline';
  58 +export { TimePicker } from './time-picker';
  59 +export { Tooltip } from './tooltip';
  60 +export { Transfer } from './transfer';
  61 +export { Tree } from './tree';
  62 +export { Upload } from './upload';
  63 +export { Row, Col } from './grid';
  64 +export { Select, Option, OptionGroup } from './select';
  65 +
  66 +declare const API: {
  67 + version: string;
  68 + locale: (l) => void;
  69 + i18n: (fn) => void;
  70 + install: (
  71 + Vue: Vue,
  72 + opts: {
  73 + locale?: any;
  74 + i18n?: any;
  75 + size?: any;
  76 + transfer?: any;
  77 + }
  78 + ) => void;
  79 + lang: (code: string) => void;
  80 +};
  81 +
  82 +export default API;
  83 +
  84 +declare module 'vue/types/vue' {
  85 + interface Vue {
  86 + $IVIEW?: {
  87 + size?: string;
  88 + transfer?: string;
  89 + };
  90 + }
  91 +}
... ...
types/layout.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Layout extends Vue {
8 8 /**
... ...
types/loading-bar.d.ts
... ... @@ -2,9 +2,9 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7   -export declare class LoadingBarInstance {
  7 +export declare class LoadingBar {
8 8 /**
9 9 * 开始从 0 显示进度条,并自动加载进度
10 10 */
... ... @@ -51,11 +51,11 @@ export declare class LoadingBarConfig {
51 51 height?: number;
52 52 }
53 53  
54   -declare module "vue/types/vue" {
  54 +declare module 'vue/types/vue' {
55 55 interface Vue {
56 56 /**
57 57 * 加载进度条
58 58 */
59   - $Loading?: LoadingBarInstance;
  59 + $Loading?: LoadingBar;
60 60 }
61 61 }
62 62 \ No newline at end of file
... ...
types/menu.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Menu extends Vue {
8 8 /**
... ... @@ -73,7 +73,7 @@ export declare class MenuItem extends Vue {
73 73 target?: '_blank' | '_self' | '_parent' | '_top';
74 74 }
75 75  
76   -export declare class Submenu extends Vue {
  76 +export declare class MenuSub extends Vue {
77 77 /**
78 78 * 子菜单的唯一标识,必填
79 79 */
... ...
types/message.d.ts
... ... @@ -4,7 +4,7 @@
4 4 // Definitions: https://github.com/yangdan8/iview.git
5 5 import Vue, { VNode, CreateElement } from "vue";
6 6  
7   -export declare class MessageInstance {
  7 +export declare class Message {
8 8 /**
9 9 * 消息
10 10 * @param config MessageConfig为相关配置,string为待显示的内容
... ... @@ -71,12 +71,12 @@ export declare class MessageConfig {
71 71 duration?: number;
72 72 }
73 73  
74   -declare module "vue/types/vue" {
  74 +declare module 'vue/types/vue' {
75 75 interface Vue {
76 76 /**
77 77 * 全局提示
78 78 */
79   - $Message?: MessageInstance;
  79 + $Message?: Message;
80 80 }
81 81 }
82 82  
... ...
types/modal.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Modal {
8 8 /**
... ... @@ -208,7 +208,7 @@ export declare class ModalConfig {
208 208 onCancel?: () => void;
209 209 }
210 210  
211   -declare module "vue/types/vue" {
  211 +declare module 'vue/types/vue' {
212 212 interface Vue {
213 213 /**
214 214 * 对话框
... ...
types/notice.d.ts
... ... @@ -4,7 +4,7 @@
4 4 // Definitions: https://github.com/yangdan8/iview.git
5 5 import Vue, { VNode, CreateElement } from "vue";
6 6  
7   -export declare class NoticeInstance {
  7 +export declare class Notice {
8 8 /**
9 9 * 打开
10 10 * @param config NoticeConfig为相关配置,string为待显示的内容
... ... @@ -82,11 +82,11 @@ export declare class NoticeGlobalConfig {
82 82 duration?: number;
83 83 }
84 84  
85   -declare module "vue/types/vue" {
  85 +declare module 'vue/types/vue' {
86 86 interface Vue {
87 87 /**
88 88 * 通知提醒
89 89 */
90   - $Notice?: NoticeInstance;
  90 + $Notice?: Notice;
91 91 }
92 92 }
93 93 \ No newline at end of file
... ...
types/page.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Page extends Vue {
8 8 /**
... ...
types/poptip.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Poptip extends Vue {
8 8 /**
... ...
types/progress.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Progress extends Vue {
8 8 /**
... ...
types/radio.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Radio extends Vue {
8 8 /**
... ...
types/rate.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Rate extends Vue {
8 8 /**
... ...
types/scroll.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Scroll extends Vue {
8 8 /**
... ...
types/select.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Select extends Vue {
8 8 /**
... ... @@ -114,7 +114,7 @@ export declare class Select extends Vue {
114 114 clearSingleSelect(): void;
115 115 }
116 116  
117   -export declare class SelectOption extends Vue {
  117 +export declare class Option extends Vue {
118 118 /**
119 119 * 选项值,默认根据此属性值进行筛选,必填
120 120 */
... ... @@ -132,7 +132,7 @@ export declare class SelectOption extends Vue {
132 132 disabled?: boolean;
133 133 }
134 134  
135   -export declare class SelectOptionGroup extends Vue {
  135 +export declare class OptionGroup extends Vue {
136 136 /**
137 137 * 分组的组名
138 138 * @default 空
... ...
types/sider.d.ts 0 → 100644
  1 +// Type definitions for iview 3.0.1
  2 +// Project: https://github.com/iview/iview
  3 +// Definitions by: yangdan
  4 +// Definitions: https://github.com/yangdan8/iview.git
  5 +import Vue, { VNode } from 'vue';
  6 +
  7 +export declare class Sider extends Vue {
  8 +}
0 9 \ No newline at end of file
... ...
types/slider.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Slider extends Vue {
8 8 /**
... ...
types/spin.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Spin extends Vue {
8 8 /**
... ... @@ -23,4 +23,13 @@ export declare class Spin extends Vue {
23 23 */
24 24 '': VNode[];
25 25 };
  26 +}
  27 +
  28 +declare module 'vue/types/vue' {
  29 + interface Vue {
  30 + /**
  31 + *
  32 + */
  33 + $Spin?: Spin;
  34 + }
26 35 }
27 36 \ No newline at end of file
... ...
types/split.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Split extends Vue {
8 8 /**
... ...
types/steps.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Steps extends Vue {
8 8 /**
... ... @@ -26,7 +26,7 @@ export declare class Steps extends Vue {
26 26 direction?: 'horizontal' | 'vertical';
27 27 }
28 28  
29   -export declare class Step extends Vue {
  29 +export declare class StepsStep extends Vue {
30 30 /**
31 31 * 步骤的状态,可选值为wait、process、finish、error,不设置时自动判断
32 32 * @default process
... ...
types/switch.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Switch extends Vue {
8 8 /**
... ...
types/table.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Table extends Vue {
8 8 /**
... ...
types/tabs.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Tabs extends Vue {
8 8 /**
... ... @@ -54,7 +54,7 @@ export declare class Tabs extends Vue {
54 54 };
55 55 }
56 56  
57   -export declare class TabPane extends Vue {
  57 +export declare class TabsPane extends Vue {
58 58 /**
59 59 * 用于标识当前面板,对应 value,默认为其索引值
60 60 */
... ...
types/tag.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Tag extends Vue {
8 8 /**
... ...
types/time-picker.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class TimePicker extends Vue {
8 8 /**
... ...
types/time.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Time extends Vue {
8 8 /**
... ...
types/timeline.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Timeline extends Vue {
8 8 /**
... ...
types/tooltip.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Tooltip extends Vue {
8 8 /**
... ...
types/transfer.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Transfer extends Vue {
8 8 /**
... ...
types/tree.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Tree extends Vue {
8 8 /**
... ...
types/upload.d.ts
... ... @@ -2,7 +2,7 @@
2 2 // Project: https://github.com/iview/iview
3 3 // Definitions by: yangdan
4 4 // Definitions: https://github.com/yangdan8/iview.git
5   -import Vue, { VNode } from "vue";
  5 +import Vue, { VNode } from 'vue';
6 6  
7 7 export declare class Upload extends Vue {
8 8 /**
... ...