Parcourir la source

添加 cl-marquee 跑马灯组件

icssoa il y a 6 mois
Parent
commit
742e67bd5f
1 fichiers modifiés avec 3 ajouts et 5 suppressions
  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;
 	}