完成d.ts定义的优化

This commit is contained in:
yangd 2018-08-30 13:27:15 +08:00
parent 6da055f33f
commit 414730dde3
61 changed files with 353 additions and 382 deletions

View file

@ -4,6 +4,7 @@ const merge = require('webpack-merge');
const webpackBaseConfig = require('./webpack.base.config.js');
const CompressionPlugin = require('compression-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
process.env.NODE_ENV = 'production';
@ -43,6 +44,9 @@ module.exports = merge(webpackBaseConfig, {
test: /\.(js|css)$/,
threshold: 10240,
minRatio: 0.8
})
}),
new CopyWebpackPlugin([{
from: __dirname + '/../types'
}])
]
});

View file

@ -14,6 +14,7 @@
"framework"
],
"main": "dist/iview.js",
"typings": "types/index.d.ts",
"files": [
"dist",
"src"
@ -111,7 +112,8 @@
"vue-template-compiler": "^2.5.16",
"webpack": "^3.11.0",
"webpack-dev-server": "^2.11.1",
"webpack-merge": "^3.0.0"
"webpack-merge": "^3.0.0",
"copy-webpack-plugin": "^4.5.2"
},
"engines": {
"node": ">=8.9.1",

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Affix extends Vue {
export declare class Affix extends Vue {
/**
*
* @default 0

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Alert extends Vue {
export declare class Alert extends Vue {
/**
* infosuccesswarningerror
* @default info

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Anchor extends Vue {
export declare class Anchor extends Vue {
/**
*
* @default true
@ -48,7 +48,7 @@ export interface Anchor extends Vue {
$emit(eventName: 'on-change', []): this;
}
export interface AnchorLink extends Vue {
export declare class AnchorLink extends Vue {
/**
*
* @default

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface AutoComplete extends Vue {
export declare class AutoComplete extends Vue {
/**
* 使 v-model
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Avatar extends Vue {
export declare class Avatar extends Vue {
/**
* circlesquare
* @default circle

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface BackTop extends Vue {
export declare class BackTop extends Vue {
/**
* BackTop组件
* @default 400

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Badge extends Vue {
export declare class Badge extends Vue {
/**
* overflowCount时${overflowCount}+ 0
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Breadcrumb extends Vue {
export declare class Breadcrumb extends Vue {
/**
*
* @default /
@ -12,7 +12,7 @@ export interface Breadcrumb extends Vue {
separator?: string;
}
export interface BreadcrumbItem extends Vue {
export declare class BreadcrumbItem extends Vue {
/**
*
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Button extends Vue {
export declare class Button extends Vue {
/**
* defaultprimarydashedtextinfosuccesswarningerror或者不设置
* @default default
@ -68,7 +68,7 @@ export interface Button extends Vue {
target?: '_blank' | '_self' | '_parent' | '_top';
}
export interface ButtonGroup extends Vue {
export declare class ButtonGroup extends Vue {
/**
* largesmalldefault或者不设置
* @default default

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Card extends Vue {
export declare class Card extends Vue {
/**
* 使
* @default true

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Carousel extends Vue {
export declare class Carousel extends Vue {
/**
* 0 使 v-model
* @default 0

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Cascader extends Vue {
export declare class Cascader extends Vue {
/**
*
* @default []

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Cell extends Vue {
export declare class Cell extends Vue {
/**
*
*/
@ -72,7 +72,7 @@ export interface Cell extends Vue {
}
}
export interface CellGroup extends Vue {
export declare class CellGroup extends Vue {
/**
*
*

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Checkbox extends Vue {
export declare class Checkbox extends Vue {
/**
* 使使 v-model
* @default false
@ -44,7 +44,7 @@ export interface Checkbox extends Vue {
$emit(eventName: 'on-change', value: boolean): this;
}
export interface CheckboxGroup extends Vue {
export declare class CheckboxGroup extends Vue {
/**
* 使 v-model
* @default []

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Circle extends Vue {
export declare class Circle extends Vue {
/**
*
* @default 0

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Collapse extends Vue {
export declare class Collapse extends Vue {
/**
* name使 v-model
*/
@ -26,7 +26,7 @@ export interface Collapse extends Vue {
$emit(eventName: 'on-change', []): this;
}
export interface CollapsePanel extends Vue {
export declare class CollapsePanel extends Vue {
/**
* name Collapse的value对应
* @default index的值

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface ColorPicker extends Vue {
export declare class ColorPicker extends Vue {
/**
* 使 v-model
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface DatePicker extends Vue {
export declare class DatePicker extends Vue {
/**
* datedaterangedatetimedatetimerangeyearmonth'|'date
*/
@ -138,7 +138,7 @@ export interface DatePicker extends Vue {
};
}
export interface DatePickerOptions extends Vue {
export declare class DatePickerOptions extends Vue {
/**
*
* text

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Divider extends Vue {
export declare class Divider extends Vue {
/**
* horizontal vertical
* @default horizontal

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Dropdown extends Vue {
export declare class Dropdown extends Vue {
/**
* hoverclickcontextMenucustom使 custom visible 使
* @default hover
@ -56,7 +56,7 @@ export interface Dropdown extends Vue {
};
}
export interface DropdownItem extends Vue {
export declare class DropdownItem extends Vue {
/**
*
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Form extends Vue {
export declare class Form extends Vue {
/**
*
*/
@ -46,7 +46,7 @@ export interface Form extends Vue {
resetFields(): void;
}
export interface FormItem extends Vue {
export declare class FormItem extends Vue {
/**
* model
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface GridRow extends Vue {
export declare class GridRow extends Vue {
/**
* px
* @default 0
@ -28,7 +28,7 @@ export interface GridRow extends Vue {
'class-name'?: string;
}
export interface GridCol extends Vue {
export declare class GridCol extends Vue {
/**
* 0~24 0 相当于display:none
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Icon extends Vue {
export declare class Icon extends Vue {
/**
*
*/

10
types/index.d.ts vendored Normal file
View file

@ -0,0 +1,10 @@
// Type definitions for iview 3.0.1
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
import iView from "./iview";
export default iView;
export as namespace iView;
export * from "./iview.components";

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface InputNumber extends Vue {
export declare class InputNumber extends Vue {
/**
* Infinity
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Input extends Vue {
export declare class Input extends Vue {
/**
* textpasswordtextareaurlemaildate
* @default text

143
types/iview.components.d.ts vendored Normal file
View file

@ -0,0 +1,143 @@
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";
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 {}

6
types/iview.d.ts vendored Normal file
View file

@ -0,0 +1,6 @@
import { PluginFunction } from 'vue';
interface IView extends PluginFunction<any> {}
declare const iView: IView;
export default iView;

237
types/iview/index.d.ts vendored
View file

@ -1,237 +0,0 @@
// Type definitions for iview 3.0.0
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
import Vue, { VNode, PluginFunction } from "vue";
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";
declare namespace IView {
type IAffix = Affix;
type IAlert = Alert;
type IAnchor = Anchor;
type IAnchorLink = AnchorLink;
type IAutoComplete = AutoComplete;
type IAvatar = Avatar;
type IBackTop = BackTop;
type IBadge = Badge;
type IBreadcrumb = Breadcrumb;
type IBreadcrumbItem = BreadcrumbItem;
type IButton = Button;
type IButtonGroup = ButtonGroup;
type ICard = Card;
type ICarousel = Carousel;
type ICascader = Cascader;
type ICell = Cell;
type ICellGroup = CellGroup;
type ICheckbox = Checkbox;
type ICheckboxGroup = CheckboxGroup;
type ICircle = Circle;
type ICollapse = Collapse;
type ICollapsePanel = CollapsePanel;
type IColorPicker = ColorPicker;
type IDatePicker = DatePicker;
type IDatePickerOptions = DatePickerOptions;
type IDivider = Divider;
type IDropdown = Dropdown;
type IDropdownItem = DropdownItem;
type IForm = Form;
type IFormItem = FormItem;
type IGridCol = GridCol;
type IGridRow = GridRow;
type IIcon = Icon;
type IInput = Input;
type IInputNumber = InputNumber;
type ILayout = Layout;
type ILoadingBarInstance = LoadingBarInstance;
type ILoadingBarConfig = LoadingBarConfig;
type IMenu = Menu;
type IMenuGroup = MenuGroup;
type IMenuItem = MenuItem;
type IMessageConfig = MessageConfig;
type IMessageInstance = MessageInstance;
type IModal = Modal;
type IModalConfig = ModalConfig;
type IModalInstance = ModalInstance;
type INoticeConfig = NoticeConfig;
type INoticeGlobalConfig = NoticeGlobalConfig;
type INoticeInstance = NoticeInstance;
type IPage = Page;
type IPoptip = Poptip;
type IProgress = Progress;
type IRadio = Radio;
type IRadioGroup = RadioGroup;
type IRate = Rate;
type IScroll = Scroll;
type ISelect = Select;
type ISelectOption = SelectOption;
type ISelectOptionGroup = SelectOptionGroup;
type ISpin = Spin;
type ISplit = Split;
type IStep = Step;
type ISteps = Steps;
type ISubmenu = Submenu;
type ISwitch = Switch;
type ITable = Table;
type ITableColumn = TableColumn;
type ITableColumnRenderParams = TableColumnRenderParams;
type ITableExportCsvParams = TableExportCsvParams;
type ITableRenderCreateElementData = TableRenderCreateElementData;
type ITableRenderCreateElementResult = TableRenderCreateElementResult;
type ITabPane = TabPane;
type ITabs = Tabs;
type ITag = Tag;
type ITime = Time;
type ITimeline = Timeline;
type ITimelineItem = TimelineItem;
type ITimePicker = TimePicker;
type ITooltip = Tooltip;
type ITransfer = Transfer;
type ITree = Tree;
type ITreeChild = TreeChild;
type IUpload = Upload;
}
declare interface IView extends PluginFunction<any> {
readonly IAffix: Affix;
readonly IAlert: Alert;
readonly IAnchor: Anchor;
readonly IAnchorLink: AnchorLink;
readonly IAutoComplete: AutoComplete;
readonly IAvatar: Avatar;
readonly IBackTop: BackTop;
readonly IBadge: Badge;
readonly IBreadcrumb: Breadcrumb;
readonly IBreadcrumbItem: BreadcrumbItem;
readonly IButton: Button;
readonly IButtonGroup: ButtonGroup;
readonly ICard: Card;
readonly ICarousel: Carousel;
readonly ICascader: Cascader;
readonly ICell: Cell;
readonly ICellGroup: CellGroup;
readonly ICheckbox: Checkbox;
readonly ICheckboxGroup: CheckboxGroup;
readonly ICircle: Circle;
readonly ICollapse: Collapse;
readonly ICollapsePanel: CollapsePanel;
readonly IColorPicker: ColorPicker;
readonly IDatePicker: DatePicker;
readonly IDatePickerOptions: DatePickerOptions;
readonly IDivider: Divider;
readonly IDropdown: Dropdown;
readonly IDropdownItem: DropdownItem;
readonly IForm: Form;
readonly IFormItem: FormItem;
readonly IGridCol: GridCol;
readonly IGridRow: GridRow;
readonly IIcon: Icon;
readonly IInput: Input;
readonly IInputNumber: InputNumber;
readonly ILayout: Layout;
readonly ILoadingBarInstance: LoadingBarInstance;
readonly ILoadingBarConfig: LoadingBarConfig;
readonly IMenu: Menu;
readonly IMenuGroup: MenuGroup;
readonly IMenuItem: MenuItem;
readonly IMessageConfig: MessageConfig;
readonly IMessageInstance: MessageInstance;
readonly IModal: Modal;
readonly IModalConfig: ModalConfig;
readonly IModalInstance: ModalInstance;
readonly INoticeConfig: NoticeConfig;
readonly INoticeGlobalConfig: NoticeGlobalConfig;
readonly INoticeInstance: NoticeInstance;
readonly IPage: Page;
readonly IPoptip: Poptip;
readonly IProgress: Progress;
readonly IRadio: Radio;
readonly IRadioGroup: RadioGroup;
readonly IRate: Rate;
readonly IScroll: Scroll;
readonly ISelect: Select;
readonly ISelectOption: SelectOption;
readonly ISelectOptionGroup: SelectOptionGroup;
readonly ISpin: Spin;
readonly ISplit: Split;
readonly IStep: Step;
readonly ISteps: Steps;
readonly ISubmenu: Submenu;
readonly ISwitch: Switch;
readonly ITable: Table;
readonly ITableColumn: TableColumn;
readonly ITableColumnRenderParams: TableColumnRenderParams;
readonly ITableExportCsvParams: TableExportCsvParams;
readonly ITableRenderCreateElementData: TableRenderCreateElementData;
readonly ITableRenderCreateElementResult: TableRenderCreateElementResult;
readonly ITabPane: TabPane;
readonly ITabs: Tabs;
readonly ITag: Tag;
readonly ITime: Time;
readonly ITimeline: Timeline;
readonly ITimelineItem: TimelineItem;
readonly ITimePicker: TimePicker;
readonly ITooltip: Tooltip;
readonly ITransfer: Transfer;
readonly ITree: Tree;
readonly ITreeChild: TreeChild;
readonly IUpload: Upload;
}
export default IView;
declare module 'iview/types/iview' {
const iView: IView;
export default iView;
}

View file

@ -1,4 +0,0 @@
declare module 'iview' {
const iView: any;
export default iView;
}

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Layout extends Vue {
export declare class Layout extends Vue {
/**
* xs,sm,md,lg,xl或xxl
* {

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface LoadingBarInstance {
export declare class LoadingBarInstance {
/**
* 0
*/
@ -33,7 +33,7 @@ export interface LoadingBarInstance {
destroy(): void;
}
export interface LoadingBarConfig {
export declare class LoadingBarConfig {
/**
* iView
* @default primary

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Menu extends Vue {
export declare class Menu extends Vue {
/**
* horizontal vertical
* @default vertical
@ -52,7 +52,7 @@ export interface Menu extends Vue {
updateActiveName(): void;
}
export interface MenuItem extends Vue {
export declare class MenuItem extends Vue {
/**
*
*/
@ -73,7 +73,7 @@ export interface MenuItem extends Vue {
target?: '_blank' | '_self' | '_parent' | '_top';
}
export interface Submenu extends Vue {
export declare class Submenu extends Vue {
/**
*
*/
@ -93,7 +93,7 @@ export interface Submenu extends Vue {
};
}
export interface MenuGroup extends Vue {
export declare class MenuGroup extends Vue {
/**
*
* @default

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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, CreateElement } from "vue";
export interface MessageInstance {
export declare class MessageInstance {
/**
*
* @param config MessageConfig为相关配置,string为待显示的内容
@ -41,7 +41,7 @@ export interface MessageInstance {
destroy(): void;
}
export interface MessageConfig {
export declare class MessageConfig {
/**
*
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Modal {
export declare class Modal {
/**
* 使 v-model
* @default false
@ -123,7 +123,7 @@ export interface Modal {
};
}
export interface ModalInstance {
export declare class ModalInstance {
/**
*
* @param config ModalConfig为相关配置,string为待显示的内容
@ -155,7 +155,7 @@ export interface ModalInstance {
remove(): void;
}
export interface ModalConfig {
export declare class ModalConfig {
/**
* Element选择器字符串
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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, CreateElement } from "vue";
export interface NoticeInstance {
export declare class NoticeInstance {
/**
*
* @param config NoticeConfig为相关配置,string为待显示的内容
@ -44,7 +44,7 @@ export interface NoticeInstance {
destroy(): void;
}
export interface NoticeConfig {
export declare class NoticeConfig {
/**
*
*/
@ -71,7 +71,7 @@ export interface NoticeConfig {
onClose?: Function;
}
export interface NoticeGlobalConfig {
export declare class NoticeGlobalConfig {
/**
* 24
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Page extends Vue {
export declare class Page extends Vue {
/**
* .sync
* @default 1

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Poptip extends Vue {
export declare class Poptip extends Vue {
/**
* hoverclickfocus,
* confirm click

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Progress extends Vue {
export declare class Progress extends Vue {
/**
*
* @default 0

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Radio extends Vue {
export declare class Radio extends Vue {
/**
* 使使 v-model
* @default false
@ -39,7 +39,7 @@ export interface Radio extends Vue {
$emit(eventName: 'on-change', arg: string | number | boolean): this;
}
export interface RadioGroup extends Vue {
export declare class RadioGroup extends Vue {
/**
* 使 v-model
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Rate extends Vue {
export declare class Rate extends Vue {
/**
* star总数
* @default 5

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Scroll extends Vue {
export declare class Scroll extends Vue {
/**
*
* @default 300

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Select extends Vue {
export declare class Select extends Vue {
/**
* value 使 v-model
* String Number Array
@ -114,7 +114,7 @@ export interface Select extends Vue {
clearSingleSelect(): void;
}
export interface SelectOption extends Vue {
export declare class SelectOption extends Vue {
/**
*
*/
@ -132,7 +132,7 @@ export interface SelectOption extends Vue {
disabled?: boolean;
}
export interface SelectOptionGroup extends Vue {
export declare class SelectOptionGroup extends Vue {
/**
*
* @default

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Slider extends Vue {
export declare class Slider extends Vue {
/**
* 使 v-model
* 2,

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Spin extends Vue {
export declare class Spin extends Vue {
/**
* Spin尺寸large和small或者不设置
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Split extends Vue {
export declare class Split extends Vue {
/**
* 0~1 v-model
* @default 0.5

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Steps extends Vue {
export declare class Steps extends Vue {
/**
* 0
* @default 0
@ -26,7 +26,7 @@ export interface Steps extends Vue {
direction?: 'horizontal' | 'vertical';
}
export interface Step extends Vue {
export declare class Step extends Vue {
/**
* waitprocessfinisherror
* @default process

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Switch extends Vue {
export declare class Switch extends Vue {
/**
* 使 v-model
* @default false

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Table extends Vue {
export declare class Table extends Vue {
/**
* cellClassName
* 使
@ -163,7 +163,7 @@ export interface Table extends Vue {
};
}
export interface TableColumn {
export declare class TableColumn {
/**
* indexselectionexpandhtml
*/
@ -279,7 +279,7 @@ export interface TableColumn {
children?: object[];
}
export interface TableRenderCreateElementData {
export declare class TableRenderCreateElementData {
/**
* `v-bind:class` API
*/
@ -329,7 +329,7 @@ export interface TableRenderCreateElementData {
ref?: string
}
export interface TableColumnRenderParams {
export declare class TableColumnRenderParams {
/**
*
*/
@ -344,7 +344,7 @@ export interface TableColumnRenderParams {
index?: number;
}
export interface TableRenderCreateElementResult {
export declare class TableRenderCreateElementResult {
child?: object;
children?: Array<any>;
componentInstance?: object;
@ -366,7 +366,7 @@ export interface TableRenderCreateElementResult {
text?: object;
}
export interface TableColumnRenderHeadParams {
export declare class TableColumnRenderHeadParams {
/**
*
*/
@ -377,7 +377,7 @@ export interface TableColumnRenderHeadParams {
index?: number;
}
export interface TableExportCsvParams {
export declare class TableExportCsvParams {
/**
* table.csv
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Tabs extends Vue {
export declare class Tabs extends Vue {
/**
* tab name使 v-model
* @default name
@ -54,7 +54,7 @@ export interface Tabs extends Vue {
};
}
export interface TabPane extends Vue {
export declare class TabPane extends Vue {
/**
* value
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Tag extends Vue {
export declare class Tag extends Vue {
/**
*
* @default false

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface TimePicker extends Vue {
export declare class TimePicker extends Vue {
/**
* timetimerange
* @default time

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Time extends Vue {
export declare class Time extends Vue {
/**
* Date
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Timeline extends Vue {
export declare class Timeline extends Vue {
/**
*
* @default false
@ -12,7 +12,7 @@ export interface Timeline extends Vue {
pending?: boolean;
}
export interface TimelineItem extends Vue {
export declare class TimelineItem extends Vue {
/**
* blueredgreen
* @default blue

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Tooltip extends Vue {
export declare class Tooltip extends Vue {
/**
*
* @default

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Transfer extends Vue {
export declare class Transfer extends Vue {
/**
* targetKeys
* @default []

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Tree extends Vue {
export declare class Tree extends Vue {
/**
* tree
*/
@ -62,7 +62,7 @@ export interface Tree extends Vue {
getSelectedNodes(): void;
}
export interface TreeChild extends Vue {
export declare class TreeChild extends Vue {
/**
*
*/

View file

@ -1,10 +1,10 @@
// Type definitions for iview 3.0.0
// 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 interface Upload extends Vue {
export declare class Upload extends Vue {
/**
*
*/

View file

@ -314,7 +314,7 @@ arraybuffer.slice@~0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675"
arrify@^1.0.0:
arrify@^1.0.0, arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
@ -1843,6 +1843,19 @@ copy-descriptor@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
copy-webpack-plugin@^4.5.2:
version "4.5.2"
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2.tgz#d53444a8fea2912d806e78937390ddd7e632ee5c"
dependencies:
cacache "^10.0.4"
find-cache-dir "^1.0.0"
globby "^7.1.1"
is-glob "^4.0.0"
loader-utils "^1.1.0"
minimatch "^3.0.4"
p-limit "^1.0.0"
serialize-javascript "^1.4.0"
core-js@^1.0.0:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
@ -2251,6 +2264,13 @@ diffie-hellman@^5.0.0:
miller-rabin "^4.0.0"
randombytes "^2.0.0"
dir-glob@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034"
dependencies:
arrify "^1.0.1"
path-type "^3.0.0"
dns-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
@ -3439,6 +3459,17 @@ globby@^6.1.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
globby@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
dependencies:
array-union "^1.0.1"
dir-glob "^2.0.0"
glob "^7.1.2"
ignore "^3.3.5"
pify "^3.0.0"
slash "^1.0.0"
globule@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
@ -3961,6 +3992,10 @@ ignore@^3.2.0:
version "3.3.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b"
ignore@^3.3.5:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
image-size@~0.5.0:
version "0.5.5"
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
@ -5725,6 +5760,12 @@ p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
p-limit@^1.0.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
dependencies:
p-try "^1.0.0"
p-limit@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c"
@ -5930,6 +5971,12 @@ path-type@^2.0.0:
dependencies:
pify "^2.0.0"
path-type@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
dependencies:
pify "^3.0.0"
pathval@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"