Parcourir la source

修复 cl-popup 关闭按钮在小程序端的兼容问题

icssoa il y a 5 mois
Parent
commit
4cc42eb1fe
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5 3
      uni_modules/cool-ui/components/cl-popup/cl-popup.uvue

+ 5 - 3
uni_modules/cool-ui/components/cl-popup/cl-popup.uvue

@@ -90,8 +90,10 @@
 								name="close-circle-fill"
 								:size="40"
 								:pt="{
-									className:
-										'absolute right-[24rpx] text-surface-400 dark:text-surface-50'
+									className: parseClass([
+										'absolute right-[24rpx] text-surface-400',
+										[isDark, 'text-surface-50']
+									])
 								}"
 								@tap="close"
 								@touchmove.stop
@@ -121,7 +123,7 @@
 
 <script lang="ts" setup>
 import { computed, reactive, ref, watch, type PropType } from "vue";
-import { getSafeAreaHeight, isAppIOS, parsePt, parseRpx } from "@/cool";
+import { getSafeAreaHeight, isAppIOS, parseClass, parsePt, parseRpx } from "@/cool";
 import type { ClPopupDirection, PassThroughProps } from "../../types";
 import { isDark, router } from "@/cool";
 import { config } from "../../config";