From 539e96c58cade5cfaa0ef3bb180adc47d78576ca Mon Sep 17 00:00:00 2001 From: yangd Date: Tue, 7 May 2019 17:14:49 +0800 Subject: [PATCH] 修复使用ts模式时不能按需引入组件的问题 --- types/affix.d.ts | 2 +- types/alert.d.ts | 2 +- types/anchor.d.ts | 4 ++-- 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 | 4 ++-- types/button.d.ts | 4 ++-- types/card.d.ts | 2 +- types/carousel.d.ts | 4 ++-- types/cascader.d.ts | 2 +- types/cell.d.ts | 4 ++-- types/checkbox.d.ts | 4 ++-- types/circle.d.ts | 2 +- types/collapse.d.ts | 4 ++-- types/color-picker.d.ts | 2 +- types/content.d.ts | 2 +- types/date-picker.d.ts | 4 ++-- types/divider.d.ts | 2 +- types/drawer.d.ts | 2 +- types/dropdown.d.ts | 6 +++--- types/footer.d.ts | 2 +- types/form.d.ts | 4 ++-- types/grid.d.ts | 4 ++-- types/header.d.ts | 2 +- types/icon.d.ts | 2 +- types/input-number.d.ts | 2 +- types/input.d.ts | 2 +- types/layout.d.ts | 2 +- types/loading-bar.d.ts | 4 ++-- types/menu.d.ts | 8 ++++---- types/message.d.ts | 4 ++-- types/modal.d.ts | 6 +++--- types/notice.d.ts | 6 +++--- types/page.d.ts | 2 +- types/poptip.d.ts | 2 +- types/progress.d.ts | 2 +- types/radio.d.ts | 4 ++-- types/rate.d.ts | 2 +- types/scroll.d.ts | 2 +- types/select.d.ts | 6 +++--- types/sider.d.ts | 2 +- types/slider.d.ts | 2 +- types/spin.d.ts | 2 +- types/split.d.ts | 2 +- types/steps.d.ts | 4 ++-- types/switch.d.ts | 2 +- types/table.d.ts | 14 +++++++------- types/tabs.d.ts | 4 ++-- types/tag.d.ts | 2 +- types/time-picker.d.ts | 2 +- types/time.d.ts | 2 +- types/timeline.d.ts | 4 ++-- types/tooltip.d.ts | 2 +- types/transfer.d.ts | 2 +- types/tree.d.ts | 4 ++-- types/upload.d.ts | 2 +- 58 files changed, 92 insertions(+), 92 deletions(-) diff --git a/types/affix.d.ts b/types/affix.d.ts index 5ef53e9..cadf12a 100644 --- a/types/affix.d.ts +++ b/types/affix.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Affix extends Vue { +export declare class Affix extends Vue { /** * 距离窗口顶部达到指定偏移量后触发 * @default 0 diff --git a/types/alert.d.ts b/types/alert.d.ts index 1ccac51..29c1264 100644 --- a/types/alert.d.ts +++ b/types/alert.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Alert extends Vue { +export declare class Alert extends Vue { /** * 警告提示样式,可选值为info、success、warning、error * @default info diff --git a/types/anchor.d.ts b/types/anchor.d.ts index d6f67a7..3634017 100644 --- a/types/anchor.d.ts +++ b/types/anchor.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Anchor extends Vue { +export declare class Anchor extends Vue { /** * 固定模式 * @default true @@ -48,7 +48,7 @@ export declare interface Anchor extends Vue { $emit(eventName: 'on-change', []): this; } -export declare interface AnchorLink extends Vue { +export declare class AnchorLink extends Vue { /** * 锚点链接 * @default diff --git a/types/auto-complete.d.ts b/types/auto-complete.d.ts index 6109fae..7d9e330 100644 --- a/types/auto-complete.d.ts +++ b/types/auto-complete.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface AutoComplete extends Vue { +export declare class AutoComplete extends Vue { /** * 绑定的值,可使用 v-model 双向绑定 */ diff --git a/types/avatar.d.ts b/types/avatar.d.ts index cd147e5..1f7b952 100644 --- a/types/avatar.d.ts +++ b/types/avatar.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Avatar extends Vue { +export declare class Avatar extends Vue { /** * 指定头像的形状,可选值为 circle、square * @default circle diff --git a/types/back-top.d.ts b/types/back-top.d.ts index b6acd96..e32c959 100644 --- a/types/back-top.d.ts +++ b/types/back-top.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface BackTop extends Vue { +export declare class BackTop extends Vue { /** * 页面滚动高度达到该值时才显示BackTop组件 * @default 400 diff --git a/types/badge.d.ts b/types/badge.d.ts index 9894152..d0a5da9 100644 --- a/types/badge.d.ts +++ b/types/badge.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Badge extends Vue { +export declare class Badge extends Vue { /** * 显示的数字,大于overflowCount时,显示${overflowCount}+,为 0 时隐藏 */ diff --git a/types/breadcrumb.d.ts b/types/breadcrumb.d.ts index ee545dd..77dca0a 100644 --- a/types/breadcrumb.d.ts +++ b/types/breadcrumb.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Breadcrumb extends Vue { +export declare class Breadcrumb extends Vue { /** * 自定义分隔符 * @default / @@ -12,7 +12,7 @@ export declare interface Breadcrumb extends Vue { separator?: string; } -export declare interface BreadcrumbItem extends Vue { +export declare class BreadcrumbItem extends Vue { /** * 链接,不传则没有链接 */ diff --git a/types/button.d.ts b/types/button.d.ts index 37d820f..8e3329f 100644 --- a/types/button.d.ts +++ b/types/button.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Button extends Vue { +export declare class Button extends Vue { /** * 按钮类型,可选值为 default、primary、dashed、text、info、success、warning、error或者不设置 * @default default @@ -73,7 +73,7 @@ export declare interface Button extends Vue { append?: boolean; } -export declare interface ButtonGroup extends Vue { +export declare class ButtonGroup extends Vue { /** * 按钮组合大小,可选值为large、small、default或者不设置 * @default default diff --git a/types/card.d.ts b/types/card.d.ts index 5adee88..12e90cd 100644 --- a/types/card.d.ts +++ b/types/card.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Card extends Vue { +export declare class Card extends Vue { /** * 是否显示边框,建议在灰色背景下使用 * @default true diff --git a/types/carousel.d.ts b/types/carousel.d.ts index 4ccbb49..966beed 100644 --- a/types/carousel.d.ts +++ b/types/carousel.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Carousel extends Vue { +export declare class Carousel extends Vue { /** * 幻灯片的索引,从 0 开始,可以使用 v-model 双向绑定数据 * @default 0 @@ -60,6 +60,6 @@ export declare interface Carousel extends Vue { $emit(eventName: 'on-change', oldValue: number, value: number): this; } -export declare interface CarouselItem extends Vue { +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 5476eb5..04e0cfd 100644 --- a/types/cascader.d.ts +++ b/types/cascader.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Cascader extends Vue { +export declare class Cascader extends Vue { /** * 可选项的数据源,格式参照示例说明 * @default [] diff --git a/types/cell.d.ts b/types/cell.d.ts index b4579ef..5148c5b 100644 --- a/types/cell.d.ts +++ b/types/cell.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Cell extends Vue { +export declare class Cell extends Vue { /** * 用来标识这一项 */ @@ -77,7 +77,7 @@ export declare interface Cell extends Vue { } } -export declare interface CellGroup extends Vue { +export declare class CellGroup extends Vue { /** * 点击单元格时触发 * diff --git a/types/checkbox.d.ts b/types/checkbox.d.ts index 5f4afa9..bf6dbb4 100644 --- a/types/checkbox.d.ts +++ b/types/checkbox.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Checkbox extends Vue { +export declare class Checkbox extends Vue { /** * 只在单独使用时有效。可以使用 v-model 双向绑定数据 * @default false @@ -44,7 +44,7 @@ export declare interface Checkbox extends Vue { $emit(eventName: 'on-change', value: boolean): this; } -export declare interface CheckboxGroup extends Vue { +export declare class CheckboxGroup extends Vue { /** * 指定选中项目的集合,可以使用 v-model 双向绑定数据 * @default [] diff --git a/types/circle.d.ts b/types/circle.d.ts index 002ba1a..3d5cad4 100644 --- a/types/circle.d.ts +++ b/types/circle.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Circle extends Vue { +export declare class Circle extends Vue { /** * 百分比 * @default 0 diff --git a/types/collapse.d.ts b/types/collapse.d.ts index 2ce649e..c01b73c 100644 --- a/types/collapse.d.ts +++ b/types/collapse.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Collapse extends Vue { +export declare class Collapse extends Vue { /** * 当前激活的面板的 name,可以使用 v-model 双向绑定 */ @@ -26,7 +26,7 @@ export declare interface Collapse extends Vue { $emit(eventName: 'on-change', []): this; } -export declare interface CollapsePanel extends Vue { +export declare class CollapsePanel extends Vue { /** * 当前面板的 name,与 Collapse的value对应,不填为索引值 * @default index的值 diff --git a/types/color-picker.d.ts b/types/color-picker.d.ts index e8ca477..0e78cd7 100644 --- a/types/color-picker.d.ts +++ b/types/color-picker.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface ColorPicker extends Vue { +export declare class ColorPicker extends Vue { /** * 绑定的值,可使用 v-model 双向绑定 */ diff --git a/types/content.d.ts b/types/content.d.ts index acd0d6a..e0d4f9a 100644 --- a/types/content.d.ts +++ b/types/content.d.ts @@ -4,5 +4,5 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Content extends 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 9302d7f..06146a8 100644 --- a/types/date-picker.d.ts +++ b/types/date-picker.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface DatePicker extends Vue { +export declare class DatePicker extends Vue { /** * 显示类型,可选值为 date、daterange、datetime、datetimerange、year、month'|'默认值date */ @@ -146,7 +146,7 @@ export declare interface DatePicker extends Vue { }; } -export declare interface DatePickerOptions { +export declare class DatePickerOptions { /** * 设置快捷选项,每项内容: * text:显示的文案 diff --git a/types/divider.d.ts b/types/divider.d.ts index e36f76c..68e2ddd 100644 --- a/types/divider.d.ts +++ b/types/divider.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Divider extends Vue { +export declare class Divider extends Vue { /** * 水平还是垂直类型,可选值为 horizontal 或 vertical * @default horizontal diff --git a/types/drawer.d.ts b/types/drawer.d.ts index 38a4879..83d1c40 100644 --- a/types/drawer.d.ts +++ b/types/drawer.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Drawer extends Vue { +export declare class Drawer extends Vue { /** * 抽屉是否显示,可使用 v-model 双向绑定数据 * @default false diff --git a/types/dropdown.d.ts b/types/dropdown.d.ts index bce045a..5ad9b12 100644 --- a/types/dropdown.d.ts +++ b/types/dropdown.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Dropdown extends Vue { +export declare class Dropdown extends Vue { /** * 触发方式,可选值为 hover(悬停)click(点击)contextMenu(右键)custom(自定义),使用 custom 时,需配合 visible 一起使用 * @default hover @@ -65,10 +65,10 @@ export declare interface Dropdown extends Vue { }; } -export declare interface DropdownMenu extends Vue { +export declare class DropdownMenu extends Vue { } -export declare interface DropdownItem extends Vue { +export declare class DropdownItem extends Vue { /** * 用来标识这一项 */ diff --git a/types/footer.d.ts b/types/footer.d.ts index 2a2e875..5fa8783 100644 --- a/types/footer.d.ts +++ b/types/footer.d.ts @@ -4,5 +4,5 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Footer extends 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 6d11415..016e9b9 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Form extends Vue { +export declare class Form extends Vue { /** * 表单数据对象 */ @@ -46,7 +46,7 @@ export declare interface Form extends Vue { resetFields(): void; } -export declare interface FormItem extends Vue { +export declare class FormItem extends Vue { /** * 对应表单域 model 里的字段 */ diff --git a/types/grid.d.ts b/types/grid.d.ts index 4dc544e..e706bd7 100644 --- a/types/grid.d.ts +++ b/types/grid.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Row extends Vue { +export declare class Row extends Vue { /** * 栅格间距,单位 px,左右平分 * @default 0 @@ -28,7 +28,7 @@ export declare interface Row extends Vue { 'class-name'?: string; } -export declare interface Col 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 index fc44aea..fa0f2ce 100644 --- a/types/header.d.ts +++ b/types/header.d.ts @@ -4,5 +4,5 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Header extends 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 1abe78c..5f39c21 100644 --- a/types/icon.d.ts +++ b/types/icon.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Icon extends Vue { +export declare class Icon extends Vue { /** * 图标的名称 */ diff --git a/types/input-number.d.ts b/types/input-number.d.ts index 062e23e..5b9058a 100644 --- a/types/input-number.d.ts +++ b/types/input-number.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface InputNumber extends Vue { +export declare class InputNumber extends Vue { /** * 最大值,默认值Infinity */ diff --git a/types/input.d.ts b/types/input.d.ts index 4db95c3..413b8c1 100644 --- a/types/input.d.ts +++ b/types/input.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Input extends Vue { +export declare class Input extends Vue { /** * 输入框类型,可选值为 text、password、textarea、url、email、date、number、tel * @default text diff --git a/types/layout.d.ts b/types/layout.d.ts index a767cd8..7d03e4c 100644 --- a/types/layout.d.ts +++ b/types/layout.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Layout extends Vue { +export declare class Layout extends Vue { /** * 触发响应式布局的断点,可选值为xs,sm,md,lg,xl或xxl,若不设此属性则不会触发响应式布局。 * { diff --git a/types/loading-bar.d.ts b/types/loading-bar.d.ts index 68f307e..a79ff5a 100644 --- a/types/loading-bar.d.ts +++ b/types/loading-bar.d.ts @@ -6,7 +6,7 @@ import Vue from 'vue'; export const LoadingBar: LoadingBarClass; -export declare interface LoadingBarClass { +export declare class LoadingBarClass { /** * 开始从 0 显示进度条,并自动加载进度 */ @@ -35,7 +35,7 @@ export declare interface LoadingBarClass { destroy(): void; } -export declare interface LoadingBarConfig { +export declare class LoadingBarConfig { /** * 进度条的颜色,默认为 iView 主色 * @default primary diff --git a/types/menu.d.ts b/types/menu.d.ts index db9c20e..f4e5f2c 100644 --- a/types/menu.d.ts +++ b/types/menu.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Menu extends Vue { +export declare class Menu extends Vue { /** * 菜单类型,可选值为 horizontal(水平) 和 vertical(垂直) * @default vertical @@ -52,7 +52,7 @@ export declare interface Menu extends Vue { updateActiveName(): void; } -export declare interface MenuItem extends Vue { +export declare class MenuItem extends Vue { /** * 菜单项的唯一标识,必填 */ @@ -78,7 +78,7 @@ export declare interface MenuItem extends Vue { append?: boolean; } -export declare interface MenuSub extends Vue { +export declare class MenuSub extends Vue { /** * 子菜单的唯一标识,必填 */ @@ -98,7 +98,7 @@ export declare interface MenuSub extends Vue { }; } -export declare interface MenuGroup extends Vue { +export declare class MenuGroup extends Vue { /** * 分组标题 * @default 空 diff --git a/types/message.d.ts b/types/message.d.ts index 6293aab..dd96962 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 interface Message { +export declare class Message { /** * 消息 * @param config MessageConfig为相关配置,string为待显示的内容 @@ -41,7 +41,7 @@ export declare interface Message { destroy(): void; } -export declare interface MessageConfig { +export declare class MessageConfig { /** * 提示内容 */ diff --git a/types/modal.d.ts b/types/modal.d.ts index bf06618..f141237 100644 --- a/types/modal.d.ts +++ b/types/modal.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode, CreateElement } from "vue"; -export declare interface Modal { +export declare class Modal { /** * 对话框是否显示,可使用 v-model 双向绑定数据。 * @default false @@ -128,7 +128,7 @@ export declare interface Modal { }; } -export declare interface ModalInstance { +export declare class ModalInstance { /** * 消息 * @param config ModalConfig为相关配置,string为待显示的内容 @@ -160,7 +160,7 @@ export declare interface ModalInstance { remove(): void; } -export declare interface ModalConfig { +export declare class ModalConfig { /** * 标题或者Element选择器字符串 */ diff --git a/types/notice.d.ts b/types/notice.d.ts index 6125882..1210090 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 interface Notice { +export declare class Notice { /** * 打开 * @param config NoticeConfig为相关配置,string为待显示的内容 @@ -44,7 +44,7 @@ export declare interface Notice { destroy(): void; } -export declare interface NoticeConfig { +export declare class NoticeConfig { /** * 通知提醒的标题 */ @@ -72,7 +72,7 @@ export declare interface NoticeConfig { onClose?: Function; } -export declare interface NoticeGlobalConfig { +export declare class NoticeGlobalConfig { /** * 通知组件距离顶端的距离,单位像素 默认24 */ diff --git a/types/page.d.ts b/types/page.d.ts index 23e2627..4305eb7 100644 --- a/types/page.d.ts +++ b/types/page.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Page extends Vue { +export declare class Page extends Vue { /** * 当前页码,支持 .sync 修饰符 * @default 1 diff --git a/types/poptip.d.ts b/types/poptip.d.ts index 6578247..6d1ecfe 100644 --- a/types/poptip.d.ts +++ b/types/poptip.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Poptip extends Vue { +export declare class Poptip extends Vue { /** * 触发方式,可选值为hover(悬停)click(点击)focus(聚焦), * 在 confirm 模式下,只有 click 有效 diff --git a/types/progress.d.ts b/types/progress.d.ts index 28fdcd3..a4d9110 100644 --- a/types/progress.d.ts +++ b/types/progress.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Progress extends Vue { +export declare class Progress extends Vue { /** * 百分比 * @default 0 diff --git a/types/radio.d.ts b/types/radio.d.ts index e3d65ee..5365585 100644 --- a/types/radio.d.ts +++ b/types/radio.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Radio extends Vue { +export declare class Radio extends Vue { /** * 只在单独使用时有效。可以使用 v-model 双向绑定数据 * @default false @@ -39,7 +39,7 @@ export declare interface Radio extends Vue { $emit(eventName: 'on-change', arg: string | number | boolean): this; } -export declare interface RadioGroup extends Vue { +export declare class RadioGroup extends Vue { /** * 指定当前选中的项目数据。可以使用 v-model 双向绑定数据 */ diff --git a/types/rate.d.ts b/types/rate.d.ts index 47b1576..4470316 100644 --- a/types/rate.d.ts +++ b/types/rate.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Rate extends Vue { +export declare class Rate extends Vue { /** * star总数 * @default 5 diff --git a/types/scroll.d.ts b/types/scroll.d.ts index 0adbadb..abee067 100644 --- a/types/scroll.d.ts +++ b/types/scroll.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Scroll extends Vue { +export declare class Scroll extends Vue { /** * 滚动区域的高度,单位像素 * @default 300 diff --git a/types/select.d.ts b/types/select.d.ts index 1b0a06f..acd2652 100644 --- a/types/select.d.ts +++ b/types/select.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Select extends Vue { +export declare class Select extends Vue { /** * 指定选中项目的 value 值,可以使用 v-model 双向绑定数据。 * 单选时只接受 String 或 Number,多选时只接受 Array @@ -139,7 +139,7 @@ export declare interface Select extends Vue { }; } -export declare interface Option extends Vue { +export declare class Option extends Vue { /** * 选项值,默认根据此属性值进行筛选,必填 */ @@ -157,7 +157,7 @@ export declare interface Option extends Vue { disabled?: boolean; } -export declare interface OptionGroup extends Vue { +export declare class OptionGroup extends Vue { /** * 分组的组名 * @default 空 diff --git a/types/sider.d.ts b/types/sider.d.ts index 812077c..36ac403 100644 --- a/types/sider.d.ts +++ b/types/sider.d.ts @@ -4,5 +4,5 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Sider extends 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 b0de7a7..41d4f2f 100644 --- a/types/slider.d.ts +++ b/types/slider.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Slider extends Vue { +export declare class Slider extends Vue { /** * 滑块选定的值,可以使用 v-model 双向绑定数据。普通模式下,数据格式为数字, * 在双滑块模式下,数据格式为长度是2的数组,且每项都为数字, diff --git a/types/spin.d.ts b/types/spin.d.ts index c4c32bd..9015c9d 100644 --- a/types/spin.d.ts +++ b/types/spin.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Spin extends Vue { +export declare class Spin extends Vue { /** * Spin尺寸,可选值为large和small或者不设置 */ diff --git a/types/split.d.ts b/types/split.d.ts index 74ea412..732f24f 100644 --- a/types/split.d.ts +++ b/types/split.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Split extends Vue { +export declare class Split extends Vue { /** * 面板位置,可以是 0~1 代表百分比,或具体数值的像素,可用 v-model 双向绑定 * @default 0.5 diff --git a/types/steps.d.ts b/types/steps.d.ts index c41d898..11a72a1 100644 --- a/types/steps.d.ts +++ b/types/steps.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Steps extends Vue { +export declare class Steps extends Vue { /** * 当前步骤,从 0 开始计数 * @default 0 @@ -26,7 +26,7 @@ export declare interface Steps extends Vue { direction?: 'horizontal' | 'vertical'; } -export declare interface StepsStep 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 4e86ad1..a76d126 100644 --- a/types/switch.d.ts +++ b/types/switch.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Switch extends Vue { +export declare class Switch extends Vue { /** * 指定当前是否选中,可以使用 v-model 双向绑定数据 * @default false diff --git a/types/table.d.ts b/types/table.d.ts index 80a05ce..06fcd2a 100644 --- a/types/table.d.ts +++ b/types/table.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode, CreateElement } from "vue"; -export declare interface Table extends Vue { +export declare class Table extends Vue { /** * 显示的结构化数据,其中,字段 cellClassName 用于设置任意单元格的样式名称, * 因此数据不能使用该字段,详见示例特定样式。 @@ -210,7 +210,7 @@ export declare interface Table extends Vue { }; } -export declare interface TableColumn { +export declare class TableColumn { /** * 列类型,可选值为 index、selection、expand、html */ @@ -332,7 +332,7 @@ export declare interface TableColumn { children?: object[]; } -export declare interface TableRenderCreateElementData { +export declare class TableRenderCreateElementData { /** * 和`v-bind:class`一样的 API */ @@ -382,7 +382,7 @@ export declare interface TableRenderCreateElementData { ref?: string; } -export declare interface TableColumnRenderParams { +export declare class TableColumnRenderParams { /** * 当前行数据 */ @@ -397,7 +397,7 @@ export declare interface TableColumnRenderParams { index?: number; } -export declare interface TableColumnRenderHeadParams { +export declare class TableColumnRenderHeadParams { /** * 当前列数据 */ @@ -408,7 +408,7 @@ export declare interface TableColumnRenderHeadParams { index?: number; } -export declare interface TableExportCsvParams { +export declare class TableExportCsvParams { /** * 文件名,默认为 table.csv */ @@ -432,7 +432,7 @@ export declare interface TableExportCsvParams { /** * 添加此函数后,不会下载,而是返回数据 */ - callback?: (data?: any) => void; + callback?: (data?: string) => void; /** * 数据分隔符,默认是逗号(,) * @default , diff --git a/types/tabs.d.ts b/types/tabs.d.ts index 3096da5..11f84c5 100644 --- a/types/tabs.d.ts +++ b/types/tabs.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Tabs extends Vue { +export declare class Tabs extends Vue { /** * 当前激活 tab 面板的 name,可以使用 v-model 双向绑定数据 * @default 默认为第一项的 name @@ -62,7 +62,7 @@ export declare interface Tabs extends Vue { }; } -export declare interface TabPane extends Vue { +export declare class TabPane extends Vue { /** * 用于标识当前面板,对应 value,默认为其索引值 */ diff --git a/types/tag.d.ts b/types/tag.d.ts index 93c5453..8a82ded 100644 --- a/types/tag.d.ts +++ b/types/tag.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Tag extends Vue { +export declare class Tag extends Vue { /** * 标签是否可以关闭 * @default false diff --git a/types/time-picker.d.ts b/types/time-picker.d.ts index 0833723..5966403 100644 --- a/types/time-picker.d.ts +++ b/types/time-picker.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface TimePicker extends Vue { +export declare class TimePicker extends Vue { /** * 显示类型,可选值为 time、timerange * @default time diff --git a/types/time.d.ts b/types/time.d.ts index 5a0ae92..345d2d6 100644 --- a/types/time.d.ts +++ b/types/time.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue from 'vue'; -export declare interface Time extends Vue { +export declare class Time extends Vue { /** * 需要对比的时间,可以是时间戳或 Date 类型 */ diff --git a/types/timeline.d.ts b/types/timeline.d.ts index e015a4c..36d13f4 100644 --- a/types/timeline.d.ts +++ b/types/timeline.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Timeline extends Vue { +export declare class Timeline extends Vue { /** * 指定是否最后一个节点为幽灵节点 * @default false @@ -12,7 +12,7 @@ export declare interface Timeline extends Vue { pending?: boolean; } -export declare interface TimelineItem extends Vue { +export declare class TimelineItem extends Vue { /** * 圆圈颜色,可选值为blue、red、green,或自定义色值 * @default blue diff --git a/types/tooltip.d.ts b/types/tooltip.d.ts index 91c06b5..98f8ffa 100644 --- a/types/tooltip.d.ts +++ b/types/tooltip.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Tooltip extends Vue { +export declare class Tooltip extends Vue { /** * 显示的内容 * @default 空 diff --git a/types/transfer.d.ts b/types/transfer.d.ts index f3755a7..5a051be 100644 --- a/types/transfer.d.ts +++ b/types/transfer.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Transfer extends Vue { +export declare class Transfer extends Vue { /** * 数据源,其中的数据将会被渲染到左边一栏中,targetKeys 中指定的除外。 * @default [] diff --git a/types/tree.d.ts b/types/tree.d.ts index af4c41f..75b625e 100644 --- a/types/tree.d.ts +++ b/types/tree.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode, CreateElement } from "vue"; -export declare interface Tree extends Vue { +export declare class Tree extends Vue { /** * 可嵌套的节点属性的数组,生成 tree 的数据 */ @@ -77,7 +77,7 @@ export declare interface Tree extends Vue { getCheckedAndIndeterminateNodes(): any[]; } -export declare interface TreeChild extends Vue { +export declare class TreeChild extends Vue { /** * 标题 */ diff --git a/types/upload.d.ts b/types/upload.d.ts index cb672a4..397893d 100644 --- a/types/upload.d.ts +++ b/types/upload.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; -export declare interface Upload extends Vue { +export declare class Upload extends Vue { /** * 上传的地址,必填 */ -- libgit2 0.21.4