优化类型

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;
};