草庐IT

display_name

全部标签

javascript - react native : @providesModule declaration with the same name across two different files

我们有两个repos,它们都有react-native作为依赖项;一个是实际的RN应用程序,另一个是UI包,其中包含许多自定义的react-native组件。当我使用RN应用程序符号链接(symboliclink)(使用npm链接)UI包并尝试启动js服务器时,它抛出以下错误:此错误是由两个不同文件中具有相同名称的@providesModule声明引起的。这似乎是因为它在UI包的react-native副本中获取相同的RN文件。我知道watchman不使用符号链接(symboliclink)存在问题,但我认为这是不同的-与有两个react-native模块有关。请问有人知道解决这个问题

javascript - "first-name"如何成为 JavaScript 中的保留字?

注意:此问题与DougCrockford撰写的“JavaScript:TheGoodParts”一书有关。当我阅读关于对象的一章时,我遇到了如下声明:Thequotesaroundaproperty'snameinanobjectliteralareoptionalifthenamewouldbealegalJavaScriptnameandnotareservedword.Soquotesarerequiredaround"first-name",butareoptionalaround"first_name".下面是书中提供的一个对象字面量的例子:varstooge={"first

javascript - react native : ListView not displaying all rows

我试图在ReactNativeListView中显示行列表,但它只显示适合单个屏幕的条目,即我无法向下滚动以查看更多行。样式如下:styles=StyleSheet.create({container:{flex:1,marginTop:60},rowContainer:{flexDirection:'row',justifyContent:'space-around'}})ListView:return({this.getHeader()})行:return({text})我做错了什么? 最佳答案 我有同样的问题,发现外面有包装V

javascript - this.name 在 javascript 中返回 undefined

我正在尝试远程创建一个onclick对于每个(以节省打字时间)。这是window.onload()功能:window.onload=function(){divel=document.getElementsByTagName('div');for(varelindivel){divel[el].onmouseover=function(){this.style.textDecoration="underline";};divel[el].onmouseout=function(){this.style.textDecoration="none";};divel[el].onclick=

javascript - 手机间隙 : Resize webview on keyboard display in Android

我有一个类似(固定定位)的模态,类似于facebook在最新的android版本中的feed/chatinmessenger中的评论。我想要的看起来与此类似:因此,当您专注于输入时,键盘会打开并缩小WebView。默认情况下它不工作,我找不到任何解决方案。我试图将此首选项添加到config.xml但adjustResize没有做任何事情,并且stateVisible只是在我启动时打开键盘应用程序。这很奇怪。截至AndroidDocumentationadjustResize应该这样做:Theactivity'smainwindowisalwaysresizedtomakeroomfor

javascript - 学习 JavaScript : display all firstnames with B as first letter

我是第一次学习JavaScript,我想知道为什么我的代码不起作用。我有Python/Django知识。目标:我必须创建一个姓名列表,并且我必须只显示以“B”字母开头的名字。我的脚本:varlistNames=['Paul','Bruno','Arthur','Bert','José']for(variinlistNames){if(i.substr(0,1)==='B'){console.log(i);}}但是这段代码没有显示任何东西。 最佳答案 您需要使用listNames[i]作为i为您提供数组listNames的index。

javascript - [Vue 警告] : Error in render function: "TypeError: Cannot read property ' first_name' of null"

我有以下Navigation.vue组件:{{user.first_name}}import{mapActions,mapGetters}from'vuex'exportdefault{name:'hello',methods:{...mapActions(['myAccount'])},mounted:function(){if(localStorage.getItem('access_token')){this.myAccount()}},computed:{...mapGetters(['user'])}}此代码返回:[Vuewarn]:Errorinrenderfunction

javascript - 三个 : How could we insert a locally loaded mesh into the canvas being generated by Three to display it?

您好,感谢您阅读这个问题:我正在学习Threejs,目前我有一个奇怪的困难:我已经学会了如何使用加载器以纯HTML/JAVASCRIPT加载格式为NRRD的本地文件:这里是repo:https://github.com/YoneMoreno/LoadNRRDInThreeJSExample作为它的外观示例:但是,我想将前面的示例与React集成。我研究了如何使用这个SO线程关联React和Three:Renderingthree.jselementinReact?现在我的代码是这样的:/*globalTHREE*/importReactfrom'react';classLoadNRRD

javascript - 是否可以实现 'Continue as {Facebook user name}' 按钮?

我正在尝试为我的站点实现Facebook登录按钮。一些Facebook产品有一个很好的FB按钮,它使用已经登录的用户的Facebook用户名。还有一个问题:当用户已经在浏览器中登录时,是否可以使用Javascript获取FB名称?例子: 最佳答案 您可以在Facebook文档中找到它,登录按钮/插件配置器部分:https://developers.facebook.com/docs/facebook-login/web/login-button有一个选项:当用户登录Facebook时包括姓名和头像

javascript - react native map : center marker onPress before Callout is displayed

当用户按下标记时,我调用animateToCoordinate使标记居中于屏幕中间。问题是标注在animateToCoordinate完成其动画之前呈现到区域的位置,因此标注显示在屏幕外。无论如何要延迟标注显示直到animateToRegion完成?还是有另一种我没有看到的完全解决这个问题的方法?{_mapView=mapView;}}style={styles.map}region={this.state.mapRegion}showsUserLocation={true}showsMyLocationButton={true}followUserLocation={true}onR