UNPKG

uni-wot-ui-plus

Version:

🦄基于uni-ui的二次封装的uniapp组件库

82 lines (76 loc) 2.57 kB
import { ExtractPropTypes } from 'vue'; import { ComponentResolver } from '@uni-helper/vite-plugin-uni-components'; /** * 简化为通用的 wot-button 适配 props 与 emits * 若你有 wot-button 的类型定义,可替换 WotButtonEvent 为具体类型 */ type WotButtonEvent = Record<string, any>; declare const buttonProps: { readonly type: { readonly type: StringConstructor; readonly default: "success"; }; readonly size: { readonly type: StringConstructor; readonly default: "mini"; }; readonly disabled: { readonly type: BooleanConstructor; readonly default: false; }; readonly loading: { readonly type: BooleanConstructor; readonly default: false; }; readonly block: { readonly type: BooleanConstructor; readonly default: false; }; readonly round: { readonly type: BooleanConstructor; readonly default: false; }; readonly plain: { readonly type: BooleanConstructor; readonly default: false; }; readonly hairline: { readonly type: BooleanConstructor; readonly default: false; }; readonly color: { readonly type: StringConstructor; }; }; type ButtonProps = ExtractPropTypes<typeof buttonProps>; declare const buttonEmits: { click: (evt?: WotButtonEvent) => boolean; longpress: (evt?: WotButtonEvent) => boolean; getphonenumber: (evt: WotButtonEvent) => boolean; getuserinfo: (evt: any) => boolean; error: (evt: any) => boolean; opensetting: (evt: any) => boolean; launchapp: (evt: any) => boolean; contact: (evt: any) => boolean; chooseavatar: (evt: any) => boolean; agreeprivacyauthorization: (evt: any) => boolean; addgroupapp: (evt: any) => boolean; chooseaddress: (evt: any) => boolean; chooseinvoicetitle: (evt: any) => boolean; subscribe: (evt: any) => boolean; login: (evt: any) => boolean; im: (evt: any) => boolean; }; type ButtonEmits = typeof buttonEmits; declare const useTranslate: (name?: string) => { translate: (key: string, ...args: unknown[]) => any; }; declare function useForm(): { handleSetFormItems: (formItems: any[]) => any[]; handleResetForm: (formItems: any[]) => void; handleValidateForm: (ckForm: any) => Promise<boolean>; handleInitForm: (items: any[]) => any; }; declare function UpResolver(): ComponentResolver; export { UpResolver, buttonEmits, buttonProps, useForm, useTranslate }; export type { ButtonEmits, ButtonProps };