layui-vue/types/utils/vueUtil.d.ts

28 lines
1.1 KiB
TypeScript
Raw Normal View History

2022-12-12 01:08:28 +00:00
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;