优化类型

This commit is contained in:
icssoa
2025-09-10 23:10:47 +08:00
parent 4f4275770d
commit 051469750c
11 changed files with 62 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
import type { ClCalendarDateConfig, ClCalendarMode } from "../../types";
import type { ClSelectTriggerPassThrough } from "../cl-select-trigger/props";
import type { ClPopupPassThrough } from "../cl-popup/props";
export type ClCalendarSelectPassThrough = {
trigger?: ClSelectTriggerPassThrough;
popup?: ClPopupPassThrough;
};
export type ClCalendarSelectProps = {
className?: string;
pt?: ClCalendarSelectPassThrough;
modelValue?: string | any;
date?: string[];
mode?: ClCalendarMode;
dateConfig?: ClCalendarDateConfig[];
title?: string;
placeholder?: string;
showTrigger?: boolean;
disabled?: boolean;
splitor?: string;
rangeSplitor?: string;
confirmText?: string;
showConfirm?: boolean;
cancelText?: string;
showCancel?: boolean;
};

View File

@@ -0,0 +1,5 @@
export type ClCalendarPickerProps = {
className?: string;
year?: number;
month?: number;
};

View File

@@ -10,6 +10,6 @@ export type ClDraggableProps = {
pt?: ClDraggablePassThrough;
modelValue?: UTSJSONObject[];
disabled?: boolean;
animation?: number;
columns?: number;
longPress?: boolean;
};

View File

