Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Top 10 Examples of "nzh in functional component" in JavaScript

Dive into secure and efficient coding practices with our curated list of the top 10 examples showcasing 'nzh' in functional components in JavaScript. Our advanced machine learning engine meticulously scans each line of code, cross-referencing millions of open source libraries to ensure your implementation is not just functional, but also robust and secure. Elevate your React applications to new heights by mastering the art of handling side effects, API calls, and asynchronous operations with confidence and precision.

isZhNum() {
            if (!this.hanzi.length) {
                this.$swal({
                    type: 'error',
                    title: '转换失败',
                    text: `ERROR: 你还没有输入`
                });
                return;
            }
            const regexlower = /^负?[零一二三四五六七八九十百千万亿]*点?[零一二三四五六七八九]*$/g;
            const regexupper = /^负?[零壹贰叁肆伍陆柒捌玖拾佰仟万亿]*点?[零壹贰叁肆伍陆柒捌玖]*$/g;
            if (regexlower.test(this.hanzi)) {
                this.numResult = Nzh.cn.decodeS(this.hanzi);
            } else if (regexupper.test(this.hanzi)) {
                this.numResult = Nzh.cn.decodeB(this.hanzi);
            } else {
                this.$swal({
                    type: 'error',
                    title: '转换失败',
                    text: `ERROR: 请输入正确的大小写中文数字`
                });
                return;
            }
        }
    }
export function digitUppercase(n) {
  return nzh.toMoney(n);
}
export function digitUppercase(n) {
  return nzh.toMoney(n);
}
export function digitUppercase(n) {
  return nzh.toMoney(n);
}
export function digitUppercase(n) {
  return nzh.toMoney(n);
}
export function digitUppercase(n) {
  return nzh.toMoney(n);
}
export function digitUppercase(n: any) {
  return nzh.toMoney(n);
}
export function digitUppercase(n) {
  return nzh.toMoney(n);
}
export function digitUppercase(n) {
  return nzh.toMoney(n);
}
import React, { Component } from 'react'
import { InputItem } from '@sishuguojixuefu/antd-mobile-rn'
import { View, Text, StyleSheet } from 'react-native'
import stringWidth from 'string-width'
import nzh from 'nzh'
import omit from 'lodash.omit'
import { SsAmountProps } from '../utils/PropTypes'
import getFieldDecorator from '../utils/getFieldDecorator'
import Label from './helper/Label'
import ErrorTip from './helper/ErrorTip'

const nzhCn = nzh.cn

export default class SsAmount extends Component {
  private fieldDecorator: any
  private chineseAmount = ''
  static defaultProps = {
    required: false,
    placeholder: '请输入',
    textAlign: 'right',
    upper: true,
  }

  componentWillMount() {
    const { form, id, initialValue, rules } = this.props
    const defaultStrValue = initialValue && initialValue.toString()
    this._getChineseAmount(defaultStrValue)
    this.fieldDecorator = getFieldDecorator(form, id, defaultStrValue, rules ? [...rules, 'money'] : ['money'])

Is your System Free of Underlying Vulnerabilities?
Find Out Now