@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
160 lines (159 loc) • 4.08 kB
TypeScript
/**
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ExtractPropTypes, PropType } from 'vue';
export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'bottom-left' | 'top-left';
export declare const popoverProps: {
/**
* 组件标识
*/
id: {
type: StringConstructor;
};
/**
* 可选,箭头偏移量
* @default 0
*/
arrowOffsetX: {
type: NumberConstructor;
default: number;
};
/**
* 可选,附加样式表
*/
class: {
type: StringConstructor;
default: string;
};
/**
* 可选,自定义样式
*/
customStyles: {
type: PropType<Record<string, any>>;
default: null;
};
/**
* popover应用场景有提示、展示其他内容,可能在界面呈现上会有区别。 如果做提示使用,需要特殊样式,通过此属性控制在没有自定义样式的情况下,指定特殊样式
*/
isSimpleTips: {
type: BooleanConstructor;
default: boolean;
};
/**
* 是否自适应内容
* @default false
*/
fitContent: {
type: BooleanConstructor;
default: boolean;
};
/**
* 可选,指定要弹出的内容插入到哪个元素
*/
host: {
type: PropType<any>;
};
/**
* 可选,指定要弹出的内容左边界不能超过哪个元素
*/
leftBoundary: {
type: PropType<any>;
};
/**
* 可选,气泡宽度与参照元素宽度保持一致
* @default false
*/
keepWidthWithReference: {
type: BooleanConstructor;
default: boolean;
};
/**
* 最小宽度
* @default -1
*/
minWidth: {
type: NumberConstructor;
default: number;
};
offsetX: {
type: PropType<any>;
default: import("vue").Ref<number, number>;
};
offsetY: {
type: PropType<any>;
default: import("vue").Ref<number, number>;
};
/**
* 可选,气泡显示的位置
* @default 'bottom'
*/
placement: {
type: PropType<PopoverPlacement>;
default: string;
};
/**
* 可选,参照元素
*/
reference: {
type: PropType<any>;
};
/**
* 可选,指定要弹出的内容右边界不能超过哪个元素
*/
rightBoundary: {
type: PropType<any>;
};
/**
* popover应用场景有提示、展示其他内容。 通常展示其他内容,不显示箭头。 提示通常展示箭头。
*/
showArrow: {
type: BooleanConstructor;
default: boolean;
};
/**
* 可选,气泡标题
*/
title: {
type: StringConstructor;
};
/**
* 可选,弹框的初始化弹出状态
* @default false
*/
visible: {
type: BooleanConstructor;
default: boolean;
};
/**
* 可选,z-index 值,用于手动控制层高
* @default -1
*/
zIndex: {
type: NumberConstructor;
default: number;
};
/**
* 可选,是否根据空间大小重新调整,原下拉面板内容指定的高度
* @default false
*/
limitContentBySpace: {
type: BooleanConstructor;
default: boolean;
};
beforeClose: {
type: PropType<() => Promise<boolean> | boolean>;
};
};
export type PopoverProps = ExtractPropTypes<typeof popoverProps>;