@@ -1,5 +1,6 @@
import type { Justify, PassThroughProps } from "../../types";
import type { ClIconProps } from "../cl-icon/props";
import type { ClImageProps } from "../cl-image/props";
export type ClListItemPassThrough = {
className?: string;
@@ -7,6 +8,7 @@ export type ClListItemPassThrough = {
label?: PassThroughProps;
content?: PassThroughProps;
icon?: ClIconProps;
image?: ClImageProps;
collapse?: PassThroughProps;
};
@@ -14,6 +16,7 @@ export type ClListItemProps = {
className?: string;
pt?: ClListItemPassThrough;
icon?: string;
image?: string;
label?: string;
justify?: Justify;
arrow?: boolean;

View File

@@ -1,10 +1,14 @@
import type { PassThroughProps } from "../../types";
import type { ClIconProps } from "../cl-icon/props";
export type ClPaginationPassThrough = {
className?: string;
item?: PassThroughProps;
itemText?: PassThroughProps;
prev?: PassThroughProps;
prevIcon?: ClIconProps;
next?: PassThroughProps;
nextIcon?: ClIconProps;
};
export type ClPaginationProps = {

View File

@@ -6,4 +6,5 @@ export type ClSafeAreaProps = {
className?: string;
pt?: ClSafeAreaPassThrough;
type?: "top" | "bottom";
transparent?: boolean;
};

View File

@@ -18,6 +18,7 @@ export type ClTextProps = {
maskEnd?: number;
maskChar?: string;
ellipsis?: boolean;
lines?: number;
selectable?: boolean;
space?: "ensp" | "emsp" | "nbsp";
decode?: boolean;

View File

@@ -2,8 +2,9 @@ import type { ClTreeItem, PassThroughProps } from "../../types";
import type { ClIconProps } from "../cl-icon/props";
export type ClTreeItemPassThrough = {
className?: string;
wrapper?: PassThroughProps;
item?: PassThroughProps;
itemChecked?: PassThroughProps;
itemWrapper?: PassThroughProps;
expand?: PassThroughProps;
expandIcon?: ClIconProps;
checkbox?: PassThroughProps;

View File

@@ -1,11 +1,17 @@
import type { ClTreeItem, ClTreeNodeInfo } from "../../types";
export type ClTreePassThrough = {
className?: string;
};
export type ClTreeProps = {
className?: string;
pt?: any;
pt?: ClTreePassThrough;
modelValue?: any | any;
list?: ClTreeItem[];
icon?: string;
expandIcon?: string;
showCheckbox?: boolean;
checkStrictly?: boolean;
checkable?: boolean;
multiple?: boolean;
};

View File

@@ -1,4 +1,4 @@
import type { ClActionSheetItem, ClActionSheetOptions, PassThroughProps, Type, ClButtonType, Size, ClListViewItem, ClFilterItemType, ClSelectOption, ClFormLabelPosition, ClFormRule, ClFormValidateError, ClInputType, ClListItem, Justify, ClListViewGroup, ClListViewVirtualItem, ClListViewRefresherStatus, ClConfirmAction, ClConfirmOptions, ClToastOptions, ClPopupDirection, ClQrcodeMode, ClSelectDateShortcut, ClTabsItem, ClTextType, ClTreeItem, ClTreeNodeInfo, ClUploadItem } from "./types";
import type { ClActionSheetItem, ClActionSheetOptions, PassThroughProps, Type, ClButtonType, Size, ClCalendarDateConfig, ClCalendarMode, ClListViewItem, ClFilterItemType, ClSelectOption, ClFormLabelPosition, ClFormRule, ClFormValidateError, ClInputType, ClListItem, Justify, ClListViewGroup, ClListViewVirtualItem, ClListViewRefresherStatus, ClConfirmAction, ClConfirmOptions, ClToastOptions, ClPopupDirection, ClQrcodeMode, ClSelectDateShortcut, ClTabsItem, ClTextType, ClTreeItem, ClTreeNodeInfo, ClUploadItem } from "./types";
import { type UiInstance } from "./hooks";
import { type QrcodeOptions } from "./draw";
@@ -8,6 +8,9 @@ import type { ClBackTopProps } from "./components/cl-back-top/props";
import type { ClBadgeProps, ClBadgePassThrough } from "./components/cl-badge/props";
import type { ClBannerProps, ClBannerPassThrough } from "./components/cl-banner/props";
import type { ClButtonProps, ClButtonPassThrough } from "./components/cl-button/props";
import type { ClCalendarProps, ClCalendarPassThrough } from "./components/cl-calendar/props";
import type { ClCalendarPickerProps } from "./components/cl-calendar-picker/props";
import type { ClCalendarSelectProps, ClCalendarSelectPassThrough } from "./components/cl-calendar-select/props";
import type { ClCascaderProps, ClCascaderPassThrough } from "./components/cl-cascader/props";
import type { ClCheckboxProps, ClCheckboxPassThrough } from "./components/cl-checkbox/props";
import type { ClColProps, ClColPassThrough } from "./components/cl-col/props";
@@ -67,7 +70,7 @@ import type { ClTimelineProps, ClTimelinePassThrough } from "./components/cl-tim
import type { ClTimelineItemProps, ClTimelineItemPassThrough } from "./components/cl-timeline-item/props";
import type { ClToastProps } from "./components/cl-toast/props";
import type { ClTopbarProps, ClTopbarPassThrough } from "./components/cl-topbar/props";
import type { ClTreeProps } from "./components/cl-tree/props";
import type { ClTreeProps, ClTreePassThrough } from "./components/cl-tree/props";
import type { ClTreeItemProps, ClTreeItemPassThrough } from "./components/cl-tree-item/props";
import type { ClUploadProps, ClUploadPassThrough } from "./components/cl-upload/props";
import type { ClWaterfallProps, ClWaterfallPassThrough } from "./components/cl-waterfall/props";
@@ -83,6 +86,9 @@ declare module "vue" {
"cl-badge": (typeof import('./components/cl-badge/cl-badge.uvue')['default']) & import('vue').DefineComponent<ClBadgeProps>;
"cl-banner": (typeof import('./components/cl-banner/cl-banner.uvue')['default']) & import('vue').DefineComponent<ClBannerProps>;
"cl-button": (typeof import('./components/cl-button/cl-button.uvue')['default']) & import('vue').DefineComponent<ClButtonProps>;
"cl-calendar": (typeof import('./components/cl-calendar/cl-calendar.uvue')['default']) & import('vue').DefineComponent<ClCalendarProps>;
"cl-calendar-picker": (typeof import('./components/cl-calendar-picker/cl-calendar-picker.uvue')['default']) & import('vue').DefineComponent<ClCalendarPickerProps>;
"cl-calendar-select": (typeof import('./components/cl-calendar-select/cl-calendar-select.uvue')['default']) & import('vue').DefineComponent<ClCalendarSelectProps>;
"cl-cascader": (typeof import('./components/cl-cascader/cl-cascader.uvue')['default']) & import('vue').DefineComponent<ClCascaderProps>;
"cl-checkbox": (typeof import('./components/cl-checkbox/cl-checkbox.uvue')['default']) & import('vue').DefineComponent<ClCheckboxProps>;
"cl-col": (typeof import('./components/cl-col/cl-col.uvue')['default']) & import('vue').DefineComponent<ClColProps>;

View File

@@ -107,6 +107,7 @@ declare type ClCollapseComponentPublicInstance = {
};
declare type ClCountdownComponentPublicInstance = {
next: () => void;
start: () => void;
stop: () => void;
done: () => void;