我需要知道如何隐藏底部标签。
我尝试了以下方法:
tabBarShowLabels:“隐藏”,tabbarlabelvisible:假。
我也删除了tabbarlabel: 'Home',它仍然显示
任何帮助将不胜感激,或者如果有人可以指出我正确的方向。
import {createBottomTabNavigator} from 'react-navigation'
import Icon from 'react-native-vector-icons/Ionicons'
const Tabs = createBottomTabNavigator ({
Home:{
screen: Home,
navigationOptions:{
tabBarIcon: ({ focused, tintcolor }) => (
<Icon name="ios-home" size={24} />
)
}
},
Inbox:{screen: Inbox,
navigationOptions:{
tabBarIcon: ({ tintcolor }) => (
<Icon name="ios-mail" size={24} />
)
}
},
Search:{screen: Search,
navigationOptions:{
tabBarIcon: ({ tintcolor }) => (
<Icon name="ios-search" size={24} />
)
}
},
Favorites:{screen: Favorites,
navigationOptions:{
tabBarIcon: ({ tintcolor }) => ( …Run Code Online (Sandbox Code Playgroud) 我如何只显示第一行文字?如果我有这样的事情:
<View>
<Text>
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words,
</Text>
</View>
Run Code Online (Sandbox Code Playgroud)
我只想显示“与流行的看法相反,洛雷姆·伊普森”。
如何增加 textarea 的占位符字体大小?我试过这个,但没有用。谢谢。
textarea::placeholder {
font-size: 20;
}
Run Code Online (Sandbox Code Playgroud) 我想使用 firebase 9 查询实时数据库,我以前使用过 admin sdk,我有一个可以工作的示例,但我在调整到版本 9 时遇到问题。我找不到任何关于如何使用这些模块化方法进行查询的可靠示例。任何例子将不胜感激。
版本8
return admin
.database()
.ref("Countries")
.orderByChild("name")
.equalTo(query)
.once("value")
.then((data) => {
if (data.exists()) {
const obj = Object.keys(data.val())[0];
const country = data.val()[obj];
return country;
} else {
return null;
}
})
.catch((error) => {
console.log("error finding country name", error);
return null;
});
Run Code Online (Sandbox Code Playgroud)
我尝试过什么
const { getDatabase, child, get, ref ,orderByChild,equalTo} = require("firebase/database");
const toFind = "USA"
const dbRef = ref(getDatabase());
const query = await get(child(dbRef, `countries`));
//orderByChild
//equalTo
Run Code Online (Sandbox Code Playgroud)
更新的解决方案:
const dbRef = …Run Code Online (Sandbox Code Playgroud) 我有一个文本区域,我希望用户编辑已经存在的内容,然后按Enter键以使用Ajax调用提交,但是一旦按Enter键,它就禁止进入新行。谢谢
$(document).keypress(function(e) {
if (!$(".specialClass").is(":focus")) {
e.preventDefault();
if (e.which == 13) {
console.log('You pressed enter!');
}
}
});Run Code Online (Sandbox Code Playgroud)
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>Run Code Online (Sandbox Code Playgroud)
我正在尝试使用 react-native imagepicker 库创建一个可重用的函数,但是当我导入该函数时,我从导入它的组件中获得了未定义的信息。使用 console.log 我看到它实际工作。它只是没有显示上传的图像。
我尝试返回源和实际功能,但它不起作用
辅助函数.js
import ImagePicker from 'react-native-image-picker';
export const photoUpload =()=>{
const options = {
title: 'Select Avatar',
camera: [{ name: 'fb', title: 'Take a picture' }],
storageOptions: {
skipBackup: true,
path: 'images',
},
};
const action = ImagePicker.showImagePicker(options, (response) => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) {
console.log('ImagePicker Error: ', response.error);
} else if (response.camera) {
console.log('User tapped custom button: ', response.camera);
} else …Run Code Online (Sandbox Code Playgroud) 我想在用户删除其帐户时删除上传到 firebase 存储的图像。我阅读了文档并尝试了他们指定的内容,但它不起作用。我回来了error error Error: No object exists at the desired reference.
console.log 显示
\n\n{path: "/users/w3jvGrcMJ7TSUguQRRvRa8eHEIF3/undefined", _storage: Storage}path: "/users/w3jvGrcMJ7TSUguQRRvRa8eHEIF3/undefined"_storage: Storage\xc2\xa0{_app: App, _customUrlOrRegion: undefined, namespace: "storage"}fullPath: (...)key: (...)put: (...)__proto__: ReferenceBase "ref"
删除帐户.js
\n\ntry{\nconst user = firebase.auth().currentUser;\n let uid = user.uid;\nlet ref = firebase.storage().ref(`/users/${uid}/`).child()\n console.log(ref,\'ref\') \nawait ref.delete()\n\n} catch(e){\n\nconsole.log(e)\n\n}\nRun Code Online (Sandbox Code Playgroud)\n 我正在为我的应用程序使用 expo,并且我随机指出在我的 cli 中收到此错误。此错误不会阻止应用程序运行。我四处搜寻,没有发现有人出现此错误。是否是由于我的 app.json/app.config 文件的设置方式所致?我不想删除插件部分,因为我需要它。提前致谢
应用程序配置.js
import "dotenv/config";
export default {
expo: {
plugins: [
[
"expo-image-picker",
{
photosPermission:
"The app accesses your photos to let you share them with your friends.",
},
],
[
"expo-media-library",
{
photosPermission: "Allow $(PRODUCT_NAME) to access your photos.",
savePhotosPermission: "Allow $(PRODUCT_NAME) to save photos.",
isAccessMediaLocationEnabled: true,
},
],
[
"expo-camera",
{
/* Values passed to the plugin */
locationWhenInUsePermission:
"Allow $(PRODUCT_NAME) to access your location",
},
],
],
name: "Appname",
slug: "Appnameslug",
version: …Run Code Online (Sandbox Code Playgroud) react-native ×5
reactjs ×3
html ×2
css ×1
expo ×1
express ×1
firebase ×1
javascript ×1
jquery ×1
node.js ×1