我正在使用react-navigation v2和react本地矢量图标。
我正在尝试在react native选项卡导航器中添加一个图标。
如果图标不在选项卡导航器中,则会显示该图标。该图标未在选项卡导航器中显示,并且我找不到如何在选项卡导航器中添加图标的可靠示例。
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { createMaterialTopTabNavigator } from 'react-navigation'
import Home from '../HomePage.js'
import Profile s from '../ProfilePage.js'
import Icon from 'react-native-vector-icons/FontAwesome';
export const Tabs = createMaterialTopTabNavigator(
{
HomePage: {
screen: Home,
navigationOptions: {
tabBarLabel:"Home Page",
tabBarIcon: ({ tintColor }) => (
<Icon name="home" size={30} color="#900" />
)
},
},
ProfilePage: {
screen: Profile,
navigationOptions: {
tabBarLabel:"Profile Page",
tabBarIcon: ({ tintColor }) => …
Run Code Online (Sandbox Code Playgroud) 我是 Rails 5 中的 ActionCable 新手。我正在尝试为我的 Rails 应用程序进行聊天。当我尝试通过控制台发送测试消息App.room.speak('Test!')
时,但当我收到错误消息时。
未捕获的 ReferenceError:应用程序未在 :1:1 处定义
房间咖啡
App.room = App.cable.subscriptions.create "RoomChannel",
connected: ->
# Called when the subscription is ready for use on the server
disconnected: ->
# Called when the subscription has been terminated by the server
received: (data) ->
# Called when there's incoming data on the websocket for this channel
$('message').append data
speak: (message)->
@perform 'speak', message: message
Run Code Online (Sandbox Code Playgroud)
房间频道.rb
class RoomChannel < ApplicationCable::Channel
def subscribed
stream_from "room_channel"
end
def …
Run Code Online (Sandbox Code Playgroud) 我正在尝试检查图像的 url 是否为 404。问题是该函数返回未定义。为什么会发生这种情况?
如果我 console.log 资源的状态,它确实显示 404,因此 if 语句正在执行。
function checkImageURL(url){
fetch(url)
.then(res => {
if(res.status == 404){
console.log(res.status)
return <Image source={require('./Images/default.png')}/>
}else{
return <Image source={{uri: `${url}`}} />
}
})
}
Run Code Online (Sandbox Code Playgroud) 问题 -
由于某种原因,我无法运行 dev-server 。我在 cmd 1 上执行了这两个命令。 npm run dev-server
我得到的错误之一的“样本” -
警告:在 eslint-plugin-react 设置中未指定 React 版本。请参阅 https://github.com/yannickcr/eslint-plugin-react#configuration。C:\Users\Alon\Desktop\skillz_fontend\src\components\Inputs\GooglePlacesInput.jsx 57:30 错误缺少分号半
C:\Users\Alon\Desktop\skillz_fontend>npm start npm ERR!缺少脚本:启动 npm ERR!npm 错误!你是这个意思吗?npm 错误!统计 npm 错误!可以在以下位置找到此运行的完整日志:npm ERR!
C:\Users\Alon\AppData\Roaming\npm-cache_logs\2019-11-17T22_59_13_787Z-debug.log
谢谢阿隆
我正在尝试使用 firebase 中的 isEmailVerified 函数,但出现错误
user.emailVerified 不是函数
import * as firebase from 'firebase';
@IonicPage()
@Component({
selector: 'page-login',
templateUrl: 'login.html',
})
export class LoginPage {
user = {} as User
async login(user: User){
try{
this.afAuth.auth.signInWithEmailAndPassword(user.email,user.password)
.then(res => {
//check if user has made profile if not send to profile setup page
let user = firebase.auth().currentUser;
if(user.isEmailVerified()){
console.log("Email is verified");
}
}catch(e){
console.log(e);
}
}
}
Run Code Online (Sandbox Code Playgroud) 我有下面的电子表格,在 VBA 中我想根据这些标题选择“股票代码”列和“参考价格”列。
这是我到目前为止所尝试的,但是当我循环范围时我只能得到股票代码值。
Dim rngRefData As Range
Set rngRefData = Union(rdWS.Range("1:1").Find("Ticker"), rdWS.Range("1:1").Find("Reference Price"))
Set rngRefData = Range(rngRefData, rngRefData.End(xlDown))
For Each Item In rngRefData
Debug.Print Item
Next Item
Run Code Online (Sandbox Code Playgroud)
如何选择整个股票代码列的最后一个值和整个参考价格列的最后一个值。
reactjs ×3
react-native ×2
actioncable ×1
angular ×1
cmd ×1
email ×1
excel ×1
firebase ×1
icons ×1
image ×1
npm ×1
typescript ×1
vba ×1