How to use the choerodon-ui.Upload.Dragger function in choerodon-ui

To help you get started, we’ve selected a few choerodon-ui 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 choerodon / choerodon-front-iam / iam / src / app / iam / components / editor / Editor.js View on Github external
import React, { Component } from 'react';
import ReactQuill, { Quill } from 'react-quill';
import { axios, Content } from 'choerodon-front-boot';
import 'react-quill/dist/quill.snow.css';
import './Editor.scss';
import { Modal, Input, Button, Form, Tabs, Upload, Icon } from 'choerodon-ui';
import { FormattedMessage, injectIntl } from 'react-intl';

const TabPane = Tabs.TabPane;
const Dragger = Upload.Dragger;
const FormItem = Form.Item;
const limitSize = 5120;
const Align = Quill.import('attributors/style/align');
Align.whitelist = ['right', 'center', 'justify'];
Quill.register(Align, true);

const Size = Quill.import('attributors/style/size');
Size.whitelist = ['10px', '12px', '14px', '16px', '18px', '20px'];
Quill.register(Size, true);

const Font = Quill.import('attributors/style/font');
Font.whitelist = ['STSong', 'STKaiti', 'STHeiti', 'STFangsong', 'SimSun', 'KaiTi', 'SimHei', 'FangSong', 'Microsoft-YaHei'];
Quill.register(Font, true);

const CustomToolbar = () => (
  <div id="toolbar"></div>
github choerodon / choerodon-front-iam / iam / src / app / iam / containers / global / system-setting / LogoUploader.js View on Github external
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';
import SystemSettingStore from '../../../stores/global/system-setting/SystemSettingStore';
import '../../user/user-info/Userinfo.scss';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'global.system-setting.edit';
const prefixClas = 'c7n-iam-system-setting-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {
github choerodon / iam-service / iam-service / react / src / iam / components / avatarUploader / AvatarUploader.js View on Github external
/**
 * 裁剪头像上传
 */

import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-boot-combine';
import PropTypes from 'prop-types';
import querystring from 'query-string';
import './AvatarUploader.scss';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const prefixClas = 'c7n-iam-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {
  return (rotate / 90) % 2 !== 0;
github choerodon / iam-service / react / src / app / iam / components / editor / Editor.js View on Github external
import React, { Component } from 'react';
import ReactQuill, { Quill } from 'react-quill';
import { axios, Content } from '@choerodon/boot';
import 'react-quill/dist/quill.snow.css';
import './Editor.scss';
import { Modal, Input, Button, Form, Tabs, Upload, Icon } from 'choerodon-ui';
import { FormattedMessage, injectIntl } from 'react-intl';

const TabPane = Tabs.TabPane;
const Dragger = Upload.Dragger;
const FormItem = Form.Item;
const limitSize = 5120;
const Align = Quill.import('attributors/style/align');
Align.whitelist = ['right', 'center', 'justify'];
Quill.register(Align, true);

const Size = Quill.import('attributors/style/size');
Size.whitelist = ['10px', '12px', '14px', '16px', '18px', '20px'];
Quill.register(Size, true);

const Font = Quill.import('attributors/style/font');
Font.whitelist = ['STSong', 'STKaiti', 'STHeiti', 'STFangsong', 'SimSun', 'KaiTi', 'SimHei', 'FangSong', 'Microsoft-YaHei'];
Quill.register(Font, true);

const CustomToolbar = () =&gt; (
  <div id="toolbar"></div>
github choerodon / choerodon-front-iam / iam / src / app / iam / components / avatarUploader / AvatarUploader.js View on Github external
/**
 * 裁剪头像上传
 */

import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import PropTypes from 'prop-types';
import querystring from 'query-string';
import './AvatarUploader.scss';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const prefixClas = 'c7n-iam-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {
  return (rotate / 90) % 2 !== 0;
github choerodon / iam-service / react / src / app / iam / containers / user / user-info / AvatarUploader.js View on Github external
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from '@choerodon/boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'user.userinfo.avatar.edit';
const prefixClas = 'user-info-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {
github choerodon / iam-service / react / src / app / iam / components / avatarUploader / AvatarUploader.js View on Github external
/**
 * 裁剪头像上传
 */

import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from '@choerodon/boot';
import PropTypes from 'prop-types';
import querystring from 'query-string';
import './AvatarUploader.scss';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const prefixClas = 'c7n-iam-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {
  return (rotate / 90) % 2 !== 0;
github choerodon / choerodon-front-iam / iam / src / app / iam / containers / user / user-info / AvatarUploader.js View on Github external
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'user.userinfo.avatar.edit';
const prefixClas = 'user-info-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {
github choerodon / iam-service / react / src / app / iam / containers / global / system-setting / LogoUploader.js View on Github external
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from '@choerodon/boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';
import SystemSettingStore from '../../../stores/global/system-setting/SystemSettingStore';
import '../../user/user-info/Userinfo.scss';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'global.system-setting.edit';
const prefixClas = 'c7n-iam-system-setting-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {
github choerodon / choerodon-front-iam / iam / src / app / iam / containers / user / user-info / AvatarUploader.js View on Github external
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';

const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'user.userinfo.avatar.edit';
const prefixClas = 'user-info-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;

function rotateFlag(rotate) {