icssoa 5 月之前
父節點
當前提交
a6e469b799

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 	"name": "cool-unix",
-	"version": "8.0.26",
+	"version": "8.0.27",
 	"license": "MIT",
 	"scripts": {
 		"build-ui": "node ./uni_modules/cool-ui/scripts/generate-types.js",

+ 1 - 1
uni_modules/cool-ui/components/cl-action-sheet/cl-action-sheet.uvue

@@ -119,7 +119,7 @@ function open(options: ClActionSheetOptions) {
 	config.description = options.description ?? "";
 
 	// 更新操作列表
-	config.list = options.list;
+	config.list = [...options.list] as ClActionSheetItem[];
 
 	// 取消按钮文本
 	config.cancelText = options.cancelText ?? t("取消");

+ 2 - 0
uni_modules/cool-ui/components/cl-calendar-select/props.ts

@@ -14,6 +14,8 @@ export type ClCalendarSelectProps = {
 	date?: string[];
 	mode?: ClCalendarMode;
 	dateConfig?: ClCalendarDateConfig[];
+	start: string;
+	end: string;
 	title?: string;
 	placeholder?: string;
 	showTrigger?: boolean;

+ 1 - 0
uni_modules/cool-ui/components/cl-footer/props.ts

@@ -3,6 +3,7 @@ import type { PassThroughProps } from "../../types";
 export type ClFooterPassThrough = {
 	className?: string;
 	content?: PassThroughProps;
+	wrapper?: PassThroughProps;
 };
 
 export type ClFooterProps = {

+ 1 - 0
uni_modules/cool-ui/components/cl-list-item/props.ts

@@ -4,6 +4,7 @@ import type { ClImageProps } from "../cl-image/props";
 
 export type ClListItemPassThrough = {
 	className?: string;
+	wrapper?: PassThroughProps;
 	inner?: PassThroughProps;
 	label?: PassThroughProps;
 	content?: PassThroughProps;

+ 5 - 0
uni_modules/cool-ui/components/cl-read-more/props.ts

@@ -2,7 +2,9 @@ import type { PassThroughProps } from "../../types";
 
 export type ClReadMorePassThrough = {
 	className?: string;
+	wrapper?: PassThroughProps;
 	content?: PassThroughProps;
+	contentText?: PassThroughProps;
 	mask?: PassThroughProps;
 	toggle?: PassThroughProps;
 };
@@ -11,10 +13,13 @@ export type ClReadMoreProps = {
 	className?: string;
 	pt?: ClReadMorePassThrough;
 	modelValue?: boolean;
+	content?: string;
 	height?: any;
 	expandText?: string;
 	collapseText?: string;
 	expandIcon?: string;
 	collapseIcon?: string;
 	disabled?: boolean;
+	showToggle?: boolean;
+	showMask?: boolean;
 };

+ 1 - 0
uni_modules/cool-ui/components/cl-topbar/props.ts

@@ -14,6 +14,7 @@ export type ClTopbarProps = {
 	color?: string;
 	backgroundColor?: string;
 	showBack?: boolean;
+	backable?: boolean;
 	backPath?: string;
 	backIcon?: string;
 	safeAreaTop?: boolean;

+ 11 - 6
uni_modules/cool-ui/components/cl-waterfall/cl-waterfall.uvue

@@ -31,7 +31,7 @@
 </template>
 
 <script setup lang="ts">
-import { assign } from "@/cool";
+import { assign, isNull } from "@/cool";
 import { computed, getCurrentInstance, nextTick, onMounted, ref, watch } from "vue";
 import { parsePt } from "@/cool";
 
@@ -86,9 +86,9 @@ const columns = ref<UTSJSONObject[][]>([]);
 /**
  * 获取各列的当前高度
  * 通过uni.createSelectorQuery查询DOM元素的实际高度
- * @returns Promise<number> 返回Promise对象
+ * @returns Promise<> 返回Promise对象
  */
-async function getHeight(): Promise<number> {
+async function getHeight(): Promise<void> {
 	// 等待DOM更新完成
 	await nextTick();
 
@@ -99,9 +99,14 @@ async function getHeight(): Promise<number> {
 			.selectAll(".cl-waterfall__column-inner")
 			.boundingClientRect()
 			.exec((rect) => {
-				// 提取每列的高度信息,如果获取失败则默认为0
-				heights.value = (rect[0] as NodeInfo[]).map((e) => e.height ?? 0);
-				resolve(1);
+				const nodes = rect[0] as NodeInfo[];
+
+				if (!isNull(nodes)) {
+					// 提取每列的高度信息,如果获取失败则默认为0
+					heights.value = nodes.map((e) => e.height ?? 0);
+				}
+
+				resolve();
 			});
 	});
 }