From 372cc655775ac77917bd6ad44522118704a5c922 Mon Sep 17 00:00:00 2001 From: liwang Date: Thu, 11 Apr 2024 06:54:03 +0000 Subject: [PATCH] =?UTF-8?q?[Issues:=20#I9FT56]=20=E6=9B=B4=E6=96=B0=20reac?= =?UTF-8?q?t-native-snap-carousel=20=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-snap-carousel.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zh-cn/react-native-snap-carousel.md b/zh-cn/react-native-snap-carousel.md index f0c4587c..4dd55152 100644 --- a/zh-cn/react-native-snap-carousel.md +++ b/zh-cn/react-native-snap-carousel.md @@ -39,7 +39,7 @@ $ npm install @types/react-native-snap-carousel ```js import React, { useState } from "react"; -import { View, Text, Image } from "react-native"; +import { View, Text, Image, StyleSheet } from "react-native"; import Carousel from "react-native-snap-carousel"; export default function SnapCarouselExample(): JSX.Element { @@ -103,6 +103,13 @@ const styles = StyleSheet.create({ width: "100%", marginBottom: 20, }, + image: { + resizeMode: 'cover', + borderTopLeftRadius: 8, + borderTopRightRadius: 8, + width: 250, + height: 300 + } }); ``` -- Gitee