From 7791c47483a11bc10dd2fb21994c451d19fac61f Mon Sep 17 00:00:00 2001 From: icssoa <615206459@qq.com> Date: Wed, 3 Sep 2025 19:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=20ios=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cl-action-sheet/cl-action-sheet.uvue | 2 +- .../cool-ui/components/cl-badge/cl-badge.uvue | 2 +- .../cool-ui/components/cl-col/cl-col.uvue | 3 +- .../cl-float-view/cl-float-view.uvue | 15 +- .../cl-input-number/cl-input-number.uvue | 4 +- .../cl-keyboard-car/cl-keyboard-car.uvue | 2 +- .../cl-keyboard-number.uvue | 157 ++++++++++-------- .../cl-keyboard-password.uvue | 2 +- .../components/cl-list-item/cl-list-item.uvue | 4 +- .../cl-picker-view/cl-picker-view.uvue | 6 +- .../components/cl-qrcode/cl-qrcode.uvue | 4 +- .../cool-ui/components/cl-row/cl-row.uvue | 2 +- .../components/cl-safe-area/cl-safe-area.uvue | 20 +-- .../cool-ui/components/cl-sign/cl-sign.uvue | 5 +- .../cl-slide-verify/cl-slide-verify.uvue | 23 ++- .../components/cl-slider/cl-slider.uvue | 47 +++--- .../components/cl-switch/cl-switch.uvue | 4 +- .../components/cl-tree-item/cl-tree-item.uvue | 5 +- 18 files changed, 168 insertions(+), 139 deletions(-) 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 @@ - - 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