如何解决如何使WebView在react-native-webview中可滚动?
我使用<WebView>
时,<Card.Content>
已嵌入react-native-paper
中。我正在尝试使WebView
可滚动。 Web视图显示但不可滚动。
我正在使用的代码:
<Card theme={{ roundness: 20 }} style={{ margin: 10,height: height*0.8 }} elevation={14}>
<Card.Content style={{ flex: 1 }}>
<View style={{ justifyContent: "center",alignItems: "center" }}>
<WebView
style={{ width: width * 0.8,height: height * 0.9 }}
allowsBackForwardNavigationGestures={false}
source={{ uri: "https://paypal.com"}}
pullToRefreshEnabled={false}
javaScriptEnabled
startInLoadingState
decelerationRate="normal"
scalesPagetoFit={Platform.OS == "android"? false : true}
originWhitelist={['*']}
domStorageEnabled={true}
scrollEnabled
renderError={e => { console.log(e); }}
/>
</View>
</Card.Content>
</Card>
如何使WebView
滚动?
解决方法
我想您可以尝试将CREATE FUNCTION [dbo].[GetSegmentId]
(
@Planningid INT,@agencyID int
)
RETURNS @tablevar TABLE
(
id INT
)
AS
BEGIN
declare @CachedRoute geography
DECLARE @finalresult int
DECLARE @result TABLE (id INT,starting sys.geography,ending sys.geography,chachedroute sys.geography)
set @CachedRoute = (select CachedRoute from route where id = @Planningid)
insert into @result select id,starting,Ending,CachedRoute from Route R where AgencyId=@agencyID and LayerId=1 and CachedRoute.STDistance(@CachedRoute)<0.5
insert into @tablevar
select id from @result where @CachedRoute.STDistance(starting)<700 and @CachedRoute.STDistance(ending)<700
intersect
select id from @result
RETURN;
END;
包裹在WebView
中,如下所示:
ScrollView
此外,您可以使用react-native-autoheight-webview
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。