This commit is contained in:
icssoa
2025-08-03 15:23:44 +08:00
parent 01ea7b3e89
commit 914114aa11
18 changed files with 73 additions and 70 deletions

View File

@@ -2,25 +2,18 @@ import type { PassThroughProps } from "../../types";
export type ClCropperPassThrough = {
className?: string;
inner?: PassThroughProps;
image?: PassThroughProps;
op?: PassThroughProps;
opItem?: PassThroughProps;
mask?: PassThroughProps;
cropBox?: PassThroughProps;
button?: PassThroughProps;
};
export type ClCropperProps = {
className?: string;
pt?: ClCropperPassThrough;
src?: string;
width?: string | number;
height?: string | number;
cropWidth?: string | number;
cropHeight?: string | number;
cropWidth?: number;
cropHeight?: number;
maxScale?: number;
showButtons?: boolean;
quality?: number;
format?: "jpg" | "png";
disabled?: boolean;
canResize?: boolean; // 是否可以自定义裁剪框大小
canFlip?: boolean; // 是否显示翻转功能
};
resizable?: boolean;
};

View File

@@ -14,16 +14,23 @@
<cl-text
v-if="showText"
:pt="{
className: parseClass({
'!text-surface-400': disabled
})
className: parseClass([
{
'!text-surface-400': disabled
},
pt.text?.className
])
}"
ellipsis
>
{{ text }}
</cl-text>
<text class="cl-select-trigger__placeholder" v-else>
<text
class="cl-select-trigger__placeholder"
:class="[pt.placeholder?.className]"
v-else
>
{{ placeholder }}
</text>
</view>
@@ -53,6 +60,7 @@ import { computed } from "vue";
import type { ClIconProps } from "../cl-icon/props";
import { isDark, parseClass, parsePt } from "@/cool";
import { t } from "@/locale";
import type { PassThroughProps } from "../../types";
defineOptions({
name: "cl-select-trigger"
@@ -98,6 +106,8 @@ const emit = defineEmits(["clear"]);
type PassThrough = {
className?: string; // 根元素类名
icon?: ClIconProps; // 图标样式
placeholder?: PassThroughProps; // 占位符样式
text?: PassThroughProps; // 文本样式
};
// 解析透传样式配置

View File

@@ -1,8 +1,11 @@
import type { ClIconProps } from "../cl-icon/props";
import type { PassThroughProps } from "../../types";
export type ClSelectTriggerPassThrough = {
className?: string;
icon?: ClIconProps;
placeholder?: PassThroughProps;
text?: PassThroughProps;
};
export type ClSelectTriggerProps = {

View File

@@ -14,5 +14,4 @@ export type ClSignProps = {
minStrokeWidth?: number;
maxStrokeWidth?: number;
velocitySensitivity?: number;
autoRotate?: boolean;
};

View File

@@ -12,6 +12,7 @@ import type { ClCheckboxProps, ClCheckboxPassThrough } from "./components/cl-che
import type { ClColProps, ClColPassThrough } from "./components/cl-col/props";
import type { ClCollapseProps, ClCollapsePassThrough } from "./components/cl-collapse/props";
import type { ClCountdownProps, ClCountdownPassThrough } from "./components/cl-countdown/props";
import type { ClCropperProps, ClCropperPassThrough } from "./components/cl-cropper/props";
import type { ClDraggableProps, ClDraggablePassThrough } from "./components/cl-draggable/props";
import type { ClFloatViewProps } from "./components/cl-float-view/props";
import type { ClFooterProps, ClFooterPassThrough } from "./components/cl-footer/props";
@@ -79,6 +80,7 @@ declare module "vue" {
"cl-col": (typeof import('./components/cl-col/cl-col.uvue')['default']) & import('vue').DefineComponent<ClColProps>;
"cl-collapse": (typeof import('./components/cl-collapse/cl-collapse.uvue')['default']) & import('vue').DefineComponent<ClCollapseProps>;
"cl-countdown": (typeof import('./components/cl-countdown/cl-countdown.uvue')['default']) & import('vue').DefineComponent<ClCountdownProps>;
"cl-cropper": (typeof import('./components/cl-cropper/cl-cropper.uvue')['default']) & import('vue').DefineComponent<ClCropperProps>;
"cl-draggable": (typeof import('./components/cl-draggable/cl-draggable.uvue')['default']) & import('vue').DefineComponent<ClDraggableProps>;
"cl-float-view": (typeof import('./components/cl-float-view/cl-float-view.uvue')['default']) & import('vue').DefineComponent<ClFloatViewProps>;
"cl-footer": (typeof import('./components/cl-footer/cl-footer.uvue')['default']) & import('vue').DefineComponent<ClFooterProps>;