qianfenwei
This commit is contained in:
20
types/component/dropdown/util.d.ts
vendored
20
types/component/dropdown/util.d.ts
vendored
@@ -1,28 +1,10 @@
|
||||
import { DropdownPlacement } from "./interface";
|
||||
import { Component, VNode, VNodeTypes } from "vue";
|
||||
import { VNode } from "vue";
|
||||
export interface SlotChildren {
|
||||
value?: VNode[];
|
||||
}
|
||||
export declare enum ShapeFlags {
|
||||
ELEMENT = 1,
|
||||
FUNCTIONAL_COMPONENT = 2,
|
||||
STATEFUL_COMPONENT = 4,
|
||||
COMPONENT = 6,
|
||||
TEXT_CHILDREN = 8,
|
||||
ARRAY_CHILDREN = 16,
|
||||
SLOTS_CHILDREN = 32,
|
||||
TELEPORT = 64,
|
||||
SUSPENSE = 128,
|
||||
COMPONENT_SHOULD_KEEP_ALIVE = 256,
|
||||
COMPONENT_KEPT_ALIVE = 512
|
||||
}
|
||||
export declare const isScrollElement: (element: HTMLElement) => boolean;
|
||||
export declare const getScrollElements: (container: HTMLElement | undefined) => HTMLElement[];
|
||||
export declare const isElement: (vn: VNode) => boolean;
|
||||
export declare const isComponent: (vn: VNode, type?: VNodeTypes) => type is Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
||||
export declare const isArrayChildren: (vn: VNode, children: VNode["children"]) => children is VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
export declare const getChildrenArray: (vn: VNode) => VNode[] | undefined;
|
||||
export declare const getFirstElementFromVNode: (vn: VNode) => HTMLElement | undefined;
|
||||
export declare const getFirstElementFromChildren: (children: VNode[] | undefined) => HTMLElement | undefined;
|
||||
|
||||
1
types/utils/index.d.ts
vendored
1
types/utils/index.d.ts
vendored
@@ -1,3 +1,4 @@
|
||||
export * from "./domUtil";
|
||||
export * from "./withInstall";
|
||||
export * from "./arrayUtil";
|
||||
export * from "./vueUtil";
|
||||
|
||||
27
types/utils/vueUtil.d.ts
vendored
Normal file
27
types/utils/vueUtil.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Component, ComponentInternalInstance, VNode, VNodeTypes } from "vue";
|
||||
export declare enum ShapeFlags {
|
||||
ELEMENT = 1,
|
||||
FUNCTIONAL_COMPONENT = 2,
|
||||
STATEFUL_COMPONENT = 4,
|
||||
COMPONENT = 6,
|
||||
TEXT_CHILDREN = 8,
|
||||
ARRAY_CHILDREN = 16,
|
||||
SLOTS_CHILDREN = 32,
|
||||
TELEPORT = 64,
|
||||
SUSPENSE = 128,
|
||||
COMPONENT_SHOULD_KEEP_ALIVE = 256,
|
||||
COMPONENT_KEPT_ALIVE = 512
|
||||
}
|
||||
export declare const isElement: (vn: VNode) => boolean;
|
||||
export declare const isComponent: (vn: VNode, type?: VNodeTypes) => type is Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
||||
export declare const isArrayChildren: (vn: VNode, children: VNode["children"]) => children is VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
/**
|
||||
* 同时支持驼峰命名和破折号命名的插槽,示例:back-icon 和 backIcon
|
||||
* @param vm 组件实例
|
||||
* @param name 插槽名
|
||||
*/
|
||||
export declare function convertSlotName(vm: ComponentInternalInstance, name: string): string;
|
||||
export declare function camelCase(str: string): string;
|
||||
export declare function kebabCase(key: string): string;
|
||||
Reference in New Issue
Block a user