feat:设备使用记录
This commit is contained in:
4
uview-plus/types/comps/actionSheet.d.ts
vendored
4
uview-plus/types/comps/actionSheet.d.ts
vendored
@@ -26,7 +26,7 @@ declare interface ActionSheetProps {
|
||||
/**
|
||||
* 点击某个菜单项时是否关闭弹窗
|
||||
*/
|
||||
closeOnClickAction?: string
|
||||
closeOnClickAction?: boolean
|
||||
/**
|
||||
* 是否开启底部安全区适配
|
||||
* @default false
|
||||
@@ -78,7 +78,7 @@ declare interface ActionSheetProps {
|
||||
/**
|
||||
* 点击ActionSheet列表项时触发
|
||||
*/
|
||||
onSelect?: () => any
|
||||
onSelect?: (e: any) => any
|
||||
/**
|
||||
* 点击取消按钮时触发
|
||||
*/
|
||||
|
||||
2
uview-plus/types/comps/modal.d.ts
vendored
2
uview-plus/types/comps/modal.d.ts
vendored
@@ -100,7 +100,7 @@ declare interface ModalSlots {
|
||||
/**
|
||||
* 传入自定义按钮,用于在微信小程序弹窗通过按钮授权的场景
|
||||
*/
|
||||
['confirm-button']?: () => any
|
||||
['confirmButton']?: () => any
|
||||
}
|
||||
|
||||
declare interface _Modal {
|
||||
|
||||
5
uview-plus/types/comps/navbar.d.ts
vendored
5
uview-plus/types/comps/navbar.d.ts
vendored
@@ -47,6 +47,11 @@ declare interface NavbarProps {
|
||||
* @default"#fff
|
||||
*/
|
||||
bgColor?: string
|
||||
/**
|
||||
* 状态栏背景颜色 不写同导航栏背景设置
|
||||
* @default bgColor
|
||||
*/
|
||||
statusBarBgColor?: string
|
||||
/**
|
||||
* 导航栏标题的最大宽度,内容超出会以省略号隐藏,单位rpx
|
||||
* @default "400rpx"
|
||||
|
||||
77
uview-plus/types/comps/qrcode.d.ts
vendored
Normal file
77
uview-plus/types/comps/qrcode.d.ts
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
import {AllowedComponentProps, VNodeProps} from './_common'
|
||||
|
||||
declare interface QrcodeProps {
|
||||
/**
|
||||
* 实例ID字符串(必须)
|
||||
*/
|
||||
cid: string
|
||||
|
||||
/**
|
||||
* 二维码大小
|
||||
* @default 200
|
||||
*/
|
||||
size?: number
|
||||
|
||||
/**
|
||||
* 二维码内容
|
||||
*/
|
||||
val: string
|
||||
|
||||
/**
|
||||
* 背景色
|
||||
* @default "#ffffff"
|
||||
*/
|
||||
background?: string
|
||||
|
||||
/**
|
||||
* 前景色
|
||||
* @default "#000000"
|
||||
*/
|
||||
foreground?: string
|
||||
|
||||
/**
|
||||
* 二维码中间图标
|
||||
* @default "#000000"
|
||||
*/
|
||||
icon?: string
|
||||
|
||||
/**
|
||||
* 显示加载状态
|
||||
* @default true
|
||||
*/
|
||||
showLoading?: boolean
|
||||
|
||||
/**
|
||||
* 加载中提示语
|
||||
* @default "二维码生成中"
|
||||
*/
|
||||
loadingText?: string
|
||||
|
||||
/**
|
||||
* 使用根节点的宽高 设置为true会导致size失效
|
||||
* @default false
|
||||
*/
|
||||
useRootHeightAndWidth: boolean
|
||||
|
||||
/**
|
||||
* 二维码生成成功回调事件
|
||||
*/
|
||||
result?: () => any
|
||||
|
||||
/**
|
||||
* 长按触发事件
|
||||
* @param url 二维码本地生成url
|
||||
*/
|
||||
longpressCallback?: (url: string) => any
|
||||
|
||||
}
|
||||
|
||||
declare interface _Qrcode {
|
||||
new(): {
|
||||
$props: AllowedComponentProps &
|
||||
VNodeProps &
|
||||
QrcodeProps
|
||||
}
|
||||
}
|
||||
|
||||
export declare const Qrcode: _Qrcode
|
||||
8
uview-plus/types/comps/radio.d.ts
vendored
8
uview-plus/types/comps/radio.d.ts
vendored
@@ -60,9 +60,13 @@ declare interface RadioProps {
|
||||
|
||||
declare interface RadioSlots {
|
||||
/**
|
||||
* 自定义修改label内容
|
||||
* 自定义icon内容
|
||||
*/
|
||||
['default']?: () => any
|
||||
['icon']?: () => any
|
||||
/**
|
||||
* 自定义label内容
|
||||
*/
|
||||
['label']?: () => any
|
||||
}
|
||||
|
||||
declare interface _Radio {
|
||||
|
||||
13
uview-plus/types/comps/search.d.ts
vendored
13
uview-plus/types/comps/search.d.ts
vendored
@@ -89,6 +89,11 @@ declare interface SearchProps {
|
||||
* @default "search"
|
||||
*/
|
||||
searchIcon?: string
|
||||
/**
|
||||
* 输入框图标位置,left-左边,right-右边
|
||||
* @default "left"
|
||||
*/
|
||||
iconPosition?: 'left' | 'right'
|
||||
/**
|
||||
* 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30rpx"、"30rpx 20rpx"等写法
|
||||
* @default "0"
|
||||
@@ -156,11 +161,19 @@ declare interface SearchProps {
|
||||
onClickIcon?: () => any
|
||||
}
|
||||
|
||||
declare interface SearchSlots {
|
||||
/**
|
||||
* 修改输入框区域内部右侧内容 类似于左侧图标区域
|
||||
*/
|
||||
['inputRight']?: () => any
|
||||
}
|
||||
|
||||
declare interface _Search {
|
||||
new (): {
|
||||
$props: AllowedComponentProps &
|
||||
VNodeProps &
|
||||
SearchProps
|
||||
$slots: SearchSlots
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
16
uview-plus/types/comps/subsection.d.ts
vendored
16
uview-plus/types/comps/subsection.d.ts
vendored
@@ -46,6 +46,22 @@ declare interface SubsectionProps {
|
||||
* @default "name"
|
||||
*/
|
||||
keyName?: string
|
||||
|
||||
/**
|
||||
* 从`list`元素对象中读取激活时的颜色 如果存在字段 优先级大于 activeColor
|
||||
* @default activeColorKey
|
||||
*/
|
||||
activeColorKeyName?: string
|
||||
/**
|
||||
* 从`list`元素对象中读取未激活时的颜色 如果存在字段 优先级大于 inactiveColor
|
||||
* @default inactiveColorKey
|
||||
*/
|
||||
inactiveColorKeyName?: string
|
||||
/**
|
||||
* 是否禁用
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean
|
||||
/**
|
||||
* 分段器选项发生改变时触发
|
||||
* @param index 选项的index索引值,从0开始
|
||||
|
||||
6
uview-plus/types/comps/toast.d.ts
vendored
6
uview-plus/types/comps/toast.d.ts
vendored
@@ -1,6 +1,10 @@
|
||||
import { AllowedComponentProps, VNodeProps } from './_common'
|
||||
|
||||
declare interface ToastProps {
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
zIndex?: string | number
|
||||
/**
|
||||
* 是否加载中
|
||||
* @default false
|
||||
@@ -43,7 +47,7 @@ declare interface _ToastRef {
|
||||
/**
|
||||
* 显示toast,如需一进入页面就显示toast,请在onReady生命周期调用
|
||||
*/
|
||||
show: () => void
|
||||
show: (options: ToastProps) => void
|
||||
}
|
||||
|
||||
declare interface _Toast {
|
||||
|
||||
41
uview-plus/types/comps/upload.d.ts
vendored
41
uview-plus/types/comps/upload.d.ts
vendored
@@ -1,6 +1,33 @@
|
||||
import { AllowedComponentProps, VNodeProps } from './_common'
|
||||
import { ImageMode } from './image';
|
||||
|
||||
type BaseFileInfo = {
|
||||
type: string
|
||||
url: string
|
||||
name: string
|
||||
size: number
|
||||
file: File
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
type ImageFileInfo = BaseFileInfo & {
|
||||
type: 'image'
|
||||
thumb: string
|
||||
}
|
||||
|
||||
type VideoFileInfo = BaseFileInfo & {
|
||||
type: 'video'
|
||||
thumb: string
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
|
||||
type MediaFileInfo = BaseFileInfo & {
|
||||
thumb: string
|
||||
}
|
||||
|
||||
type FileInfo = BaseFileInfo | ImageFileInfo | VideoFileInfo | MediaFileInfo
|
||||
|
||||
declare interface UploadProps {
|
||||
/**
|
||||
* 接受的文件类型,file只支持H5(只有微信小程序才支持把accept配置为all、media)
|
||||
@@ -12,6 +39,10 @@ declare interface UploadProps {
|
||||
* @default ["album", "camera"]
|
||||
*/
|
||||
capture?: 'album' | 'camera' | ('album' | 'camera')[]
|
||||
/**
|
||||
* 选择文件的后缀名,暂只支持.zip、.png等,不支持application/msword等值
|
||||
*/
|
||||
extension?: string [];
|
||||
/**
|
||||
* 当accept为video时生效,是否压缩视频,默认为true
|
||||
* @default true
|
||||
@@ -131,6 +162,11 @@ declare interface UploadProps {
|
||||
onDelete?: (index, file, name) => any
|
||||
}
|
||||
|
||||
type ChooseFileParams = Pick<
|
||||
UploadProps,
|
||||
'accept' | 'multiple' | 'capture' | 'compressed' | 'maxDuration' | 'sizeType' | 'camera' | 'maxCount' | 'extension'
|
||||
>;
|
||||
|
||||
declare interface UploadSlots {
|
||||
/**
|
||||
* 自定义上传样式
|
||||
@@ -147,6 +183,11 @@ declare interface _UploadRef {
|
||||
* 读取前的处理函数
|
||||
*/
|
||||
beforeRead: (file, lists, name) => any
|
||||
/**
|
||||
* 触发文件选择器
|
||||
*/
|
||||
chooseFile(params: ChooseFileParams & { multiple: true }): Promise<FileInfo[]>;
|
||||
chooseFile(params?: ChooseFileParams & { multiple?: false }): Promise<FileInfo>;
|
||||
}
|
||||
|
||||
declare interface _Upload {
|
||||
|
||||
Reference in New Issue
Block a user