فهرست منبع

添加 cl-marquee 跑马灯组件

icssoa 6 ماه پیش
والد
کامیت
742e67bd5f
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      uni_modules/cool-ui/components/cl-marquee/cl-marquee.uvue

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

@@ -88,8 +88,6 @@ const props = defineProps({
 	}
 });
 
-const emit = defineEmits(["item-click"]);
-
 // 透传属性类型定义
 type PassThrough = {
 	className?: string;
@@ -145,13 +143,13 @@ const listStyle = computed(() => {
 const itemStyle = computed(() => {
 	const style = {};
 
-	const gap = getPx(props.gap) + "px";
+	const gap = `${getPx(props.gap)}px`;
 
 	if (props.direction == "vertical") {
-		style["height"] = getPx(props.itemHeight) + "px";
+		style["height"] = `${getPx(props.itemHeight)}px`;
 		style["marginBottom"] = gap;
 	} else {
-		style["width"] = getPx(props.itemWidth) + "px";
+		style["width"] = `${getPx(props.itemWidth)}px`;
 		style["marginRight"] = gap;
 	}