@opentiny/vue-common
Version:
An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
117 lines (116 loc) • 4.31 kB
TypeScript
import { bindFilter, emitter, getElementCssClass, getElementStatusClass } from '../utils';
/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import * as hooks from 'vue';
declare const Teleport: {
new (): {
$props: hooks.VNodeProps & hooks.TeleportProps;
$slots: {
default(): hooks.VNode<hooks.RendererNode, hooks.RendererElement, {
[key: string]: any;
}>[];
};
};
__isTeleport: true;
};
export { emitter, bindFilter, getElementCssClass, getElementStatusClass, Teleport };
export declare const defineAsyncComponent: typeof hooks.defineAsyncComponent;
export declare const markRaw: typeof hooks.markRaw;
export declare const renderComponent: ({ view, component, props, customDesignProps, context: { attrs, slots }, extend }: {
view?: any;
component?: any;
props: any;
customDesignProps: any;
context: {
attrs: any;
slots: any;
};
extend?: {} | undefined;
}) => () => hooks.VNode<hooks.RendererNode, hooks.RendererElement, {
[key: string]: any;
}>;
export declare const rootConfig: (context: any) => (hooks.ComponentCustomProperties & Record<string, any>) | undefined;
export declare const getCustomProps: () => hooks.VNodeProps & {
[key: string]: any;
};
export declare const getComponentName: () => string;
export declare const appContext: () => hooks.AppContext | {
component: () => void;
};
export declare const appProperties: () => hooks.ComponentCustomProperties & Record<string, any>;
export declare const useRouter: (instance?: hooks.ComponentInternalInstance | null) => {
route: any;
router: any;
};
export declare const tools: (context: any, mode: any) => {
framework: string;
vm: any;
emit: any;
emitter: () => {
emit(eventName: any): void;
on: (event: any, callback: any, once?: boolean) => void;
once(event: any, callback: any): void;
off(event: any, callback: any): void;
};
route: any;
router: any;
dispatch: (componentName: any, eventName: any, params: any) => void;
broadcast: (componentName: any, eventName: any, params: any) => void;
parentHandler: (handler: any) => {} | undefined;
childrenHandler: (handler: any) => any;
i18n: any;
refs: {};
slots: any;
scopedSlots: any;
attrs: any;
parent: any;
nextTick: typeof hooks.nextTick;
constants: any;
mode: any;
isPCMode: boolean;
isMobileMode: boolean;
service: any;
getService: () => any;
setParentAttribute: ({ name, value }: {
name: any;
value: any;
}) => void;
defineInstanceProperties: (props: any) => void;
defineParentInstanceProperties: (props: any) => void;
};
export declare const directive: (directives: any) => any;
export declare const parseVnode: (vnode: any) => any;
export declare const isEmptyVnode: (vnode: any) => boolean;
type CreateElement = (component: any, propsData?: any, childData?: any) => ReturnType<typeof hooks.h>;
export declare const h: CreateElement;
export declare const createComponentFn: (design: any) => ({ component, propsData, el }: {
component: any;
propsData: any;
el: any;
}) => any;
export declare const defineComponent: typeof hooks.defineComponent;
export default hooks;
export declare const isVue2 = false;
export declare const isVue3 = true;
export declare const isVnode: typeof hooks.isVNode;
export declare const KeepAlive: {
new (): {
$props: hooks.VNodeProps & hooks.KeepAliveProps;
$slots: {
default(): hooks.VNode<hooks.RendererNode, hooks.RendererElement, {
[key: string]: any;
}>[];
};
};
__isKeepAlive: true;
};
export type { PropType, ExtractPropTypes, DefineComponent, ComponentPublicInstance, SetupContext, ComputedRef, App, VNode } from '../../../../vue/node_modules/vue3';