ReactNative
WindFlyCloud
这个作者很懒,什么都没留下…
展开
-
ReactNative中验证手机号和密码
/** * 验证是否为手机号 * @param {*} str */ static isPoneAvailable(str) { let myreg = /^[1][3,4,5,7,8][0-9]{9}$/; if (str.length == 0 || str == null) { return false; ...原创 2018-04-10 16:08:18 · 2872 阅读 · 0 评论 -
ReactNative中的SHA256加密
SHA256(s){ var chrsz = 8; var hexcase = 0; function safe_add (x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16)...原创 2018-04-10 15:19:37 · 1717 阅读 · 0 评论 -
ReactNative获取当前时间的字符串
static formatDateTime() { let date = new Date(); let y = date.getFullYear(); let m = date.getMonth() + 1; m = m < 10 ? ('0' + m) : m; let d = date.getDate(); ...原创 2018-04-10 15:14:57 · 3642 阅读 · 1 评论 -
ReactNative验证输入框是否含有emoji图标
//判断是否含有emoji图标isEmojiCharacterInString(substring) {for ( vari = 0; i < substring.length; i++) { var hs =substring.charCodeAt(i);if (0xd800 <=hs && hs <=0xdbff) { if (substring.length...原创 2018-04-10 16:07:58 · 1581 阅读 · 0 评论 -
ReactNative中AlertTextField监听键盘改变弹出位置
import React, { Component } from 'react';import { View, Text, Modal, StyleSheet, TextInput,TouchableOpacity , Dimensions, Alert,ScrollView,Keyboard,Animated,Easing} from 'react-native';const SCREEN_WI...原创 2018-04-13 10:53:38 · 393 阅读 · 0 评论