diff --git a/build/bin/new.js b/build/bin/new.js index b0186351a..cec1e8e70 100644 --- a/build/bin/new.js +++ b/build/bin/new.js @@ -92,8 +92,10 @@ describe('${ComponentName}', () => { content: `import { ElementUIComponent } from './component' /** ${ComponentName} Component */ -export declare class El${ComponentName} extends ElementUIComponent { -}` +interface I${ComponentName} extends ElementUIComponent { +} + +export const El${ComponentName}:I${ComponentName}` } ] diff --git a/types/backtop.d.ts b/types/backtop.d.ts index a171c76e1..09f790481 100644 --- a/types/backtop.d.ts +++ b/types/backtop.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElBacktop:IBacktop /** Backtop Component */ -export declare class ElBacktop extends ElementUIComponent { +interface IBacktop extends ElementUIComponent { /** Backtop target */ target: string diff --git a/types/calendar.d.ts b/types/calendar.d.ts index d487867ef..7e91021ea 100644 --- a/types/calendar.d.ts +++ b/types/calendar.d.ts @@ -2,8 +2,9 @@ import { ElementUIComponent } from './component' export type DateType = Date | String | Number +export const ElCalendar:ICalendar /** Calendar Component */ -export declare class ElCalendar extends ElementUIComponent { +interface ICalendar extends ElementUIComponent { /** Binding value */ value: DateType diff --git a/types/cascader-panel.d.ts b/types/cascader-panel.d.ts index 5c2049c29..8d73d4536 100644 --- a/types/cascader-panel.d.ts +++ b/types/cascader-panel.d.ts @@ -51,8 +51,9 @@ export interface CascaderPanelSlots { [key: string]: VNode[] } +export const ElCascaderPanel:ICascaderPanel /** CascaderPanel Component */ -export declare class ElCascaderPanel extends ElementUIComponent { +interface ICascaderPanel extends ElementUIComponent { /** Selected value */ value: V | V[] diff --git a/types/collapse-item.d.ts b/types/collapse-item.d.ts index f780dd7f0..b4fa70025 100644 --- a/types/collapse-item.d.ts +++ b/types/collapse-item.d.ts @@ -12,7 +12,7 @@ export interface CollapseItemSlots { } /** Collapse Item Component */ -export declare class ElCollapseItem extends ElementUIComponent { +interface ICollapseItem extends ElementUIComponent { /** Unique identification of the panel */ name: string | number @@ -24,3 +24,5 @@ export declare class ElCollapseItem extends ElementUIComponent { /** Disable the collapse item */ disabled: boolean } + +export const ElCollapseItem:ICollapseItem diff --git a/types/collapse.d.ts b/types/collapse.d.ts index 78af33726..5f6714700 100644 --- a/types/collapse.d.ts +++ b/types/collapse.d.ts @@ -1,10 +1,12 @@ import { ElementUIComponent } from './component' /** Use Collapse to store contents. */ -export declare class ElCollapse extends ElementUIComponent { +interface ICollapse extends ElementUIComponent{ /** Whether to activate accordion mode */ accordion: boolean /** Currently active panel */ value: string | number | string[] | number[] } + +export const ElCollapse:ICollapse \ No newline at end of file diff --git a/types/color-picker.d.ts b/types/color-picker.d.ts index a3bc53c14..65c88174e 100644 --- a/types/color-picker.d.ts +++ b/types/color-picker.d.ts @@ -3,7 +3,7 @@ import { ElementUIComponent, ElementUIComponentSize } from './component' export type ColorFormat = 'hsl' | 'hsv' | 'hex' | 'rgb' /** ColorPicker Component */ -export declare class ElColorPicker extends ElementUIComponent { +interface IColorPicker extends ElementUIComponent { /** Whether to display the alpha slider */ showAlpha: boolean @@ -19,3 +19,5 @@ export declare class ElColorPicker extends ElementUIComponent { /** Custom class name for ColorPicker's dropdown */ colorFormat: ColorFormat } + +export const ElColorPicker:IColorPicker \ No newline at end of file diff --git a/types/date-picker.d.ts b/types/date-picker.d.ts index b4e9e6f40..f6ae4e2ca 100644 --- a/types/date-picker.d.ts +++ b/types/date-picker.d.ts @@ -62,7 +62,7 @@ export interface DatePickerOptions { } /** DatePicker Component */ -export declare class ElDatePicker extends ElementUIComponent { +interface IDatePicker extends ElementUIComponent { /** The value of the date picker */ value: Date | string | Date[] | string[] @@ -122,3 +122,5 @@ export declare class ElDatePicker extends ElementUIComponent { */ focus (): void } + +export const ElDatePicker:IDatePicker \ No newline at end of file diff --git a/types/dialog.d.ts b/types/dialog.d.ts index f4e218d2e..8f060ef22 100644 --- a/types/dialog.d.ts +++ b/types/dialog.d.ts @@ -15,7 +15,7 @@ export interface DialogSlots { } /** Informs users while preserving the current page state */ -export declare class ElDialog extends ElementUIComponent { +interface IDialog extends ElementUIComponent { /** Title of Dialog */ title: string @@ -60,3 +60,5 @@ export declare class ElDialog extends ElementUIComponent { $slots: DialogSlots } + +export const ElDialog:IDialog \ No newline at end of file diff --git a/types/divider.d.ts b/types/divider.d.ts index c7d969cc2..cc63ae222 100644 --- a/types/divider.d.ts +++ b/types/divider.d.ts @@ -2,8 +2,9 @@ import { ElementUIComponent } from './component' export type ContentPosition = 'left' | 'center' | 'right' +export const ElDivider:IDivider /** Divider Component */ -export declare class ElDivider extends ElementUIComponent { +interface IDivider extends ElementUIComponent { /** enable vertical divider */ vertical: boolean diff --git a/types/drawer.d.ts b/types/drawer.d.ts index 8d2d7f3a5..7911d145c 100644 --- a/types/drawer.d.ts +++ b/types/drawer.d.ts @@ -18,8 +18,10 @@ interface DrawerSlots { [key: string]: VNode[] } + +export const ElDrawer:IDrawer /** Drawer Component */ -export declare class ElDrawer extends ElementUIComponent { +interface IDrawer extends ElementUIComponent { /* Equivalent to `Dialog`'s append to body attribute, when applying nested drawer, make sure this one is set to true */ appendToBody: boolean diff --git a/types/dropdown-item.d.ts b/types/dropdown-item.d.ts index 767142414..07cb48503 100644 --- a/types/dropdown-item.d.ts +++ b/types/dropdown-item.d.ts @@ -1,7 +1,7 @@ import { ElementUIComponent } from './component' /** Toggleable menu for displaying lists of links and actions. */ -export declare class ElDropdownItem extends ElementUIComponent { +interface IDropdownItem extends ElementUIComponent { /** A command to be dispatched to Dropdown's command callback */ command: string | number | object @@ -14,3 +14,5 @@ export declare class ElDropdownItem extends ElementUIComponent { /** Icon to show on left side of text */ icon: string } + +export const ElDropdownItem:IDropdownItem \ No newline at end of file diff --git a/types/dropdown-menu.d.ts b/types/dropdown-menu.d.ts index 74dc4b8b8..48e97ed6d 100644 --- a/types/dropdown-menu.d.ts +++ b/types/dropdown-menu.d.ts @@ -1,4 +1,6 @@ import { ElementUIComponent } from './component' /** Dropdown Menu Component */ -export declare class ElDropdownMenu extends ElementUIComponent {} +interface IDropdownMenu extends ElementUIComponent {} + +export const ElDropdownMenu:IDropdownMenu \ No newline at end of file diff --git a/types/dropdown.d.ts b/types/dropdown.d.ts index 53df211c8..4879eeb1b 100644 --- a/types/dropdown.d.ts +++ b/types/dropdown.d.ts @@ -5,7 +5,7 @@ export type DropdownMenuAlignment = 'top' | 'top-start' | 'top-end' | 'bottom' | export type DropdownMenuTrigger = 'hover' | 'click' /** Toggleable menu for displaying lists of links and actions */ -export declare class ElDropdown extends ElementUIComponent { +interface IDropdown extends ElementUIComponent { /** Menu button type. only works when split-button is true */ type: ButtonType @@ -33,3 +33,5 @@ export declare class ElDropdown extends ElementUIComponent { /** Dropdown tabindex */ tabindex: number } + +export const ElDropdown:IDropdown \ No newline at end of file diff --git a/types/element3.d.ts b/types/element3.d.ts index f5740d3e4..779085217 100644 --- a/types/element3.d.ts +++ b/types/element3.d.ts @@ -46,7 +46,6 @@ export { useLoading } from './loading' export { useMsgbox } from './message-box' export { ElSteps } from './steps' export { ElUpload } from './upload' - import { ElCollapse } from './collapse' import { ElCollapseItem } from './collapse-item' import { ElColorPicker } from './color-picker' @@ -57,6 +56,7 @@ import { ElDropdownItem } from './dropdown-item' import { ElDropdownMenu } from './dropdown-menu' import { ElForm } from './form' import { ElFormItem } from './form-item' + import { ElInput } from './input' import { ElInputNumber } from './input-number' import { ElLoading } from './loading' diff --git a/types/form-item.d.ts b/types/form-item.d.ts index fdbd68e72..4d6df7721 100644 --- a/types/form-item.d.ts +++ b/types/form-item.d.ts @@ -1,7 +1,7 @@ import { ElementUIComponent, ElementUIComponentSize } from './component' /** FormItem Component */ -export declare class ElFormItem extends ElementUIComponent { +interface IFormItem extends ElementUIComponent { /** A key of `model` of the enclosing `el-form` component */ prop: string @@ -35,3 +35,5 @@ export declare class ElFormItem extends ElementUIComponent { /** Remove validation status of the field */ clearValidate (): void } + +export const ElFormItem:IFormItem diff --git a/types/form.d.ts b/types/form.d.ts index 4b2b05a9a..9f64c5e89 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -22,7 +22,7 @@ export interface ValidateFieldCallback { } /** Form Component */ -export declare class ElForm extends ElementUIComponent { +interface IForm extends ElementUIComponent { /** Data of form component */ model: object @@ -80,3 +80,5 @@ export declare class ElForm extends ElementUIComponent { /** clear validation message for certain fields */ clearValidate (props?: string | string[]): void } + +export const ElForm:IForm \ No newline at end of file diff --git a/types/image.d.ts b/types/image.d.ts index 82b18dce9..a176b3e54 100644 --- a/types/image.d.ts +++ b/types/image.d.ts @@ -13,8 +13,9 @@ export interface ImageSlots { [key: string]: VNode[] } +export const ElImage:IImage /** Image Component */ -export declare class ElImage extends ElementUIComponent { +interface IImage extends ElementUIComponent { /** Image source */ src: string diff --git a/types/menu-item-group.d.ts b/types/menu-item-group.d.ts index cbdaa1ac0..ac755ebeb 100644 --- a/types/menu-item-group.d.ts +++ b/types/menu-item-group.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElMenuItemGroup:IMenuItemGroup /** Menu Item Group Component */ -export declare class ElMenuItemGroup extends ElementUIComponent { +interface IMenuItemGroup extends ElementUIComponent { /** Group title */ title: string } diff --git a/types/menu-item.d.ts b/types/menu-item.d.ts index 30d3db573..4514790be 100644 --- a/types/menu-item.d.ts +++ b/types/menu-item.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElMenuItem:IMenuItem /** Menu Item Component */ -export declare class ElMenuItem extends ElementUIComponent { +interface IMenuItem extends ElementUIComponent { /** Unique identification */ index: string diff --git a/types/option-group.d.ts b/types/option-group.d.ts index 153096565..321e83fd4 100644 --- a/types/option-group.d.ts +++ b/types/option-group.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElOptionGroup:IOptionGroup /** Dropdown Select Option Group Component */ -export declare class ElOptionGroup extends ElementUIComponent { +interface IOptionGroup extends ElementUIComponent { /** Name of the group */ label: string diff --git a/types/option.d.ts b/types/option.d.ts index d949a54cb..c5a2db75d 100644 --- a/types/option.d.ts +++ b/types/option.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElOption:IOption /** Dropdown Select Option Component */ -export declare class ElOption extends ElementUIComponent { +interface IOption extends ElementUIComponent { /** Value of option */ value: any diff --git a/types/page-header.d.ts b/types/page-header.d.ts index 2831983a8..02a86eff5 100644 --- a/types/page-header.d.ts +++ b/types/page-header.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElPageHeader:IPageHeader /** PageHeader Component */ -export declare class ElPageHeader extends ElementUIComponent { +interface IPageHeader extends ElementUIComponent { /** title */ title: String diff --git a/types/popconfirm.d.ts b/types/popconfirm.d.ts index b3bee53a3..9abcaf0d7 100644 --- a/types/popconfirm.d.ts +++ b/types/popconfirm.d.ts @@ -1,8 +1,9 @@ import { ElementUIComponent } from './component' import { ElPopover } from './popover' +export const ElPopconfirm:IPopconfirm /** Popconfirm Component */ -export declare class ElPopconfirm extends ElPopover { +interface IPopconfirm extends ElPopover { /** Popconfirm title */ title: string diff --git a/types/popover.d.ts b/types/popover.d.ts index 5ad481280..26c957ed2 100644 --- a/types/popover.d.ts +++ b/types/popover.d.ts @@ -20,8 +20,9 @@ export interface ElPopoverDirective extends VNodeDirective { arg: string } +export const ElPopover:IPopover /** Popover Component */ -export declare class ElPopover extends ElementUIComponent { +interface IPopover extends ElementUIComponent { /** How the popover is triggered */ trigger: PopoverTrigger diff --git a/types/step.d.ts b/types/step.d.ts index 68ed2b33e..84c36f6e4 100644 --- a/types/step.d.ts +++ b/types/step.d.ts @@ -16,8 +16,9 @@ export interface StepRenderSlots { [key: string]: VNode[] } +export const ElStep:IStep /** Step Component */ -export declare class ElStep extends ElementUIComponent { +interface IStep extends ElementUIComponent { /** Step title */ title: string diff --git a/types/submenu.d.ts b/types/submenu.d.ts index 559445064..59f272349 100644 --- a/types/submenu.d.ts +++ b/types/submenu.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElSubmenu:ISubmenu /** Submenu Component */ -export declare class ElSubmenu extends ElementUIComponent { +interface ISubmenu extends ElementUIComponent { /** Unique identification */ index: string | null diff --git a/types/tab-pane.d.ts b/types/tab-pane.d.ts index b4f69990f..698dd97c9 100644 --- a/types/tab-pane.d.ts +++ b/types/tab-pane.d.ts @@ -1,7 +1,8 @@ import { ElementUIComponent } from './component' +export const ElTabPane:ITabPane /** Tab Pane Component */ -export declare class ElTabPane extends ElementUIComponent { +interface ITabPane extends ElementUIComponent { /** Title of the tab */ label: string diff --git a/types/table-column.d.ts b/types/table-column.d.ts index 34e1d3034..6cc4da15b 100644 --- a/types/table-column.d.ts +++ b/types/table-column.d.ts @@ -38,8 +38,9 @@ export interface TableColumnFilter { value: any } +export const ElTableColumn:ITableColumn /** TableColumn Component */ -export declare class ElTableColumn extends ElementUIComponent { +interface ITableColumn extends ElementUIComponent { /** Type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon. */ type: TableColumnType diff --git a/types/table.d.ts b/types/table.d.ts index da5bb3806..9b87e8aa3 100644 --- a/types/table.d.ts +++ b/types/table.d.ts @@ -37,8 +37,9 @@ export interface treeNode { loaded: boolean } +export const ElTable:ITable /** Table Component */ -export declare class ElTable extends ElementUIComponent { +interface ITable extends ElementUIComponent { /** Table data */ data: object[] diff --git a/types/time-picker.d.ts b/types/time-picker.d.ts index 40114f489..26b633894 100644 --- a/types/time-picker.d.ts +++ b/types/time-picker.d.ts @@ -12,8 +12,9 @@ export interface TimePickerOptions { format?: string } +export const ElTimePicker:ITimePicker /** TimePicker Component */ -export declare class ElTimePicker extends ElementUIComponent { +interface ITimePicker extends ElementUIComponent { /** Whether DatePicker is read only */ readonly: boolean diff --git a/types/time-select.d.ts b/types/time-select.d.ts index a784f8edb..05f5ed08b 100644 --- a/types/time-select.d.ts +++ b/types/time-select.d.ts @@ -17,8 +17,9 @@ export interface TimeSelectOptions { maxTime?: string } +export const ElTimeSelect:ITimeSelect /** TimeSelect Component */ -export declare class ElTimeSelect extends ElementUIComponent { +interface ITimeSelect extends ElementUIComponent { /** Whether DatePicker is read only */ readonly: boolean diff --git a/types/timeline-item.d.ts b/types/timeline-item.d.ts index 647d5550a..3e224d938 100644 --- a/types/timeline-item.d.ts +++ b/types/timeline-item.d.ts @@ -4,8 +4,9 @@ export type TimelineItemPlacement = 'top' | 'bottom' export type TimelineItemType = 'primary' | 'success' | 'warning' | 'danger' | 'info' export type TimelineItemSize = 'normal' | 'large' +export const ElTimelineItem:ITimelineItem /** TimelineItem Component */ -export declare class ElTimelineItem extends ElementUIComponent { +interface ITimelineItem extends ElementUIComponent { timestamp: string hideTimestamp: boolean diff --git a/types/timeline.d.ts b/types/timeline.d.ts index 20e033d05..a6afab854 100644 --- a/types/timeline.d.ts +++ b/types/timeline.d.ts @@ -1,6 +1,7 @@ import { ElementUIComponent } from './component' +export const ElTimeline:ITimeline /** Timeline Component */ -export declare class ElTimeline extends ElementUIComponent { +interface ITimeline extends ElementUIComponent { reverse: boolean } diff --git a/types/tooltip.d.ts b/types/tooltip.d.ts index b0fe4b6e1..3336f6986 100644 --- a/types/tooltip.d.ts +++ b/types/tooltip.d.ts @@ -3,8 +3,9 @@ import { PopoverPlacement } from './popover' export type TooltipEffect = 'dark' | 'light' +export const ElTooltip:ITooltip /** Tooltip Component */ -export declare class ElTooltip extends ElementUIComponent { +interface ITooltip extends ElementUIComponent { /** Tooltip theme */ effect: TooltipEffect diff --git a/types/transfer.d.ts b/types/transfer.d.ts index 9f35a7b04..151c647ae 100644 --- a/types/transfer.d.ts +++ b/types/transfer.d.ts @@ -30,8 +30,9 @@ export interface TransferRenderContent { (h: CreateElement, option: TransferData): VNode } +export const ElTransfer:ITransfer /** Transfer Component */ -export declare class ElTransfer extends ElementUIComponent { +interface ITransfer extends ElementUIComponent { /** Data source */ data: TransferData[] diff --git a/types/tree.d.ts b/types/tree.d.ts index 64dd36ad7..db3f94aae 100644 --- a/types/tree.d.ts +++ b/types/tree.d.ts @@ -44,8 +44,9 @@ export interface TreeStore { _getAllNodes: () => TreeNode[]; } +export const ElTree:ITree /** Tree Component */ -export declare class ElTree extends ElementUIComponent { +interface ITree extends ElementUIComponent { /** TreeStore */ store: TreeStore;