diff --git a/uni_modules/cool-ui/components/cl-action-sheet/cl-action-sheet.uvue b/uni_modules/cool-ui/components/cl-action-sheet/cl-action-sheet.uvue
index cf1d805..8e4f732 100644
--- a/uni_modules/cool-ui/components/cl-action-sheet/cl-action-sheet.uvue
+++ b/uni_modules/cool-ui/components/cl-action-sheet/cl-action-sheet.uvue
@@ -30,7 +30,7 @@
v-for="(item, index) in config.list"
:key="index"
:hover-class="`${isDark ? '!bg-surface-900' : '!bg-surface-50'}`"
- :hover-stay-time="100"
+ :hover-stay-time="250"
@tap="onItemTap(item)"
>
diff --git a/uni_modules/cool-ui/components/cl-badge/cl-badge.uvue b/uni_modules/cool-ui/components/cl-badge/cl-badge.uvue
index 530fed4..5fc66a1 100644
--- a/uni_modules/cool-ui/components/cl-badge/cl-badge.uvue
+++ b/uni_modules/cool-ui/components/cl-badge/cl-badge.uvue
@@ -17,7 +17,7 @@
>
diff --git a/uni_modules/cool-ui/components/cl-col/cl-col.uvue b/uni_modules/cool-ui/components/cl-col/cl-col.uvue
index 9bdcde1..f2d6e55 100644
--- a/uni_modules/cool-ui/components/cl-col/cl-col.uvue
+++ b/uni_modules/cool-ui/components/cl-col/cl-col.uvue
@@ -74,8 +74,7 @@ const padding = computed(() => (parent == null ? "0" : parseRpx(parent.gutter /
@use "sass:math";
.cl-col {
- @apply w-full;
- overflow: visible;
+ @apply w-full overflow-visible;
}
@for $i from 1 through 24 {
diff --git a/uni_modules/cool-ui/components/cl-float-view/cl-float-view.uvue b/uni_modules/cool-ui/components/cl-float-view/cl-float-view.uvue
index c4dd254..36bb609 100644
--- a/uni_modules/cool-ui/components/cl-float-view/cl-float-view.uvue
+++ b/uni_modules/cool-ui/components/cl-float-view/cl-float-view.uvue
@@ -1,6 +1,9 @@
{
// 设置高度
style["height"] = `${props.size}px`;
- // 非拖拽状态下添加过渡动画,使移动更平滑
- if (!position.isDragging) {
- style["transition-duration"] = "300ms";
- }
-
return style;
});
@@ -279,6 +277,11 @@ function onTouchEnd() {
diff --git a/uni_modules/cool-ui/components/cl-input-number/cl-input-number.uvue b/uni_modules/cool-ui/components/cl-input-number/cl-input-number.uvue
index 55c5967..527d874 100644
--- a/uni_modules/cool-ui/components/cl-input-number/cl-input-number.uvue
+++ b/uni_modules/cool-ui/components/cl-input-number/cl-input-number.uvue
@@ -18,7 +18,7 @@
pt.op?.minus?.className
]"
hover-class="!bg-surface-200"
- :hover-stay-time="50"
+ :hover-stay-time="250"
:style="{
height: parseRpx(size!),
width: parseRpx(size!)
@@ -66,7 +66,7 @@
pt.op?.plus?.className
]"
hover-class="!bg-primary-600"
- :hover-stay-time="50"
+ :hover-stay-time="250"
:style="{
height: parseRpx(size!),
width: parseRpx(size!)
diff --git a/uni_modules/cool-ui/components/cl-keyboard-car/cl-keyboard-car.uvue b/uni_modules/cool-ui/components/cl-keyboard-car/cl-keyboard-car.uvue
index 7ae813e..515fa0d 100644
--- a/uni_modules/cool-ui/components/cl-keyboard-car/cl-keyboard-car.uvue
+++ b/uni_modules/cool-ui/components/cl-keyboard-car/cl-keyboard-car.uvue
@@ -64,7 +64,7 @@
marginRight: index == row.length - 1 ? '0' : '10rpx'
}"
hover-class="opacity-50"
- :hover-stay-time="50"
+ :hover-stay-time="250"
@touchstart.stop="onCommand(item)"
>
diff --git a/uni_modules/cool-ui/components/cl-keyboard-number/cl-keyboard-number.uvue b/uni_modules/cool-ui/components/cl-keyboard-number/cl-keyboard-number.uvue
index 31d5dd8..09cedba 100644
--- a/uni_modules/cool-ui/components/cl-keyboard-number/cl-keyboard-number.uvue
+++ b/uni_modules/cool-ui/components/cl-keyboard-number/cl-keyboard-number.uvue
@@ -42,49 +42,89 @@
-
-
-
+
+
+
+
+
+
+
+
+ {{ confirmText }}
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
-
- {{ confirmText }}
-
-
{{ item }}{{ confirmText }}
-
+
@@ -99,7 +139,7 @@ import type { PassThroughProps } from "../../types";
import type { ClPopupProps } from "../cl-popup/props";
import { ref, computed, watch, type PropType } from "vue";
import { $t, t } from "@/locale";
-import { isDark, parseClass, parsePt } from "@/cool";
+import { isAppIOS, isDark, parseClass, parsePt } from "@/cool";
import { vibrate } from "@/uni_modules/cool-vibrate";
defineOptions({
@@ -193,38 +233,26 @@ const maxlength = computed(() => {
// 数字键盘的按键列表,包含数字、删除、00和小数点
const list = computed(() => {
- const arr = [
- "1",
- "2",
- "3",
- "delete",
- "4",
- "5",
- "6",
- "",
- "7",
- "8",
- "9",
- "",
- "00",
- "0",
- "",
- "confirm"
- ];
+ const arr = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "00", "0", ""];
// 数字键盘显示为小数点 "."
if (props.type == "digit") {
- arr[14] = ".";
+ arr[11] = ".";
}
// 身份证键盘显示为 "X"
if (props.type == "idcard") {
- arr[14] = "X";
+ arr[11] = "X";
}
return arr;
});
+// 操作按钮列表
+const opList = computed(() => {
+ return ["delete", "confirm"];
+});
+
// 打开键盘弹窗
function open() {
visible.value = true;
@@ -238,10 +266,12 @@ function close() {
// 处理键盘按键点击事件
function onCommand(key: string) {
// 震动
- vibrate(1);
+ try {
+ vibrate(1);
+ } catch (error) {}
// 确认按钮逻辑
- if (key == "confirm") {
+ if (key == "confirm" || key == "_confirm") {
if (value.value == "") {
ui.showToast({
message: t("请输入内容")
@@ -364,14 +394,17 @@ defineExpose({
}
&__list {
- @apply relative;
+ @apply relative overflow-visible;
+ }
+
+ &__op {
+ @apply flex flex-col h-full;
}
&__item {
- @apply flex items-center justify-center rounded-xl bg-white;
+ @apply flex items-center justify-center rounded-xl bg-white overflow-visible;
height: 100rpx;
margin-top: 10rpx;
- overflow: visible;
&.is-dark {
@apply bg-surface-800;
@@ -386,14 +419,8 @@ defineExpose({
}
&.is-keycode-confirm {
- @apply bg-transparent relative;
- }
-
- &-confirm {
@apply flex flex-col items-center justify-center;
- @apply bg-primary-500 absolute w-full rounded-xl;
- height: 320rpx;
- top: -220rpx;
+ @apply bg-primary-500 rounded-xl flex-1;
}
&.is-empty {
diff --git a/uni_modules/cool-ui/components/cl-keyboard-password/cl-keyboard-password.uvue b/uni_modules/cool-ui/components/cl-keyboard-password/cl-keyboard-password.uvue
index 5a3199a..8d4439d 100644
--- a/uni_modules/cool-ui/components/cl-keyboard-password/cl-keyboard-password.uvue
+++ b/uni_modules/cool-ui/components/cl-keyboard-password/cl-keyboard-password.uvue
@@ -63,7 +63,7 @@
marginRight: index == row.length - 1 ? '0' : '10rpx'
}"
hover-class="opacity-50"
- :hover-stay-time="50"
+ :hover-stay-time="250"
@touchstart.stop="onCommand(item)"
>
diff --git a/uni_modules/cool-ui/components/cl-list-item/cl-list-item.uvue b/uni_modules/cool-ui/components/cl-list-item/cl-list-item.uvue
index 7c08439..9e30d7c 100644
--- a/uni_modules/cool-ui/components/cl-list-item/cl-list-item.uvue
+++ b/uni_modules/cool-ui/components/cl-list-item/cl-list-item.uvue
@@ -109,7 +109,7 @@ import {
useSlots,
type PropType
} from "vue";
-import { isDark, isHarmony, parseClass, parsePt } from "@/cool";
+import { isAppIOS, isDark, isHarmony, parseClass, parsePt } from "@/cool";
import type { Justify, PassThroughProps } from "../../types";
import type { ClIconProps } from "../cl-icon/props";
@@ -388,7 +388,7 @@ onMounted(() => {
() => {
initSwipe();
},
- isHarmony() ? 50 : 0
+ isHarmony() || isAppIOS() ? 50 : 0
);
});
diff --git a/uni_modules/cool-ui/components/cl-picker-view/cl-picker-view.uvue b/uni_modules/cool-ui/components/cl-picker-view/cl-picker-view.uvue
index ed1ae07..fe2bbdf 100644
--- a/uni_modules/cool-ui/components/cl-picker-view/cl-picker-view.uvue
+++ b/uni_modules/cool-ui/components/cl-picker-view/cl-picker-view.uvue
@@ -56,7 +56,7 @@
-
-
diff --git a/uni_modules/cool-ui/components/cl-sign/cl-sign.uvue b/uni_modules/cool-ui/components/cl-sign/cl-sign.uvue
index abe6a5d..70de1ee 100644
--- a/uni_modules/cool-ui/components/cl-sign/cl-sign.uvue
+++ b/uni_modules/cool-ui/components/cl-sign/cl-sign.uvue
@@ -317,14 +317,15 @@ function initCanvas() {
}
onMounted(() => {
- initCanvas();
-
watch(
computed(() => [props.width, props.height]),
() => {
nextTick(() => {
initCanvas();
});
+ },
+ {
+ immediate: true
}
);
});
diff --git a/uni_modules/cool-ui/components/cl-slide-verify/cl-slide-verify.uvue b/uni_modules/cool-ui/components/cl-slide-verify/cl-slide-verify.uvue
index 8e933b3..ad7e6f6 100644
--- a/uni_modules/cool-ui/components/cl-slide-verify/cl-slide-verify.uvue
+++ b/uni_modules/cool-ui/components/cl-slide-verify/cl-slide-verify.uvue
@@ -45,7 +45,8 @@
:class="[
{
'cl-slide-verify__progress--success': isSuccess,
- 'cl-slide-verify__progress--fail': isFail
+ 'cl-slide-verify__progress--fail': isFail,
+ 'no-dragging': !isDragging
},
pt.progress?.className
]"
@@ -60,7 +61,8 @@
'cl-slide-verify__slider--active': isDragging,
'cl-slide-verify__slider--success': isSuccess,
'cl-slide-verify__slider--fail': isFail,
- 'cl-slide-verify__slider--dark': isDark
+ 'cl-slide-verify__slider--dark': isDark,
+ 'no-dragging': !isDragging
},
pt.slider?.className
]"
@@ -268,10 +270,6 @@ const progressStyle = computed(() => {
width += props.size / 2;
}
style["width"] = width + "px"; // 设置宽度
- if (!isDragging.value) {
- // 非拖动时添加过渡动画
- style["transition-duration"] = "300ms";
- }
return style; // 返回样式对象
});
@@ -282,10 +280,6 @@ const sliderStyle = computed(() => {
height: props.size + "px", // 滑块高度
width: props.size + "px" // 滑块宽度
};
- if (!isDragging.value) {
- // 非拖动时添加过渡动画
- style["transition-duration"] = "300ms";
- }
return style; // 返回样式对象
});
@@ -423,6 +417,11 @@ defineExpose({
.cl-slide-verify {
@apply relative rounded-lg w-full flex flex-col items-center justify-center;
+ .no-dragging {
+ @apply duration-300;
+ transition-property: left;
+ }
+
&__track {
@apply relative w-full h-full;
@apply bg-surface-100 rounded-lg;
@@ -445,7 +444,7 @@ defineExpose({
}
&__progress {
- @apply absolute left-0 top-0 h-full;
+ @apply absolute left-0 top-0 h-full transition-none;
@apply bg-primary-100;
&--success {
@@ -458,7 +457,7 @@ defineExpose({
}
&__slider {
- @apply absolute top-1/2 left-0 z-20;
+ @apply absolute top-1/2 left-0 z-20 transition-none;
@apply bg-white rounded-lg;
@apply flex items-center justify-center;
@apply border border-surface-200;
diff --git a/uni_modules/cool-ui/components/cl-slider/cl-slider.uvue b/uni_modules/cool-ui/components/cl-slider/cl-slider.uvue
index 7cdcc1a..6cc7e8b 100644
--- a/uni_modules/cool-ui/components/cl-slider/cl-slider.uvue
+++ b/uni_modules/cool-ui/components/cl-slider/cl-slider.uvue
@@ -26,30 +26,30 @@
:class="[pt.progress?.className]"
:style="progressStyle"
>
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
import { computed, ref, watch } from "vue";
-import { isDark, parseClass, parsePt, rpx2px } from "@/cool";
+import { isAppIOS, isDark, parseClass, parsePt, rpx2px } from "@/cool";
import type { PassThroughProps } from "../../types";
import { vibrate } from "@/uni_modules/cool-vibrate";
import { useForm } from "../../hooks";
@@ -145,7 +145,7 @@ const rect = computed(() => {
width: width + "rpx",
size: size + "rpx",
left: left + "rpx",
- translateX: rpx2px(translateX) + "px"
+ translateX: isAppIOS() ? rpx2px(translateX) + "px" : `${translateX}rpx`
};
});
diff --git a/uni_modules/cool-ui/components/cl-tree-item/cl-tree-item.uvue b/uni_modules/cool-ui/components/cl-tree-item/cl-tree-item.uvue
index 8043a28..eeb23a8 100644
--- a/uni_modules/cool-ui/components/cl-tree-item/cl-tree-item.uvue
+++ b/uni_modules/cool-ui/components/cl-tree-item/cl-tree-item.uvue
@@ -6,7 +6,10 @@
{
'is-expand': hover,
'is-dark': isDark,
- 'is-checked': item.isChecked == true && ClTree?.checkable == true,
+ 'is-checked':
+ item.isChecked == true &&
+ ClTree?.checkable == true &&
+ ClTree?.multiple == false,
'is-half-checked': item.isHalfChecked,
'is-disabled': item.disabled,
'is-multiple': ClTree?.multiple