How to use the umi-plugin-react/locale.formatMessage function in umi-plugin-react

To help you get started, we’ve selected a few umi-plugin-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jkanon / webmagician-ui / src / pages / Crawler / RuleConf / components / RuleConfFormItems.tsx View on Github external
{
      label: 'id',
      name: 'id',
      itemRender: <input type="hidden">,
      hidden: true,
    },
    {
      label: ,
      name: 'name',
      rules: [
        {
          required: true,
          message: ,
        },
      ],
      itemRender: <input placeholder="{formatMessage({">,
      formItemLayout: layout,
    },
    {
      label: ,
      name: 'urlRegex',
      rules: [
        {
          required: true,
          message: ,
        },
        {
          // @ts-ignore
          validator: urlRegexValidator.bind(this),
        },
      ],
      itemRender: <input placeholder="URL正则表达式">,
github ant-design / ant-design-pro-layout / src / pages / User / Register.js View on Github external
value={prefix}
                onChange={this.changePrefix}
                style={{ width: '20%' }}
              &gt;
                <option value="86">+86</option>
                <option value="87">+87</option>
              
              {getFieldDecorator('mobile', {
                rules: [
                  {
                    required: true,
                    message: formatMessage({ id: 'validation.phone-number.required' }),
                  },
                  {
                    pattern: /^\d{11}$/,
                    message: formatMessage({ id: 'validation.phone-number.wrong-format' }),
                  },
                ],
              })(
                <input placeholder="{formatMessage({" style="{{" size="large">
              )}
            
          
          
            
              
                {getFieldDecorator('captcha', {
                  rules: [
github Jkanon / webmagician-ui / src / pages / Crawler / Site / index.tsx View on Github external
.then(() => {
        that.setState({
          selectedRows: selectedRows.filter(item => ids.indexOf(item.id) === -1),
        });
        if (that.pageRef.current) {
          that.pageRef.current.doSearch();
        }
        message.success(formatMessage({ id: 'component.common.text.deleted-success' }));
      })
      .catch(() => {});
github hyperledger / cello / src / dashboard / src / pages / Operator / UserManagement.js View on Github external
onCancel={() =&gt; handleModalVisible()}
    &gt;
      
        {form.getFieldDecorator('username', {
          initialValue: method === 'create' ? '' : user.username,
          rules: [
            {
              required: true,
              message: formatMessage({
                id: 'app.operator.user.form.name.required',
                defaultMessage: 'Please input user name',
              }),
              min: 1,
            },
          ],
        })(
          <input placeholder="{formatMessage({">
        )}
      
github ant-design / ant-design-pro-layout / src / pages / Account / Settings / BaseView.js View on Github external
} = this.props;
    return (
      <div>
        <div>
          <form>
            
              {getFieldDecorator('email', {
                rules: [
                  {
                    required: true,
                    message: formatMessage({ id: 'app.settings.basic.email-message' }, {}),
                  },
                ],
              })(<input>)}
            
            
              {getFieldDecorator('name', {
                rules: [
                  {
                    required: true,
                    message: formatMessage({ id: 'app.settings.basic.nickname-message' }, {}),
                  },
                ],
              })(<input>)}
            
            
              {getFieldDecorator('profile', {
                rules: [
                  {
                    required: true,
                    message: formatMessage({ id: 'app.settings.basic.profile-message' }, {}),
                  },</form></div></div>
github xingcun / xc-spring-cloud-alibaba / xc-ui / src / layouts / BasicLayout.tsx View on Github external
getPageTitle = (pathname: any, breadcrumbNameMap: any) => {
    const currRouterData = this.matchParamsPath(pathname, breadcrumbNameMap);

    if (!currRouterData) {
      return 'Ant Tabs';
    }
    const pageName = formatMessage({
      id: currRouterData.locale || currRouterData.name,
      defaultMessage: currRouterData.name,
    });

    return `${pageName} - Ant Tabs`;
  };
github mojisrc / fashop-admin / src / pages / user / components / sms-login-form.tsx View on Github external
}
          ]
        })(
          <input type="mobile" size="large">}
            placeholder={`${formatMessage({ id: 'app.login.mobile' })}`}
          /&gt;
        )}
      
      
        {getFieldDecorator('code', {
          rules: [
            {
              required: true,
              message: formatMessage({ id: 'validation.verification-code.required' })
            }
          ]
        })(
          <input type="key" maxlength="{6}" autocomplete="off" size="large">}
            placeholder={`${formatMessage({ id: 'app.login.verification-code' })}`}
            suffix={
              
            }
          /&gt;
        )}
github Jkanon / webmagician-ui / src / global.tsx View on Github external
};
    const key = `open${Date.now()}`;
    const btn = (
      <button type="primary"> {
          notification.close(key);
          reloadSW();
        }}
      &gt;
        {formatMessage({ id: 'app.pwa.serviceworker.updated.ok' })}
      </button>
    );
    notification.open({
      message: formatMessage({ id: 'app.pwa.serviceworker.updated' }),
      description: formatMessage({ id: 'app.pwa.serviceworker.updated.hint' }),
      btn,
      key,
      onClose: async () =&gt; {},
    });
  });
} else if ('serviceWorker' in navigator) {
github linghuxiong / spring-batch-admin-ui / src / pages / user / login / index.tsx View on Github external
if (this.loginForm) {
                  this.loginForm.validateFields(this.handleSubmit);
                }
              }}
            /&gt;
          
          
            {status === 'error' &amp;&amp;
              loginType === 'mobile' &amp;&amp;
              !submitting &amp;&amp;
              this.renderMessage(
                formatMessage({ id: 'user-login.login.message-invalid-verification-code' }),
              )}
github xingcun / xc-spring-cloud-alibaba / xc-ui / src / layouts / BasicLayout.tsx View on Github external
breadcrumbRender={(routers = []) => {
          return [
            {
              path: '/',
              breadcrumbName: formatMessage({
                id: 'menu.home',
                defaultMessage: 'Home',
              }),
            },
            ...routers,
          ];
        }}
        footerRender={footerRender}

umi-plugin-react

React plugin set for umi.

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis

Similar packages