nutui-uniapp
Version:
京东风格的轻量级移动端 Uniapp、Vue3 组件库(支持小程序开发)
2,034 lines (2,001 loc) • 248 kB
TypeScript
import * as vue from 'vue';
import { ExtractPropTypes, SetupContext, PropType, CSSProperties, StyleValue, Ref, InjectionKey, VNodeChild, VNode, RendererNode, RendererElement } from 'vue';
import { ButtonOpenType, ButtonLang, ButtonOnGetphonenumberEvent, ButtonOnErrorEvent, ButtonOnOpensettingEvent, ButtonOnLaunchappEvent, ButtonOnChooseavatarEvent, ButtonOnAgreeprivacyauthorizationEvent, ButtonOnAddgroupappEvent, ButtonOnChooseaddressEvent, ButtonOnChooseinvoicetitleEvent, ButtonOnSubscribeEvent, ButtonOnLoginEvent, BaseEvent, InputOnBlurEvent, InputOnFocusEvent, InputOnConfirmEvent, InputOnInputEvent, TextareaOnBlurEvent, TextareaOnFocusEvent, TextareaOnConfirmEvent, TextareaOnInputEvent } from '@uni-helper/uni-app-types';
import { ComponentResolver } from '@uni-helper/vite-plugin-uni-components';
type Interceptor = (...args: any[]) => Promise<boolean> | boolean | undefined | void;
/**
* prop type helpers
* help us to write less code and reduce bundle size
* copy from https://github.com/youzan/vant/blob/main/packages/vant/src/utils/props.ts
*/
type ClassType = string | object | Array<ClassType>;
declare const transitionProps: {
/**
* @description 内置动画名称,可选值为 `fade` `fade-up` `fade-down` f`ade-left` `fade-right` `slide-up` `slide-down` `slide-left` `slide-right`
*/
name: {
type: vue.PropType<"none" | "zoom" | "fade" | "fade-up" | "fade-down" | "fade-left" | "fade-right" | "slide-up" | "slide-down" | "slide-left" | "slide-right">;
default: "none" | "zoom" | "fade" | "fade-up" | "fade-down" | "fade-left" | "fade-right" | "slide-up" | "slide-down" | "slide-left" | "slide-right";
};
/**
* @description 是否展示过渡动画级
*/
show: BooleanConstructor;
/**
* @description 动画时长,单位为毫秒
*/
duration: {
type: NumberConstructor;
default: number;
};
/**
* @description 动画函数
*/
timingFunction: {
type: vue.PropType<"ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear">;
default: "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear";
};
destroyOnClose: BooleanConstructor;
/**
* @description 进入动画前的类名
*/
enterFromClass: StringConstructor;
/**
* @description 进入动画时的类名
*/
enterActiveClass: StringConstructor;
/**
* @description 进入动画后的类名
*/
enterToClass: StringConstructor;
/**
* @description 离开动画前的类名
*/
leaveFromClass: StringConstructor;
/**
* @description 离开动画时的类名
*/
leaveActiveClass: StringConstructor;
/**
* @description 离开动画后的类名
*/
leaveToClass: StringConstructor;
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
declare const transitionEmits: {
beforeEnter: () => boolean;
enter: () => boolean;
afterEnter: () => boolean;
beforeLeave: () => boolean;
leave: () => boolean;
afterLeave: () => boolean;
click: (evt: MouseEvent) => boolean;
};
type TransitionProps = ExtractPropTypes<typeof transitionProps>;
type TransitionEmits = typeof transitionEmits;
declare const defaultAnimations: NutAnimations;
declare function isKeyOfAnimations(value: string): boolean;
interface IClassNames {
enter: string;
enterActive: string;
enterTo: string;
leave: string;
leaveActive: string;
leaveTo: string;
}
interface IClassNameProps {
enterClass?: string;
enterActiveClass?: string;
enterToClass?: string;
leaveClass?: string;
leaveActiveClass?: string;
leaveToClass?: string;
}
declare function getClassNames(name: string, { enterClass, enterActiveClass, enterToClass, leaveClass, leaveActiveClass, leaveToClass, }: IClassNameProps): IClassNames;
declare function useTransition(props: TransitionProps, emit: SetupContext<TransitionEmits>['emit']): {
display: vue.Ref<boolean>;
classes: vue.ComputedRef<string>;
styles: vue.ComputedRef<string>;
clickHandler: (evt: any) => void;
};
type TransitionName = keyof typeof defaultAnimations;
interface NutAnimation {
enter: string;
leave: string;
}
declare const nutAnimationName: readonly ["fade", "fade-up", "fade-down", "fade-left", "fade-right", "slide-up", "slide-down", "slide-left", "slide-right", "zoom", "none"];
type NutAnimationName = (typeof nutAnimationName)[number];
declare const nutAnimationtimingFunction: readonly ["linear", "ease", "ease-in", "ease-in-out", "ease-out", "step-start", "step-end"];
type NutAnimationtimingFunction = (typeof nutAnimationtimingFunction)[number];
interface NutAnimations {
[key: string]: NutAnimation;
}
type Position = 'center' | 'top' | 'bottom' | 'left' | 'right';
interface ActionSheetOption {
disable?: boolean;
loading?: boolean;
color?: string;
name: string;
subname?: string;
}
declare const actionsheetProps: {
/**
* @description 是否显示圆角
*/
round: {
type: BooleanConstructor;
default: true;
};
/**
* @description 是否开启 iPhone 系列全面屏底部安全区适配,仅当 `position` 为 `bottom` 时有效
*/
safeAreaInsetBottom: {
type: BooleanConstructor;
default: true;
};
/**
* @description 遮罩显示时的背景是否锁定
*/
lockScroll: {
type: BooleanConstructor;
default: true;
};
/**
* @description 自定义 popup 弹框样式
*/
popStyle: {
type: PropType<CSSProperties>;
};
/**
* @description 取消文案
*/
cancelTxt: {
type: PropType<string>;
default: string;
};
/**
* @description 设置列表项标题展示使用参数
*/
optionTag: {
type: PropType<keyof ActionSheetOption>;
default: keyof ActionSheetOption;
};
/**
* @description 设置列表项二级标题展示使用参数
*/
optionSubTag: {
type: PropType<keyof ActionSheetOption>;
default: keyof ActionSheetOption;
};
/**
* @description 设置选中项的值,和 'option-tag' 的值对应
*/
chooseTagValue: {
type: PropType<string>;
default: string;
};
/**
* @description 设置列表项标题
*/
title: {
type: PropType<string>;
default: string;
};
/**
* @description 选中项颜色,当 choose-tag-value == option-tag 的值 生效
*/
customColor: {
type: PropType<string>;
default: string;
};
/**
* @description 设置列表项副标题/描述
*/
description: {
type: PropType<string>;
default: string;
};
/**
* @description 列表项
*/
menuItems: {
type: PropType<ActionSheetOption[]>;
default: () => ActionSheetOption[];
};
/**
* @description 遮罩层是否可关闭
*/
closeAbled: {
type: BooleanConstructor;
default: true;
};
customClass: {
type: PropType<ClassType>;
default: string;
};
customStyle: {
type: PropType<vue.StyleValue>;
default: string;
};
position: {
type: PropType<Position>;
default: Position;
};
transition: {
type: PropType<NutAnimationName>;
default: string;
};
popClass: {
type: PropType<string>;
default: string;
};
closeable: BooleanConstructor;
closeIcon: {
type: PropType<string>;
default: string;
};
closeIconPosition: {
type: PropType<"top-right" | "bottom-right" | "bottom-left" | "top-left">;
default: "top-right" | "bottom-right" | "bottom-left" | "top-left";
};
destroyOnClose: {
type: BooleanConstructor;
default: true;
};
overlay: {
type: BooleanConstructor;
default: true;
};
safeAreaInsetTop: {
type: BooleanConstructor;
default: true;
};
visible: BooleanConstructor;
zIndex: NumberConstructor;
duration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
overlayClass: {
type: PropType<string>;
default: string;
};
overlayStyle: PropType<CSSProperties>;
closeOnClickOverlay: {
type: BooleanConstructor;
default: true;
};
};
type ActionsheetProps = ExtractPropTypes<typeof actionsheetProps>;
declare const actionsheetEmits: {
close: () => boolean;
"update:visible": (val: boolean) => boolean;
cancel: () => boolean;
choose: (item: ActionSheetOption, index: number) => boolean;
};
type ActionsheetEmits = typeof actionsheetEmits;
interface AddressRegionData {
name: string;
[key: string]: any;
}
interface CustomRegionData {
title: string;
list: any[];
}
interface AddressExistRegionData {
id?: string | number;
provinceName: string;
cityName: string;
countyName: string;
townName: string;
addressDetail: string;
selectedAddress: boolean;
[key: string]: any;
}
declare const addressType: readonly ["exist", "custom", "custom2"];
type AddressType = (typeof addressType)[number];
declare const addressProps: {
/**
* @description 设置默认选中值
*/
modelValue: {
type: vue.PropType<any[]>;
default: () => any[];
};
/**
* @description 是否打开地址选择
*/
visible: BooleanConstructor;
/**
* @description 地址选择类型:'exist' | 'custom' | 'custom2'
*/
type: {
type: vue.PropType<"exist" | "custom" | "custom2">;
default: "exist" | "custom" | "custom2";
};
/**
* @description 自定义地址选择标题
*/
customAddressTitle: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 省份数据
*/
province: {
type: vue.PropType<AddressRegionData[]>;
default: () => AddressRegionData[];
};
/**
* @description 城市数据
*/
city: {
type: vue.PropType<AddressRegionData[]>;
default: () => AddressRegionData[];
};
/**
* @description 县区数据
*/
country: {
type: vue.PropType<AddressRegionData[]>;
default: () => AddressRegionData[];
};
/**
* @description 乡镇数据
*/
town: {
type: vue.PropType<AddressRegionData[]>;
default: () => AddressRegionData[];
};
/**
* @description 是否显示 '选择其他地区' 按钮。仅在类型为 'exist' 时生效
*/
isShowCustomAddress: {
type: BooleanConstructor;
default: true;
};
/**
* @description 现存地址列表
*/
existAddress: {
type: vue.PropType<AddressExistRegionData[]>;
default: () => AddressExistRegionData[];
};
/**
* @description 已有地址标题
*/
existAddressTitle: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 切换自定义地址和已有地址的按钮标题
*/
customAndExistTitle: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 弹层中内容容器的高度
*/
height: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* @description 列提示文字
*/
columnsPlaceholder: {
type: (ArrayConstructor | StringConstructor)[];
default: string;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
position: {
type: vue.PropType<Position>;
default: Position;
};
transition: {
type: vue.PropType<NutAnimationName>;
default: string;
};
popClass: {
type: vue.PropType<string>;
default: string;
};
round: BooleanConstructor;
closeable: BooleanConstructor;
closeIcon: {
type: vue.PropType<string>;
default: string;
};
closeIconPosition: {
type: vue.PropType<"top-right" | "bottom-right" | "bottom-left" | "top-left">;
default: "top-right" | "bottom-right" | "bottom-left" | "top-left";
};
destroyOnClose: {
type: BooleanConstructor;
default: true;
};
overlay: {
type: BooleanConstructor;
default: true;
};
safeAreaInsetBottom: BooleanConstructor;
safeAreaInsetTop: {
type: BooleanConstructor;
default: true;
};
zIndex: NumberConstructor;
duration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
overlayClass: {
type: vue.PropType<string>;
default: string;
};
overlayStyle: vue.PropType<vue.CSSProperties>;
lockScroll: BooleanConstructor;
closeOnClickOverlay: {
type: BooleanConstructor;
default: true;
};
};
type AddressProps = ExtractPropTypes<typeof addressProps>;
declare const addressEmits: {
"update:visible": (val: boolean) => boolean;
"update:modelValue": () => boolean;
close: (val: {
data: any;
type: string;
}) => boolean;
change: (val: {
next?: string;
value?: AddressRegionData;
custom: string;
}) => boolean;
switchModule: (val: {
type: AddressType;
}) => boolean;
closeMask: (val: {
closeWay: "self" | "mask" | "cross";
}) => boolean;
selected: (prevExistAdd: AddressExistRegionData, item: AddressExistRegionData, copyExistAdd: AddressExistRegionData[]) => boolean;
};
type AddressEmits = typeof addressEmits;
interface AddressListOptions {
[key: string]: string;
}
declare const addresslistProps: {
/**
* @description 地址数组
*/
data: {
type: vue.PropType<any[]>;
default: () => any[];
};
/**
* @description 长按功能
*/
longPress: BooleanConstructor;
/**
* @description 右滑功能
*/
swipeEdition: BooleanConstructor;
/**
* @description 是否展示底部按钮
*/
showBottomButton: {
type: BooleanConstructor;
default: true;
};
/**
* @description 自定义 `key` 值时,设置映射关系
*/
options: {
type: vue.PropType<AddressListOptions>;
default: () => AddressListOptions;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type AddressListProps = ExtractPropTypes<typeof addresslistProps>;
declare const addresslistEmits: {
delIcon: (val: Event, item: unknown, index: number | string) => boolean;
editIcon: (val: Event, item: unknown, index: number | string) => boolean;
clickItem: (val: Event, item: unknown, index: number | string) => boolean;
longCopy: (val: Event, item: unknown, index: number | string) => boolean;
longSet: (val: Event, item: unknown, index: number | string) => boolean;
longDel: (val: Event, item: unknown, index: number | string) => boolean;
swipeDel: (val: Event, item: unknown, index: number | string) => boolean;
add: (val: Event) => boolean;
};
type AddressListEmits = typeof addresslistEmits;
declare const animateProps: {
/**
* @description 控制动画,当值从 false 变为 true 时会触发一次动画
*/
show: BooleanConstructor;
/**
* @description 动画类型
* @values 'fade', 'slide', 'zoom', ...
*/
type: {
type: vue.PropType<"" | "slide-left" | "slide-right" | "shake" | "ripple" | "breath" | "float" | "slide-top" | "slide-bottom" | "jump" | "twinkle" | "flicker">;
default: "" | "slide-left" | "slide-right" | "shake" | "ripple" | "breath" | "float" | "slide-top" | "slide-bottom" | "jump" | "twinkle" | "flicker";
};
/**
* @description 是否循环执行。`true`-循环执行; `false`-执行一次
*/
loop: BooleanConstructor;
/**
* @description 动画时长,单位 ms
*/
duration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
/**
* @description (不能与 show 同时使用)触发方式,`initial`-初始化执行; `click`-点击执行
* @values 'initial', 'click'
* @default initial
*/
action: {
type: vue.PropType<"" | "click" | "initial">;
default: "" | "click" | "initial";
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type AnimateProps = ExtractPropTypes<typeof animateProps>;
declare const animateEmits: {
click: (evt: MouseEvent) => boolean;
animate: () => boolean;
};
type AnimateEmits = typeof animateEmits;
declare const avatarProps: {
/**
* @description 头像的大小,可选值为:`large`、`normal`、`small`,支持直接输入数字
*/
size: {
type: (NumberConstructor | StringConstructor)[];
default: string | number | undefined;
};
/**
* @description 头像的形状,可选值为:`square`、`round`
*/
shape: {
type: vue.PropType<"round" | "square" | undefined>;
default: "round" | "square" | undefined;
};
/**
* @description 背景色
*/
bgColor: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 字体颜色
*/
customColor: {
type: vue.PropType<string>;
default: string;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type AvatarProps = ExtractPropTypes<typeof avatarProps>;
declare const avatarSize: readonly ["large", "normal", "small"];
type AvatarSize = (typeof avatarSize)[number];
declare const avatarShape: readonly ["round", "square"];
type AvatarShape = (typeof avatarShape)[number];
interface AvatarFinalSize {
/**
* 是否为预设尺寸
*/
preset: boolean;
/**
* 尺寸值
*/
value: string;
}
declare const AVATAR_GROUP_KEY: unique symbol;
declare const avatargroupProps: {
/**
* @description 显示的最大头像个数
*/
maxCount: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
/**
* @description 头像数量超出时,会出现一个头像折叠元素,该元素内容可为`...`、`more`、`+N`
*/
maxContent: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 头像的大小,可选值为:`large`、`normal`、`small`,支持直接输入数字
*/
size: {
type: (NumberConstructor | StringConstructor)[];
default: string | number;
};
/**
* @description 头像的形状,可选值为:`square`、`round`
*/
shape: {
type: vue.PropType<"round" | "square">;
default: "round" | "square";
};
/**
* @description 头像折叠元素的字体颜色
*/
maxColor: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 头像折叠元素的背景色
*/
maxBgColor: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 头像之间的间距
*/
span: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* @description 组合头像之间的层级方向,可选值为:`left`、`right`
*/
zIndex: {
type: vue.PropType<"left" | "right">;
default: "left" | "right";
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type AvatarGroupProps = ExtractPropTypes<typeof avatargroupProps>;
declare const backtopProps: {
/**
* @description 滚动区域的高度
*/
height: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 距离页面底部距离
*/
bottom: {
type: NumberConstructor;
default: number;
};
/**
* @description 距离页面右侧距离
*/
right: {
type: NumberConstructor;
default: number;
};
/**
* @description 页面垂直滚动多高后出现
*/
distance: {
type: NumberConstructor;
default: number;
};
/**
* @description 设置组件页面层级
*/
zIndex: {
type: NumberConstructor;
default: number;
};
/**
* @description 自定义图标颜色
*/
customColor: StringConstructor;
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type BacktopProps = ExtractPropTypes<typeof backtopProps>;
declare const backtopEmits: {
click: (evt: MouseEvent) => boolean;
};
type BacktopEmits = typeof backtopEmits;
declare const badgeProps: {
/**
* @description 显示的内容
*/
value: (NumberConstructor | StringConstructor)[];
/**
* @description `value` 为数值时,最大值
*/
max: {
type: NumberConstructor;
default: number;
};
/**
* @description 是否为小点
*/
dot: BooleanConstructor;
/**
* @description 是否为气泡形状
* @since >v4.0.0
*/
bubble: BooleanConstructor;
/**
* @description 是否隐藏
*/
hidden: BooleanConstructor;
/**
* @description 上下偏移量,支持单位设置,可设置为:`5px` 等
*/
top: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 左右偏移量,支持单位设置,可设置为:`5px` 等
*/
right: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 徽标的 `z-index` 值
*/
zIndex: {
type: NumberConstructor;
default: number;
};
/**
* @description 徽标背景颜色
*/
customColor: {
type: vue.PropType<string>;
default: string;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type BadgeProps = ExtractPropTypes<typeof badgeProps>;
declare const barrageProps: {
/**
* @description 弹幕列表数据
*/
danmu: {
type: vue.PropType<string[]>;
default: () => string[];
};
/**
* @description 可视区域内每个弹幕出现的时间间隔
*/
frequency: {
type: NumberConstructor;
default: number;
};
/**
* @description 每个弹幕的滚动时间
*/
speeds: {
type: NumberConstructor;
default: number;
};
/**
* @description 弹幕行数,分几行展示
*/
rows: {
type: NumberConstructor;
default: number;
};
/**
* @description 弹幕垂直距离
*/
top: {
type: NumberConstructor;
default: number;
};
/**
* @description 是否循环播放
*/
loop: {
type: BooleanConstructor;
default: true;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type BarrageProps = ExtractPropTypes<typeof barrageProps>;
interface BarrageInst {
add: (word: string) => void;
}
declare const buttonProps: {
/**
* @description 指定按钮按下去的样式类
*/
readonly hoverClass: {
type: PropType<string>;
default: string;
};
/**
* @description 按住后多久出现点击态,单位毫秒
*/
readonly hoverStartTime: {
type: NumberConstructor;
default: number;
};
/**
* @description 手指松开后点击态保留时间,单位毫秒
*/
readonly hoverStayTime: {
type: NumberConstructor;
default: number;
};
/**
* @description 按钮颜色,支持传入 `linear-gradient` 渐变色
*/
readonly customColor: StringConstructor;
/**
* @description 形状,可选值为 `square` `round`
*/
readonly shape: {
type: PropType<"round" | "square">;
default: "round" | "square";
};
/**
* @description 是否为朴素按钮
*/
readonly plain: BooleanConstructor;
/**
* @description 按钮 `loading` 状态
*/
readonly loading: BooleanConstructor;
/**
* @description 是否禁用按钮
*/
readonly disabled: BooleanConstructor;
/**
* @description 按钮类型,可选值为 `primary` `info` `warning` `danger` `success` `default`
*/
readonly type: {
type: PropType<"default" | "primary" | "info" | "success" | "warning" | "danger">;
default: "default" | "primary" | "info" | "success" | "warning" | "danger";
};
/**
* @description 表单类型,可选值 `button` `submit` `reset`
*/
readonly formType: {
type: PropType<"button" | "reset" | "submit">;
default: "button" | "reset" | "submit";
};
/**
* @description 尺寸,可选值为 `large` `small` `mini` `normal`
*/
readonly size: {
type: PropType<"normal" | "large" | "small" | "mini">;
default: "normal" | "large" | "small" | "mini";
};
/**
* @description 是否为块级元素
*/
readonly block: BooleanConstructor;
/**
* @description 小程序开放能力
*/
readonly openType: PropType<ButtonOpenType>;
/**
* @description 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文
*/
readonly lang: {
type: PropType<ButtonLang>;
default: ButtonLang;
};
/**
* @description 会话来源,openType="contact"时有效
*/
readonly sessionFrom: StringConstructor;
/**
* @description 会话内消息卡片标题,openType="contact"时有效
*/
readonly sendMessageTitle: StringConstructor;
/**
* @description 会话内消息卡片点击跳转小程序路径,openType="contact"时有效
*/
readonly sendMessagePath: StringConstructor;
/**
* @description 会话内消息卡片图片,openType="contact"时有效
*/
readonly sendMessageImg: StringConstructor;
/**
* @description 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效
*/
readonly showMessageCard: BooleanConstructor;
/**
* @description 打开群资料卡时,传递的群号,openType="openGroupProfile"时有效
*/
readonly groupId: StringConstructor;
/**
* @description 打开频道页面时,传递的频道号 openType="openGuildProfile"时有效
*/
readonly guildId: {
type: PropType<string>;
default: string;
};
/**
* @description 打开公众号资料卡时,传递的号码 openType="openPublicProfile"时有效
*/
readonly publicId: StringConstructor;
/**
* @description 客服的抖音号,openType="im"时有效
*/
readonly dataImId: StringConstructor;
/**
* @description IM卡片类型,openType="im"时有效
*/
readonly dataImType: StringConstructor;
/**
* @description 商品的id,仅支持泛知识课程库和生活服务商品库中的商品,openType="im"时有效
*/
readonly dataGoodsId: StringConstructor;
/**
* @description 订单的id,仅支持交易2.0订单, openType="im"时有效
*/
readonly dataOrderId: StringConstructor;
/**
* @description 商品类型,“1”代表生活服务,“2”代表泛知识。openType="im"时有效
*/
readonly dataBizLine: StringConstructor;
readonly customClass: {
type: PropType<ClassType>;
default: string;
};
readonly customStyle: {
type: PropType<vue.StyleValue>;
default: string;
};
};
type ButtonProps = ExtractPropTypes<typeof buttonProps>;
declare const buttonEmits: {
click: (evt: MouseEvent) => boolean;
getphonenumber: (evt: ButtonOnGetphonenumberEvent) => boolean;
getuserinfo: (evt: any) => boolean;
error: (evt: ButtonOnErrorEvent) => boolean;
opensetting: (evt: ButtonOnOpensettingEvent) => boolean;
launchapp: (evt: ButtonOnLaunchappEvent) => boolean;
contact: (evt: any) => boolean;
chooseavatar: (evt: ButtonOnChooseavatarEvent) => boolean;
agreeprivacyauthorization: (evt: ButtonOnAgreeprivacyauthorizationEvent) => boolean;
addgroupapp: (evt: ButtonOnAddgroupappEvent) => boolean;
chooseaddress: (evt: ButtonOnChooseaddressEvent) => boolean;
chooseinvoicetitle: (evt: ButtonOnChooseinvoicetitleEvent) => boolean;
subscribe: (evt: ButtonOnSubscribeEvent) => boolean;
login: (evt: ButtonOnLoginEvent) => boolean;
im: (evt: any) => boolean;
};
type ButtonEmits = typeof buttonEmits;
declare const buttonType: readonly ["default", "primary", "info", "success", "warning", "danger"];
type ButtonType = (typeof buttonType)[number];
declare const buttonSize: readonly ["large", "normal", "small", "mini"];
type ButtonSize = (typeof buttonSize)[number];
declare const buttonShape: readonly ["square", "round"];
type ButtonShape = (typeof buttonShape)[number];
declare const buttonFormType: readonly ["button", "submit", "reset"];
type ButtonFormType = (typeof buttonFormType)[number];
declare const calendarProps: {
/**
* @description 是否可见
*/
visible: BooleanConstructor;
/**
* @description 类型,日期单选 `one`,区间选择 `range`,日期多选 `multiple`,周选择 `week`
*/
type: {
type: PropType<"range" | "multiple" | "one" | "week">;
default: "range" | "multiple" | "one" | "week";
};
/**
* @description 是否弹窗状态展示
*/
poppable: {
type: BooleanConstructor;
default: true;
};
/**
* @description 自动回填
*/
isAutoBackFill: BooleanConstructor;
/**
* @description 显示标题
*/
title: {
type: PropType<string>;
default: string;
};
/**
* @description 默认值,单个日期选择为 `string`,其他为 `string[]`
*/
defaultValue: {
type: PropType<string | string[]>;
};
/**
* @description 开始日期
*/
startDate: {
type: PropType<string>;
default: string;
};
/**
* @description 结束日期
*/
endDate: {
type: PropType<string>;
default: string;
};
/**
* @description 范围选择,开始信息文案
*/
startText: {
type: PropType<string>;
default: string;
};
/**
* @description 范围选择,结束信息文案
*/
endText: {
type: PropType<string>;
default: string;
};
/**
* @description 底部确认按钮文案
*/
confirmText: {
type: PropType<string>;
default: string;
};
/**
* @description 是否展示今天标记
*/
showToday: {
type: BooleanConstructor;
default: true;
};
/**
* @description 是否在展示日历标题
*/
showTitle: {
type: BooleanConstructor;
default: true;
};
/**
* @description 是否展示日期标题
*/
showSubTitle: {
type: BooleanConstructor;
default: true;
};
/**
* @description 是否启动滚动动画
*/
toDateAnimation: {
type: BooleanConstructor;
default: true;
};
/**
* @description 设置周起始日
*/
firstDayOfWeek: {
type: NumberConstructor;
default: number;
};
/**
* @description 一个用来判断该日期是否被禁用的函数,接受一个 `年 - 月 - 日` 作为参数。 应该返回一个 Boolean 值。
* @default undefined
*/
disabledDate: FunctionConstructor;
/**
* @description 是否使用 footer 插槽,如果使用,此值必须为 true
*/
footerSlot: BooleanConstructor;
/**
* @description 是否使用 btn 插槽,如果使用,此值必须为 true
*/
btnSlot: BooleanConstructor;
/**
* @description 自定义弹窗样式
*/
popStyle: {
type: PropType<StyleValue>;
default: string;
};
/**
* @description 遮罩显示时的背景是否锁定
*/
lockScroll: {
type: BooleanConstructor;
default: true;
};
customClass: {
type: PropType<ClassType>;
default: string;
};
customStyle: {
type: PropType<StyleValue>;
default: string;
};
position: {
type: PropType<Position>;
default: Position;
};
transition: {
type: PropType<NutAnimationName>;
default: string;
};
popClass: {
type: PropType<string>;
default: string;
};
round: BooleanConstructor;
closeable: BooleanConstructor;
closeIcon: {
type: PropType<string>;
default: string;
};
closeIconPosition: {
type: PropType<"top-right" | "bottom-right" | "bottom-left" | "top-left">;
default: "top-right" | "bottom-right" | "bottom-left" | "top-left";
};
destroyOnClose: {
type: BooleanConstructor;
default: true;
};
overlay: {
type: BooleanConstructor;
default: true;
};
safeAreaInsetBottom: BooleanConstructor;
safeAreaInsetTop: {
type: BooleanConstructor;
default: true;
};
zIndex: NumberConstructor;
duration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
overlayClass: {
type: PropType<string>;
default: string;
};
overlayStyle: PropType<vue.CSSProperties>;
closeOnClickOverlay: {
type: BooleanConstructor;
default: true;
};
};
type CalendarProps = ExtractPropTypes<typeof calendarProps>;
declare const calendarEmits: {
"update:visible": (value: boolean) => boolean;
choose: (value: string | object) => boolean;
select: (value: any) => boolean;
clickCloseIcon: () => boolean;
clickOverlay: () => boolean;
open: () => boolean;
opened: () => boolean;
close: () => boolean;
closed: () => boolean;
};
type CalendarEmits = typeof calendarEmits;
declare const calendaritemProps: {
/**
* @description 是否可见
*/
visible: BooleanConstructor;
/**
* @description 类型,日期单选 `one`,区间选择 `range`,日期多选 `multiple`,周选择 `week`
*/
type: {
type: vue.PropType<"range" | "multiple" | "one" | "week">;
default: "range" | "multiple" | "one" | "week";
};
/**
* @description 是否弹窗状态展示
*/
poppable: {
type: BooleanConstructor;
default: true;
};
/**
* @description 自动回填
*/
isAutoBackFill: BooleanConstructor;
/**
* @description 显示标题
*/
title: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 默认值,单个日期选择为 `string`,其他为 `string[]`
*/
defaultValue: {
type: (ArrayConstructor | StringConstructor)[];
};
/**
* @description 开始日期
*/
startDate: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 结束日期
*/
endDate: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 范围选择,开始信息文案
*/
startText: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 范围选择,结束信息文案
*/
endText: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 底部确认按钮文案
*/
confirmText: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 是否展示今天标记
*/
showToday: {
type: BooleanConstructor;
default: true;
};
/**
* @description 是否在展示日历标题
*/
showTitle: {
type: BooleanConstructor;
default: true;
};
/**
* @description 是否展示日期标题
*/
showSubTitle: {
type: BooleanConstructor;
default: true;
};
/**
* @description 是否启动滚动动画
*/
toDateAnimation: {
type: BooleanConstructor;
default: true;
};
/**
* @description 设置周起始日
*/
firstDayOfWeek: {
type: NumberConstructor;
default: number;
};
/**
* @description 一个用来判断该日期是否被禁用的函数,接受一个 `年 - 月 - 日` 作为参数。 应该返回一个 Boolean 值。
* @default undefined
*/
disabledDate: FunctionConstructor;
/**
* @description 是否使用 footer 插槽,如果使用,此值必须为 true
*/
footerSlot: BooleanConstructor;
/**
* @description 是否使用 btn 插槽,如果使用,此值必须为 true
*/
btnSlot: BooleanConstructor;
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CalendarItemProps = ExtractPropTypes<typeof calendaritemProps>;
declare const calendaritemEmits: {
choose: (value: string | object) => boolean;
select: (value: any) => boolean;
update: () => boolean;
close: () => boolean;
};
type CalendarItemEmits = typeof calendaritemEmits;
declare const cardProps: {
/**
* @description 左侧图片 `Url`
*/
imgUrl: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 标题
*/
title: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 商品价格
*/
price: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 会员价格
*/
vipPrice: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 店铺介绍
*/
shopDesc: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 配送方式
*/
delivery: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 店铺名称
*/
shopName: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 是否需要价格展示
*/
isNeedPrice: {
type: BooleanConstructor;
default: true;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CardProps = ExtractPropTypes<typeof cardProps>;
interface CascaderOption {
text?: string;
value?: number | string;
disabled?: boolean;
children?: CascaderOption[];
leaf?: boolean;
level?: number;
loading?: boolean;
[key: PropertyKey]: any;
}
type CascaderValue = CascaderOption['value'][];
declare const cascaderProps: {
/**
* @description 选中值,双向绑定
*/
modelValue: ArrayConstructor;
/**
* @description 显示选择层
*/
visible: BooleanConstructor;
/**
* @description 级联数据
*/
options: {
type: PropType<any[]>;
default: () => any[];
};
/**
* @description 是否开启动态加载
*/
lazy: BooleanConstructor;
/**
* @description 动态加载回调,开启动态加载时生效
*/
lazyLoad: FunctionConstructor;
/**
* @description 自定义 `options` 结构中 `value` 的字段
*/
valueKey: {
type: PropType<string>;
default: string;
};
/**
* @description 自定义 `options` 结构中 `text` 的字段
*/
textKey: {
type: PropType<string>;
default: string;
};
/**
* @description 自定义 `options` 结构中 `children` 的字段
*/
childrenKey: {
type: PropType<string>;
default: string;
};
/**
* @description 当 `options` 为可转换为树形结构的扁平结构时,配置转换规则
*/
convertConfig: ObjectConstructor;
/**
* @description 是否需要弹层展示(设置为 `false` 后,`title` 失效)
*/
poppable: {
type: BooleanConstructor;
default: true;
};
/**
* @description 标题
*/
title: StringConstructor;
/**
* @description 选中底部展示样式 可选值: 'line', 'smile'
*/
titleType: {
type: PropType<"line" | "card" | "smile">;
default: "line" | "card" | "smile";
};
/**
* @description 标签栏字体尺寸大小 可选值: 'large', 'normal', 'small'
*/
titleSize: {
type: PropType<"normal" | "large" | "small">;
default: "normal" | "large" | "small";
};
/**
* @description 标签间隙
*/
titleGutter: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
/**
* @description 是否省略过长的标题文字
*/
titleEllipsis: {
type: BooleanConstructor;
default: true;
};
/**
* @description 自定义弹窗样式
*/
popStyle: {
type: PropType<StyleValue>;
default: string;
};
/**
* @description 遮罩显示时的背景是否锁定
*/
lockScroll: {
type: BooleanConstructor;
default: true;
};
customClass: {
type: PropType<ClassType>;
default: string;
};
customStyle: {
type: PropType<StyleValue>;
default: string;
};
position: {
type: PropType<Position>;
default: Position;
};
transition: {
type: PropType<NutAnimationName>;
default: string;
};
popClass: {
type: PropType<string>;
default: string;
};
round: BooleanConstructor;
closeable: BooleanConstructor;
closeIcon: {
type: PropType<string>;
default: string;
};
closeIconPosition: {
type: PropType<"top-right" | "bottom-right" | "bottom-left" | "top-left">;
default: "top-right" | "bottom-right" | "bottom-left" | "top-left";
};
destroyOnClose: {
type: BooleanConstructor;
default: true;
};
overlay: {
type: BooleanConstructor;
default: true;
};
safeAreaInsetBottom: BooleanConstructor;
safeAreaInsetTop: {
type: BooleanConstructor;
default: true;
};
zIndex: NumberConstructor;
duration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
overlayClass: {
type: PropType<string>;
default: string;
};
overlayStyle: PropType<vue.CSSProperties>;
closeOnClickOverlay: {
type: BooleanConstructor;
default: true;
};
};
type CascaderProps = ExtractPropTypes<typeof cascaderProps>;
declare const cascaderEmits: {
"update:modelValue": (value: CascaderValue) => boolean;
"update:visible": (value: boolean) => boolean;
change: (value: CascaderValue, nodes: CascaderOption[]) => boolean;
pathChange: (nodes: CascaderOption[]) => boolean;
open: () => boolean;
opened: () => boolean;
close: () => boolean;
closed: () => boolean;
};
type CascaderEmits = typeof cascaderEmits;
declare const cascaderitemProps: {
/**
* @description 选中值,双向绑定
*/
modelValue: ArrayConstructor;
/**
* @description 显示选择层
*/
visible: BooleanConstructor;
/**
* @description 级联数据
*/
options: {
type: vue.PropType<any[]>;
default: () => any[];
};
/**
* @description 是否开启动态加载
*/
lazy: BooleanConstructor;
/**
* @description 动态加载回调,开启动态加载时生效
*/
lazyLoad: FunctionConstructor;
/**
* @description 自定义 `options` 结构中 `value` 的字段
*/
valueKey: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 自定义 `options` 结构中 `text` 的字段
*/
textKey: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 自定义 `options` 结构中 `children` 的字段
*/
childrenKey: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 当 `options` 为可转换为树形结构的扁平结构时,配置转换规则
*/
convertConfig: ObjectConstructor;
/**
* @description 选中底部展示样式 可选值: 'line', 'smile'
*/
titleType: {
type: vue.PropType<"line" | "card" | "smile">;
default: "line" | "card" | "smile";
};
/**
* @description 标签栏字体尺寸大小 可选值: 'large', 'normal', 'small'
*/
titleSize: {
type: vue.PropType<"normal" | "large" | "small">;
default: "normal" | "large" | "small";
};
/**
* @description 标签间隙
*/
titleGutter: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
/**
* @description 是否省略过长的标题文字
*/
titleEllipsis: {
type: BooleanConstructor;
default: true;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CascaderItemProps = ExtractPropTypes<typeof cascaderitemProps>;
declare const cascaderitemEmits: {
"update:modelValue": (value: CascaderValue) => boolean;
change: (value: CascaderValue, nodes: CascaderOption[]) => boolean;
pathChange: (value: CascaderOption[]) => boolean;
};
type CascaderItemEmits = typeof cascaderitemEmits;
interface CategoryType {
catName?: string;
[key: string]: any;
}
declare const categoryProps: {
/**
* @description 分类模式:`classify`,`text`,`custom`
*/
type: {
type: vue.PropType<"text" | "custom" | "classify">;
default: "text" | "custom" | "classify";
};
/**
* @description 左侧导航栏数据列表
*/
category: {
type: vue.PropType<any[]>;
default: () => any[];
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CategoryProps = ExtractPropTypes<typeof categoryProps>;
declare const categoryEmits: {
change: (index: number) => boolean;
};
type CategoryEmits = typeof categoryEmits;
interface ChildType {
catName?: string;
catType?: number;
[key: string]: any;
}
interface CustomType {
catName?: string;
[key: string]: any;
}
declare const categorypaneProps: {
/**
* @description 分类模式:`classify`,`text`,`custom`
*/
type: {
type: vue.PropType<"text" | "custom" | "classify">;
default: "text" | "custom" | "classify";
};
/**
* @description 右侧展示当前分类数据
*/
categoryChild: {
type: vue.PropType<any[]>;
default: () => any[];
};
/**
* @description 自定义分类数据
*/
customCategory: {
type: vue.PropType<any[]>;
default: () => any[];
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CategoryPaneProps = ExtractPropTypes<typeof categorypaneProps>;
declare const categorypaneEmits: {
onChange: (sku: string | object) => boolean;
};
type CategoryPaneEmits = typeof categorypaneEmits;
declare const cellProps: {
/**
* @description 标题名称
*/
title: StringConstructor;
/**
* @description 左侧副标题
*/
subTitle: StringConstructor;
/**
* @description 右侧描述
*/
desc: StringConstructor;
/**
* @description 右侧描述文本对齐方式 [text-align](https://www.w3school.com.cn/cssref/pr_text_text-align.asp)
*/
descTextAlign: {
type: vue.PropType<"left" | "right" | "inherit" | "center" | "justify">;
default: "left" | "right" | "inherit" | "center" | "justify";
};
/**
* @description 是否展示右侧箭头并开启点击反馈
*/
isLink: BooleanConstructor;
/**
* @description 点击后跳转的目标路由对象,
*/
to: StringConstructor;
/**
* @description 圆角半径
*/
roundRadius: {
type: (NumberConstructor | StringConstructor)[];
default: undefined;
};
/**
* @description 是否使内容垂直居中
*/
center: BooleanConstructor;
/**
* @description 单元格大小,可选值为 `large`
*/
size: {
type: vue.PropType<string>;
default: string;
};
/**
* @description 是否启用点击效果
*/
clickable: BooleanConstructor;
/**
* @description 左侧图标
*/
icon: StringConstructor;
/**
* @description 标题宽度
*/
titleWidth: {
type: (NumberConstructor | StringConstructor)[];
default: undefined;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CellProps = ExtractPropTypes<typeof cellProps>;
declare const cellEmits: {
click: (event: Event) => boolean;
};
type CellEmits = typeof cellEmits;
declare const cellgroupProps: {
/**
* @description 标题名称
*/
title: StringConstructor;
/**
* @description 右侧描述
*/
desc: StringConstructor;
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CellGroupProps = ExtractPropTypes<typeof cellgroupProps>;
declare const checkboxProps: {
/**
* @description 是否处于选中状态
*/
modelValue: {
type: (NumberConstructor | StringConstructor | BooleanConstructor)[];
default: boolean;
};
/**
* @description 是否禁用选择
*/
disabled: {
type: vue.PropType<boolean | undefined>;
default: undefined;
};
/**
* @description 文本所在的位置,可选值:`left`,`right`
*/
textPosition: {
type: vue.PropType<"left" | "right">;
default: "left" | "right";
};
/**
* @description 图标大小,如 20px 2em 2rem
*/
iconSize: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* @description 复选框标识
*/
label: (NumberConstructor | StringConstructor | BooleanConstructor)[];
/**
* @description 当前是否支持半选状态,一般用在全选操作中
*/
indeterminate: BooleanConstructor;
/**
* @description 形状,可选值:`button`、`round`
*/
shape: {
type: vue.PropType<"button" | "round">;
default: "button" | "round";
};
/**
* @description 选中状态的值
*/
checkedValue: {
type: (NumberConstructor | StringConstructor | BooleanConstructor)[];
default: boolean;
};
/**
* @description 未选中状态的值
*/
uncheckedValue: {
type: (NumberConstructor | StringConstructor | BooleanConstructor)[];
default: boolean;
};
customClass: {
type: vue.PropType<ClassType>;
default: string;
};
customStyle: {
type: vue.PropType<vue.StyleValue>;
default: string;
};
};
type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
declare const checkboxEmits: {
"update:modelValue": (value: any) => boolean;
change: (checked: boolean, value: any) => boolean;
};
type CheckboxEmits = typeof checkboxEmits;
declare const CHECKBOX_KEY: unique symbol;
declare const checkboxgroupProps: {
/**
* @description 当前选中项的标识符,和 `label` 相对应
*/
modelValue: {
type: vue.PropType<any[]>;
default: () => any[];
};
/**
* @description 是否禁用选择,将用于其下的全部复选框
*/
disabled: {
type: vue.PropType<boolean | undefined>;
default: undefined;
};
/**
* @description 限制选择的数量,不能和全选/取消/反选一起使用, 0表示没有限制
*/
max: {
type: NumberConstructor;
default: number;
};
customClass: {
type: vue.PropTyp