当前位置: 首页> 英语翻译> 正文

gifted是什么 gifted的翻译

  • 作者: 用户投稿
  • 2023-04-14 11:31:54
  • 40

Gifted是一个React Native的组件库,它提供了许多常用的UI组件,可以快速构建出优雅、高效的原生应用。

1. 功能强大:Gifted提供了很多功能强大的组件,包括表单、列表、日期选择器、搜索栏、滑动条、按钮等,这些组件都可以自定义,使用者可以根据自己的需要调整组件的样式和功能。

2. 文档详尽:Gifted提供了详尽的文档,对每个组件都有详细的介绍,并提供了相关的代码示例,方便使用者理解和使用。

3. 社区活跃:Gifted有一个活跃的社区,在GitHub上有超过4000星,使用者可以在社区中获取帮助,也可以提出自己的问题或建议。

4. 使用简单:Gifted的API接口简单易用,使用者可以快速上手,而不需要花费大量的时间学习如何使用它。

以下是一个Gifted的示例代码:

import React from 'react';

import { GiftedForm, GiftedFormManager } from 'react-native-gifted-form';

export default class MyForm extends React.Component {

render() {

return (

formName='signupForm' // GiftedForm instances that use the same name will also share the same states

openModal={(route) =>{

navigator.push(route); // The ModalWidget will be opened using this method. Tested with ExNavigator

}}

clearOnClose={false} // delete the values of the form when unmounted

defaults={{

/*

username: 'Farid',

'gender{M}': true,

password: 'abcdefg',

country: 'FR',

birthday: new Date(((new Date()).getFullYear() - 18)+''),

*/

}}

validators={{

fullName: {

title: 'Full name',

validate: [{

validator: 'isLength',

arguments: [1, 23],

message: '{TITLE} must be between {ARGS[0]} and {ARGS[1]} characters'

}]

},

username: {

title: 'Username',

validate: [{

validator: 'isLength',

arguments: [3, 16],

message: '{TITLE} must be between {ARGS[0]} and {ARGS[1]} characters'

},{

validator: 'matches',

arguments: /^[a-zA-Z0-9]*$/,

message: '{TITLE} can contains only alphanumeric characters'

}]

},

password: {

title: 'Password',

validate: [{

validator: 'isLength',

arguments: [6, 16],

message: '{TITLE} must be between {ARGS[0]} and {ARGS[1]} characters'

}]

},

emailAddress: {

title: 'Email address',

validate: [{

validator: 'isLength',

arguments: [6, 255],

},{

validator: 'isEmail',

}]

},

}}

>

name='fullName' // mandatory

title='Full name'

image={require('../images/

 
 
  • 3457人参与,13条评论