From 6d9afa9c19e64cca95e2718dbdd2e3767ff7570b Mon Sep 17 00:00:00 2001 From: yangd Date: Thu, 30 Aug 2018 16:39:36 +0800 Subject: [PATCH] 修改d.ts中的类名,并添加全局方法的d.ts定义 --- types/affix.d.ts | 2 +- types/alert.d.ts | 2 +- types/anchor.d.ts | 2 +- types/auto-complete.d.ts | 2 +- types/avatar.d.ts | 2 +- types/back-top.d.ts | 2 +- types/badge.d.ts | 2 +- types/breadcrumb.d.ts | 2 +- types/button.d.ts | 2 +- types/card.d.ts | 2 +- types/carousel.d.ts | 6 +++++- types/cascader.d.ts | 2 +- types/cell.d.ts | 2 +- types/checkbox.d.ts | 2 +- types/circle.d.ts | 2 +- types/collapse.d.ts | 2 +- types/color-picker.d.ts | 2 +- types/content.d.ts | 8 ++++++++ types/date-picker.d.ts | 2 +- types/divider.d.ts | 2 +- types/drawer.d.ts | 8 ++++++++ types/dropdown.d.ts | 5 ++++- types/footer.d.ts | 8 ++++++++ types/form.d.ts | 2 +- types/grid.d.ts | 6 +++--- types/header.d.ts | 8 ++++++++ types/icon.d.ts | 2 +- types/index.d.ts | 4 ++-- types/input-number.d.ts | 2 +- types/input.d.ts | 2 +- types/iview.components.d.ts | 232 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------- types/layout.d.ts | 2 +- types/loading-bar.d.ts | 8 ++++---- types/menu.d.ts | 4 ++-- types/message.d.ts | 6 +++--- types/modal.d.ts | 4 ++-- types/notice.d.ts | 6 +++--- types/page.d.ts | 2 +- types/poptip.d.ts | 2 +- types/progress.d.ts | 2 +- types/radio.d.ts | 2 +- types/rate.d.ts | 2 +- types/scroll.d.ts | 2 +- types/select.d.ts | 6 +++--- types/sider.d.ts | 8 ++++++++ types/slider.d.ts | 2 +- types/spin.d.ts | 11 ++++++++++- types/split.d.ts | 2 +- types/steps.d.ts | 4 ++-- types/switch.d.ts | 2 +- types/table.d.ts | 2 +- types/tabs.d.ts | 4 ++-- types/tag.d.ts | 2 +- types/time-picker.d.ts | 2 +- types/time.ts | 2 +- types/timeline.d.ts | 2 +- types/tooltip.d.ts | 2 +- types/transfer.d.ts | 2 +- types/tree.d.ts | 2 +- types/upload.d.ts | 2 +- 60 files changed, 216 insertions(+), 212 deletions(-) create mode 100644 types/content.d.ts create mode 100644 types/drawer.d.ts create mode 100644 types/footer.d.ts create mode 100644 types/header.d.ts create mode 100644 types/sider.d.ts diff --git a/types/affix.d.ts b/types/affix.d.ts index a712a3a..edef0c3 100644 --- a/types/affix.d.ts +++ b/types/affix.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Affix extends Vue { /** diff --git a/types/alert.d.ts b/types/alert.d.ts index 77121c5..ce05b20 100644 --- a/types/alert.d.ts +++ b/types/alert.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Alert extends Vue { /** diff --git a/types/anchor.d.ts b/types/anchor.d.ts index 7607ebc..f93871f 100644 --- a/types/anchor.d.ts +++ b/types/anchor.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Anchor extends Vue { /** diff --git a/types/auto-complete.d.ts b/types/auto-complete.d.ts index c87a37b..da5d7a5 100644 --- a/types/auto-complete.d.ts +++ b/types/auto-complete.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class AutoComplete extends Vue { /** diff --git a/types/avatar.d.ts b/types/avatar.d.ts index e62e53c..89de322 100644 --- a/types/avatar.d.ts +++ b/types/avatar.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Avatar extends Vue { /** diff --git a/types/back-top.d.ts b/types/back-top.d.ts index 7f2bdaa..78726e8 100644 --- a/types/back-top.d.ts +++ b/types/back-top.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class BackTop extends Vue { /** diff --git a/types/badge.d.ts b/types/badge.d.ts index 2c8edc3..b3efd1f 100644 --- a/types/badge.d.ts +++ b/types/badge.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Badge extends Vue { /** diff --git a/types/breadcrumb.d.ts b/types/breadcrumb.d.ts index f7af8b2..28fc3cd 100644 --- a/types/breadcrumb.d.ts +++ b/types/breadcrumb.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Breadcrumb extends Vue { /** diff --git a/types/button.d.ts b/types/button.d.ts index 28859b2..b5084a3 100644 --- a/types/button.d.ts +++ b/types/button.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Button extends Vue { /** diff --git a/types/card.d.ts b/types/card.d.ts index 7a3ce37..73e978b 100644 --- a/types/card.d.ts +++ b/types/card.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Card extends Vue { /** diff --git a/types/carousel.d.ts b/types/carousel.d.ts index eaf3cb3..eb466b8 100644 --- a/types/carousel.d.ts +++ b/types/carousel.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Carousel extends Vue { /** @@ -58,4 +58,8 @@ export declare class Carousel extends Vue { * 幻灯片切换时触发,目前激活的幻灯片的索引,原幻灯片的索引 */ $emit(eventName: 'on-change', oldValue: number, value: number): this; +} + +export declare class CarouselItem extends Vue { + } \ No newline at end of file diff --git a/types/cascader.d.ts b/types/cascader.d.ts index 91720ca..0c6561f 100644 --- a/types/cascader.d.ts +++ b/types/cascader.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Cascader extends Vue { /** diff --git a/types/cell.d.ts b/types/cell.d.ts index 866b5e1..9fa0fb8 100644 --- a/types/cell.d.ts +++ b/types/cell.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Cell extends Vue { /** diff --git a/types/checkbox.d.ts b/types/checkbox.d.ts index adf0f45..581660e 100644 --- a/types/checkbox.d.ts +++ b/types/checkbox.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Checkbox extends Vue { /** diff --git a/types/circle.d.ts b/types/circle.d.ts index 57d8e0f..9dd7beb 100644 --- a/types/circle.d.ts +++ b/types/circle.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Circle extends Vue { /** diff --git a/types/collapse.d.ts b/types/collapse.d.ts index f0badd0..92378f7 100644 --- a/types/collapse.d.ts +++ b/types/collapse.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Collapse extends Vue { /** diff --git a/types/color-picker.d.ts b/types/color-picker.d.ts index 8693e61..0a570f6 100644 --- a/types/color-picker.d.ts +++ b/types/color-picker.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class ColorPicker extends Vue { /** diff --git a/types/content.d.ts b/types/content.d.ts new file mode 100644 index 0000000..3d902fb --- /dev/null +++ b/types/content.d.ts @@ -0,0 +1,8 @@ +// Type definitions for iview 3.0.1 +// Project: https://github.com/iview/iview +// Definitions by: yangdan +// Definitions: https://github.com/yangdan8/iview.git +import Vue, { VNode } from 'vue'; + +export declare class Content extends Vue { +} \ No newline at end of file diff --git a/types/date-picker.d.ts b/types/date-picker.d.ts index 9d69dbc..544384c 100644 --- a/types/date-picker.d.ts +++ b/types/date-picker.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class DatePicker extends Vue { /** diff --git a/types/divider.d.ts b/types/divider.d.ts index 1dc163c..8c2c8cf 100644 --- a/types/divider.d.ts +++ b/types/divider.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Divider extends Vue { /** diff --git a/types/drawer.d.ts b/types/drawer.d.ts new file mode 100644 index 0000000..16796be --- /dev/null +++ b/types/drawer.d.ts @@ -0,0 +1,8 @@ +// Type definitions for iview 3.0.1 +// Project: https://github.com/iview/iview +// Definitions by: yangdan +// Definitions: https://github.com/yangdan8/iview.git +import Vue, { VNode } from 'vue'; + +export declare class Drawer extends Vue { +} \ No newline at end of file diff --git a/types/dropdown.d.ts b/types/dropdown.d.ts index 14d9acc..9565c26 100644 --- a/types/dropdown.d.ts +++ b/types/dropdown.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Dropdown extends Vue { /** @@ -56,6 +56,9 @@ export declare class Dropdown extends Vue { }; } +export declare class DropdownMenu extends Vue { +} + export declare class DropdownItem extends Vue { /** * 用来标识这一项 diff --git a/types/footer.d.ts b/types/footer.d.ts new file mode 100644 index 0000000..3d8532b --- /dev/null +++ b/types/footer.d.ts @@ -0,0 +1,8 @@ +// Type definitions for iview 3.0.1 +// Project: https://github.com/iview/iview +// Definitions by: yangdan +// Definitions: https://github.com/yangdan8/iview.git +import Vue, { VNode } from 'vue'; + +export declare class Footer extends Vue { +} \ No newline at end of file diff --git a/types/form.d.ts b/types/form.d.ts index 1829a0e..34425de 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Form extends Vue { /** diff --git a/types/grid.d.ts b/types/grid.d.ts index f038c62..af2bc8e 100644 --- a/types/grid.d.ts +++ b/types/grid.d.ts @@ -2,9 +2,9 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; -export declare class GridRow extends Vue { +export declare class Row extends Vue { /** * 栅格间距,单位 px,左右平分 * @default 0 @@ -28,7 +28,7 @@ export declare class GridRow extends Vue { 'class-name'?: string; } -export declare class GridCol extends Vue { +export declare class Col extends Vue { /** * 栅格的占位格数,可选值为0~24的整数,为 0 时,相当于display:none */ diff --git a/types/header.d.ts b/types/header.d.ts new file mode 100644 index 0000000..31de7de --- /dev/null +++ b/types/header.d.ts @@ -0,0 +1,8 @@ +// Type definitions for iview 3.0.1 +// Project: https://github.com/iview/iview +// Definitions by: yangdan +// Definitions: https://github.com/yangdan8/iview.git +import Vue, { VNode } from 'vue'; + +export declare class Header extends Vue { +} \ No newline at end of file diff --git a/types/icon.d.ts b/types/icon.d.ts index 767958a..461376f 100644 --- a/types/icon.d.ts +++ b/types/icon.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Icon extends Vue { /** diff --git a/types/index.d.ts b/types/index.d.ts index 46d6878..779095e 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2,9 +2,9 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import iView from "./iview"; +import iView from './iview'; export default iView; export as namespace iView; -export * from "./iview.components"; \ No newline at end of file +export * from './iview.components'; \ No newline at end of file diff --git a/types/input-number.d.ts b/types/input-number.d.ts index af150dd..7bd0cec 100644 --- a/types/input-number.d.ts +++ b/types/input-number.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class InputNumber extends Vue { /** diff --git a/types/input.d.ts b/types/input.d.ts index 201c6a9..9553f7b 100644 --- a/types/input.d.ts +++ b/types/input.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Input extends Vue { /** diff --git a/types/iview.components.d.ts b/types/iview.components.d.ts index a5a7ba3..390db30 100644 --- a/types/iview.components.d.ts +++ b/types/iview.components.d.ts @@ -1,143 +1,91 @@ -import { Affix } from "./affix"; -import { Alert } from "./alert"; -import { Anchor, AnchorLink } from "./anchor"; -import { AutoComplete } from "./auto-complete"; -import { Avatar } from "./avatar"; -import { BackTop } from "./back-top"; -import { Badge } from "./badge"; -import { Breadcrumb, BreadcrumbItem } from "./breadcrumb"; -import { Button, ButtonGroup } from "./button"; -import { Card } from "./card"; -import { Carousel } from "./carousel"; -import { Cascader } from "./cascader"; -import { Cell, CellGroup } from "./cell"; -import { Checkbox, CheckboxGroup } from "./checkbox"; -import { Circle } from "./circle"; -import { Collapse, CollapsePanel } from "./collapse"; -import { ColorPicker } from "./color-picker"; -import { DatePicker, DatePickerOptions } from "./date-picker"; -import { Divider } from "./divider"; -import { Dropdown, DropdownItem } from "./dropdown"; -import { Form, FormItem } from "./form"; -import { GridRow, GridCol } from "./grid"; -import { Icon } from "./icon"; -import { Input } from "./input"; -import { InputNumber } from "./input-number"; -import { Layout } from "./layout"; -import { LoadingBarInstance, LoadingBarConfig } from "./loading-bar"; -import { Menu, MenuItem, Submenu, MenuGroup } from "./menu"; -import { MessageInstance, MessageConfig } from "./message"; -import { Modal, ModalInstance, ModalConfig } from "./modal"; -import { NoticeInstance, NoticeConfig, NoticeGlobalConfig } from "./notice"; -import { Page } from "./page"; -import { Poptip } from "./poptip"; -import { Progress } from "./progress"; -import { Radio, RadioGroup } from "./radio"; -import { Rate } from "./rate"; -import { Scroll } from "./scroll"; -import { Select, SelectOption, SelectOptionGroup } from "./select"; -import { Spin } from "./spin"; -import { Split } from "./split"; -import { Steps, Step } from "./steps"; -import { Switch } from "./switch"; -import { - Table, - TableColumn, - TableRenderCreateElementData, - TableRenderCreateElementResult, - TableColumnRenderParams, - TableExportCsvParams -} from "./table"; -import { Tabs, TabPane } from "./tabs"; -import { Tag } from "./tag"; -import { Time } from "./time"; -import { Timeline, TimelineItem } from "./timeline"; -import { TimePicker } from "./time-picker"; -import { Tooltip } from "./tooltip"; -import { Transfer } from "./transfer"; -import { Tree, TreeChild } from "./tree"; -import { Upload } from "./upload"; +// Type definitions for iview 3.0.1 +// Project: https://github.com/iview/iview +// Definitions by: yangdan +// Definitions: https://github.com/yangdan8/iview.git +import Vue from 'vue'; -export class IAffix extends Affix {} -export class IAlert extends Alert {} -export class IAnchor extends Anchor {} -export class IAnchorLink extends AnchorLink {} -export class IAutoComplete extends AutoComplete {} -export class IAvatar extends Avatar {} -export class IBackTop extends BackTop {} -export class IBadge extends Badge {} -export class IBreadcrumb extends Breadcrumb {} -export class IBreadcrumbItem extends BreadcrumbItem {} -export class IButton extends Button {} -export class IButtonGroup extends ButtonGroup {} -export class ICard extends Card {} -export class ICarousel extends Carousel {} -export class ICascader extends Cascader {} -export class ICell extends Cell {} -export class ICellGroup extends CellGroup {} -export class ICheckbox extends Checkbox {} -export class ICheckboxGroup extends CheckboxGroup {} -export class ICircle extends Circle {} -export class ICollapse extends Collapse {} -export class ICollapsePanel extends CollapsePanel {} -export class IColorPicker extends ColorPicker {} -export class IDatePicker extends DatePicker {} -export class IDatePickerOptions extends DatePickerOptions {} -export class IDivider extends Divider {} -export class IDropdown extends Dropdown {} -export class IDropdownItem extends DropdownItem {} -export class IForm extends Form {} -export class IFormItem extends FormItem {} -export class IGridCol extends GridCol {} -export class IGridRow extends GridRow {} -export class IIcon extends Icon {} -export class IInput extends Input {} -export class IInputNumber extends InputNumber {} -export class ILayout extends Layout {} -export class ILoadingBarInstance extends LoadingBarInstance {} -export class ILoadingBarConfig extends LoadingBarConfig {} -export class IMenu extends Menu {} -export class IMenuGroup extends MenuGroup {} -export class IMenuItem extends MenuItem {} -export class IMessageConfig extends MessageConfig {} -export class IMessageInstance extends MessageInstance {} -export class IModal extends Modal {} -export class IModalConfig extends ModalConfig {} -export class IModalInstance extends ModalInstance {} -export class INoticeConfig extends NoticeConfig {} -export class INoticeGlobalConfig extends NoticeGlobalConfig {} -export class INoticeInstance extends NoticeInstance {} -export class IPage extends Page {} -export class IPoptip extends Poptip {} -export class IProgress extends Progress {} -export class IRadio extends Radio {} -export class IRadioGroup extends RadioGroup {} -export class IRate extends Rate {} -export class IScroll extends Scroll {} -export class ISelect extends Select {} -export class ISelectOption extends SelectOption {} -export class ISelectOptionGroup extends SelectOptionGroup {} -export class ISpin extends Spin {} -export class ISplit extends Split {} -export class IStep extends Step {} -export class ISteps extends Steps {} -export class ISubmenu extends Submenu {} -export class ISwitch extends Switch {} -export class ITable extends Table {} -export class ITableColumn extends TableColumn {} -export class ITableColumnRenderParams extends TableColumnRenderParams {} -export class ITableExportCsvParams extends TableExportCsvParams {} -export class ITableRenderCreateElementData extends TableRenderCreateElementData {} -export class ITableRenderCreateElementResult extends TableRenderCreateElementResult {} -export class ITabPane extends TabPane {} -export class ITabs extends Tabs {} -export class ITag extends Tag {} -export class ITime extends Time {} -export class ITimeline extends Timeline {} -export class ITimelineItem extends TimelineItem {} -export class ITimePicker extends TimePicker {} -export class ITooltip extends Tooltip {} -export class ITransfer extends Transfer {} -export class ITree extends Tree {} -export class ITreeChild extends TreeChild {} -export class IUpload extends Upload {} +export { Affix } from './affix'; +export { Alert } from './alert'; +export { Anchor, AnchorLink } from './anchor'; +export { AutoComplete } from './auto-complete'; +export { Avatar } from './avatar'; +export { BackTop } from './back-top'; +export { Badge } from './badge'; +export { Breadcrumb, BreadcrumbItem } from './breadcrumb'; +export { Button, ButtonGroup } from './button'; +export { Card } from './card'; +export { Carousel, CarouselItem } from './carousel'; +export { Cascader } from './cascader'; +export { Cell, CellGroup } from './cell'; +export { Checkbox, CheckboxGroup } from './checkbox'; +export { Circle, Circle as ICircle } from './circle'; +export { Collapse, CollapsePanel } from './collapse'; +export { ColorPicker } from './color-picker'; +export { Content } from './content'; +export { DatePicker } from './date-picker'; +export { Divider } from './divider'; +export { Drawer } from './drawer'; +export { Dropdown, DropdownMenu, DropdownItem } from './dropdown'; +export { Footer } from './footer'; +export { Form, FormItem } from './form'; +export { Header } from './header'; +export { Icon } from './icon'; +export { Input } from './input'; +export { InputNumber } from './input-number'; +export { Scroll } from './scroll'; +export { Split } from './split'; +export { Layout } from './layout'; +export { LoadingBar } from './loading-bar'; +export { Menu, MenuGroup, MenuItem, MenuSub } from './menu'; +export { Message } from './message'; +export { Modal } from './modal'; +export { Notice } from './notice'; +export { Page } from './page'; +export { Poptip } from './poptip'; +export { Progress } from './progress'; +export { Radio, RadioGroup } from './radio'; +export { Rate } from './rate'; +export { Sider } from './sider'; +export { Slider } from './slider'; +export { Spin } from './spin'; +export { Steps, StepsStep } from './steps'; +export { Switch, Switch as ISwitch } from './switch'; +export { Table } from './table'; +export { Tabs, TabsPane } from './tabs'; +export { Tag } from './tag'; +export { Time } from './time'; +export { Timeline, TimelineItem } from './timeline'; +export { TimePicker } from './time-picker'; +export { Tooltip } from './tooltip'; +export { Transfer } from './transfer'; +export { Tree } from './tree'; +export { Upload } from './upload'; +export { Row, Col } from './grid'; +export { Select, Option, OptionGroup } from './select'; + +declare const API: { + version: string; + locale: (l) => void; + i18n: (fn) => void; + install: ( + Vue: Vue, + opts: { + locale?: any; + i18n?: any; + size?: any; + transfer?: any; + } + ) => void; + lang: (code: string) => void; +}; + +export default API; + +declare module 'vue/types/vue' { + interface Vue { + $IVIEW?: { + size?: string; + transfer?: string; + }; + } +} diff --git a/types/layout.d.ts b/types/layout.d.ts index 56e353b..68c3cbe 100644 --- a/types/layout.d.ts +++ b/types/layout.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Layout extends Vue { /** diff --git a/types/loading-bar.d.ts b/types/loading-bar.d.ts index 0c7483d..fef4eef 100644 --- a/types/loading-bar.d.ts +++ b/types/loading-bar.d.ts @@ -2,9 +2,9 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; -export declare class LoadingBarInstance { +export declare class LoadingBar { /** * 开始从 0 显示进度条,并自动加载进度 */ @@ -51,11 +51,11 @@ export declare class LoadingBarConfig { height?: number; } -declare module "vue/types/vue" { +declare module 'vue/types/vue' { interface Vue { /** * 加载进度条 */ - $Loading?: LoadingBarInstance; + $Loading?: LoadingBar; } } \ No newline at end of file diff --git a/types/menu.d.ts b/types/menu.d.ts index 8a1ca05..2e0eac0 100644 --- a/types/menu.d.ts +++ b/types/menu.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Menu extends Vue { /** @@ -73,7 +73,7 @@ export declare class MenuItem extends Vue { target?: '_blank' | '_self' | '_parent' | '_top'; } -export declare class Submenu extends Vue { +export declare class MenuSub extends Vue { /** * 子菜单的唯一标识,必填 */ diff --git a/types/message.d.ts b/types/message.d.ts index 76e4d10..4f2e3bd 100644 --- a/types/message.d.ts +++ b/types/message.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode, CreateElement } from "vue"; -export declare class MessageInstance { +export declare class Message { /** * 消息 * @param config MessageConfig为相关配置,string为待显示的内容 @@ -71,12 +71,12 @@ export declare class MessageConfig { duration?: number; } -declare module "vue/types/vue" { +declare module 'vue/types/vue' { interface Vue { /** * 全局提示 */ - $Message?: MessageInstance; + $Message?: Message; } } diff --git a/types/modal.d.ts b/types/modal.d.ts index 8997294..c8c2617 100644 --- a/types/modal.d.ts +++ b/types/modal.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Modal { /** @@ -208,7 +208,7 @@ export declare class ModalConfig { onCancel?: () => void; } -declare module "vue/types/vue" { +declare module 'vue/types/vue' { interface Vue { /** * 对话框 diff --git a/types/notice.d.ts b/types/notice.d.ts index e6cf851..0873fe9 100644 --- a/types/notice.d.ts +++ b/types/notice.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode, CreateElement } from "vue"; -export declare class NoticeInstance { +export declare class Notice { /** * 打开 * @param config NoticeConfig为相关配置,string为待显示的内容 @@ -82,11 +82,11 @@ export declare class NoticeGlobalConfig { duration?: number; } -declare module "vue/types/vue" { +declare module 'vue/types/vue' { interface Vue { /** * 通知提醒 */ - $Notice?: NoticeInstance; + $Notice?: Notice; } } \ No newline at end of file diff --git a/types/page.d.ts b/types/page.d.ts index 8726818..bca0dd3 100644 --- a/types/page.d.ts +++ b/types/page.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Page extends Vue { /** diff --git a/types/poptip.d.ts b/types/poptip.d.ts index 54be59d..90b462d 100644 --- a/types/poptip.d.ts +++ b/types/poptip.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Poptip extends Vue { /** diff --git a/types/progress.d.ts b/types/progress.d.ts index c380a5b..79c53a6 100644 --- a/types/progress.d.ts +++ b/types/progress.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Progress extends Vue { /** diff --git a/types/radio.d.ts b/types/radio.d.ts index 108443a..749ecc4 100644 --- a/types/radio.d.ts +++ b/types/radio.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Radio extends Vue { /** diff --git a/types/rate.d.ts b/types/rate.d.ts index 7b5f455..e4d2674 100644 --- a/types/rate.d.ts +++ b/types/rate.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Rate extends Vue { /** diff --git a/types/scroll.d.ts b/types/scroll.d.ts index 54f7d57..5668a71 100644 --- a/types/scroll.d.ts +++ b/types/scroll.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Scroll extends Vue { /** diff --git a/types/select.d.ts b/types/select.d.ts index 789a05a..67b8ec3 100644 --- a/types/select.d.ts +++ b/types/select.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Select extends Vue { /** @@ -114,7 +114,7 @@ export declare class Select extends Vue { clearSingleSelect(): void; } -export declare class SelectOption extends Vue { +export declare class Option extends Vue { /** * 选项值,默认根据此属性值进行筛选,必填 */ @@ -132,7 +132,7 @@ export declare class SelectOption extends Vue { disabled?: boolean; } -export declare class SelectOptionGroup extends Vue { +export declare class OptionGroup extends Vue { /** * 分组的组名 * @default 空 diff --git a/types/sider.d.ts b/types/sider.d.ts new file mode 100644 index 0000000..7a53986 --- /dev/null +++ b/types/sider.d.ts @@ -0,0 +1,8 @@ +// Type definitions for iview 3.0.1 +// Project: https://github.com/iview/iview +// Definitions by: yangdan +// Definitions: https://github.com/yangdan8/iview.git +import Vue, { VNode } from 'vue'; + +export declare class Sider extends Vue { +} \ No newline at end of file diff --git a/types/slider.d.ts b/types/slider.d.ts index 8d2cbd3..a68a87f 100644 --- a/types/slider.d.ts +++ b/types/slider.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Slider extends Vue { /** diff --git a/types/spin.d.ts b/types/spin.d.ts index 7e7d48a..9b6f4fc 100644 --- a/types/spin.d.ts +++ b/types/spin.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Spin extends Vue { /** @@ -23,4 +23,13 @@ export declare class Spin extends Vue { */ '': VNode[]; }; +} + +declare module 'vue/types/vue' { + interface Vue { + /** + * + */ + $Spin?: Spin; + } } \ No newline at end of file diff --git a/types/split.d.ts b/types/split.d.ts index f939b57..c5b3a5e 100644 --- a/types/split.d.ts +++ b/types/split.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Split extends Vue { /** diff --git a/types/steps.d.ts b/types/steps.d.ts index 7574997..16c6ae7 100644 --- a/types/steps.d.ts +++ b/types/steps.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Steps extends Vue { /** @@ -26,7 +26,7 @@ export declare class Steps extends Vue { direction?: 'horizontal' | 'vertical'; } -export declare class Step extends Vue { +export declare class StepsStep extends Vue { /** * 步骤的状态,可选值为wait、process、finish、error,不设置时自动判断 * @default process diff --git a/types/switch.d.ts b/types/switch.d.ts index c143584..6a54a20 100644 --- a/types/switch.d.ts +++ b/types/switch.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Switch extends Vue { /** diff --git a/types/table.d.ts b/types/table.d.ts index 3590874..3262629 100644 --- a/types/table.d.ts +++ b/types/table.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Table extends Vue { /** diff --git a/types/tabs.d.ts b/types/tabs.d.ts index 1be00a8..55f04ce 100644 --- a/types/tabs.d.ts +++ b/types/tabs.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Tabs extends Vue { /** @@ -54,7 +54,7 @@ export declare class Tabs extends Vue { }; } -export declare class TabPane extends Vue { +export declare class TabsPane extends Vue { /** * 用于标识当前面板,对应 value,默认为其索引值 */ diff --git a/types/tag.d.ts b/types/tag.d.ts index cc3fd9c..9db360a 100644 --- a/types/tag.d.ts +++ b/types/tag.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Tag extends Vue { /** diff --git a/types/time-picker.d.ts b/types/time-picker.d.ts index 22b973b..3b1b3ad 100644 --- a/types/time-picker.d.ts +++ b/types/time-picker.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class TimePicker extends Vue { /** diff --git a/types/time.ts b/types/time.ts index d5b2a1f..34365e1 100644 --- a/types/time.ts +++ b/types/time.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Time extends Vue { /** diff --git a/types/timeline.d.ts b/types/timeline.d.ts index 5f036fa..7d28784 100644 --- a/types/timeline.d.ts +++ b/types/timeline.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Timeline extends Vue { /** diff --git a/types/tooltip.d.ts b/types/tooltip.d.ts index 477f9f8..0530018 100644 --- a/types/tooltip.d.ts +++ b/types/tooltip.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Tooltip extends Vue { /** diff --git a/types/transfer.d.ts b/types/transfer.d.ts index 95c9d00..e40ace4 100644 --- a/types/transfer.d.ts +++ b/types/transfer.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Transfer extends Vue { /** diff --git a/types/tree.d.ts b/types/tree.d.ts index 65b219c..2d25fd1 100644 --- a/types/tree.d.ts +++ b/types/tree.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Tree extends Vue { /** diff --git a/types/upload.d.ts b/types/upload.d.ts index 7696eef..835da69 100644 --- a/types/upload.d.ts +++ b/types/upload.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git -import Vue, { VNode } from "vue"; +import Vue, { VNode } from 'vue'; export declare class Upload extends Vue { /** -- libgit2 0.21.4