Commit 81895705 authored by ζ„šι“'s avatar ζ„šι“ Committed by ι™ˆεΈ…

use new alias @ which default set in umi

parent b0816a4c
...@@ -21,14 +21,12 @@ export default { ...@@ -21,14 +21,12 @@ export default {
baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default
}, },
polyfills: ['ie9'], polyfills: ['ie9'],
...( ...(!process.env.TEST && require('os').platform() === 'darwin'
(!process.env.TEST && require('os').platform() === 'darwin')
? { ? {
dll: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'], dll: ['dva', 'dva/router', 'dva/saga', 'dva/fetch'],
hardSource: true, hardSource: true,
} }
: {} : {}),
),
}, },
], ],
], ],
...@@ -42,12 +40,6 @@ export default { ...@@ -42,12 +40,6 @@ export default {
'@antv/data-set': 'DataSet', '@antv/data-set': 'DataSet',
rollbar: 'rollbar', rollbar: 'rollbar',
}, },
alias: {
components: path.resolve(__dirname, '../src/components/'),
utils: path.resolve(__dirname, '../src/utils/'),
assets: path.resolve(__dirname, '../src/assets/'),
common: path.resolve(__dirname, '../src/common/'),
},
ignoreMomentLocale: true, ignoreMomentLocale: true,
lessLoaderOptions: { lessLoaderOptions: {
javascriptEnabled: true, javascriptEnabled: true,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"components/*": ["./src/components/*"] "@/*": ["./src/*"]
} }
} }
} }
...@@ -8,9 +8,9 @@ import { ContainerQuery } from 'react-container-query'; ...@@ -8,9 +8,9 @@ import { ContainerQuery } from 'react-container-query';
import classNames from 'classnames'; import classNames from 'classnames';
import pathToRegexp from 'path-to-regexp'; import pathToRegexp from 'path-to-regexp';
import { formatMessage } from 'umi/locale'; import { formatMessage } from 'umi/locale';
import SiderMenu from '../components/SiderMenu'; import SiderMenu from '@/components/SiderMenu';
import Authorized from '../utils/Authorized'; import Authorized from '@/utils/Authorized';
import SettingDarwer from '../components/SettingDarwer'; import SettingDarwer from '@/components/SettingDarwer';
import logo from '../assets/logo.svg'; import logo from '../assets/logo.svg';
import Footer from './Footer'; import Footer from './Footer';
import Header from './Header'; import Header from './Header';
......
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { Layout, Icon } from 'antd'; import { Layout, Icon } from 'antd';
import GlobalFooter from '../components/GlobalFooter'; import GlobalFooter from '@/components/GlobalFooter';
const { Footer } = Layout; const { Footer } = Layout;
const FooterView = () => ( const FooterView = () => (
......
...@@ -3,10 +3,10 @@ import { Layout, message } from 'antd'; ...@@ -3,10 +3,10 @@ import { Layout, message } from 'antd';
import Animate from 'rc-animate'; import Animate from 'rc-animate';
import { connect } from 'dva'; import { connect } from 'dva';
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import GlobalHeader from '../components/GlobalHeader'; import GlobalHeader from '@/components/GlobalHeader';
import TopNavHeader from '../components/TopNavHeader'; import TopNavHeader from '@/components/TopNavHeader';
import styles from './Header.less'; import styles from './Header.less';
import Authorized from '../utils/Authorized'; import Authorized from '@/utils/Authorized';
const { Header } = Layout; const { Header } = Layout;
......
import React from 'react'; import React from 'react';
import { FormattedMessage } from 'umi/locale'; import { FormattedMessage } from 'umi/locale';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import PageHeader from 'components/PageHeader'; import PageHeader from '@/components/PageHeader';
import GridContent from './GridContent'; import GridContent from './GridContent';
import styles from './PageHeaderLayout.less'; import styles from './PageHeaderLayout.less';
import MenuContext from './MenuContext'; import MenuContext from './MenuContext';
......
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import { Icon } from 'antd'; import { Icon } from 'antd';
import GlobalFooter from '../components/GlobalFooter'; import GlobalFooter from '@/components/GlobalFooter';
import styles from './UserLayout.less'; import styles from './UserLayout.less';
import logo from '../assets/logo.svg'; import logo from '../assets/logo.svg';
......
import React from 'react'; import React from 'react';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import Exception from 'components/Exception'; import Exception from '@/components/Exception';
export default () => ( export default () => (
<Exception type="404" style={{ minHeight: 500, height: '80%' }} linkElement={Link} /> <Exception type="404" style={{ minHeight: 500, height: '80%' }} linkElement={Link} />
......
...@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; ...@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import { List, Card, Icon, Dropdown, Menu, Avatar, Tooltip } from 'antd'; import { List, Card, Icon, Dropdown, Menu, Avatar, Tooltip } from 'antd';
import numeral from 'numeral'; import numeral from 'numeral';
import { connect } from 'dva'; import { connect } from 'dva';
import { formatWan } from '../../../utils/utils'; import { formatWan } from '@/utils/utils';
import stylesApplications from '../../List/Applications.less'; import stylesApplications from '../../List/Applications.less';
@connect(({ list }) => ({ @connect(({ list }) => ({
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../../utils/utils.less'; @import '~@/utils/utils.less';
.avatarHolder { .avatarHolder {
text-align: center; text-align: center;
......
...@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; ...@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import { List, Card } from 'antd'; import { List, Card } from 'antd';
import moment from 'moment'; import moment from 'moment';
import { connect } from 'dva'; import { connect } from 'dva';
import AvatarList from '../../../components/AvatarList'; import AvatarList from '@/components/AvatarList';
import stylesProjects from '../../List/Projects.less'; import stylesProjects from '../../List/Projects.less';
@connect(({ list }) => ({ @connect(({ list }) => ({
......
...@@ -5,7 +5,7 @@ import { connect } from 'dva'; ...@@ -5,7 +5,7 @@ import { connect } from 'dva';
import styles from './BaseView.less'; import styles from './BaseView.less';
import GeographicView from './GeographicView'; import GeographicView from './GeographicView';
import PhoneView from './PhoneView'; import PhoneView from './PhoneView';
// import { getTimeDistance } from '../../../utils/utils'; // import { getTimeDistance } from '@/utils/utils';
const FormItem = Form.Item; const FormItem = Form.Item;
const { Option } = Select; const { Option } = Select;
......
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment } from 'react';
import { formatMessage, FormattedMessage } from 'umi/locale'; import { formatMessage, FormattedMessage } from 'umi/locale';
import { List } from 'antd'; import { List } from 'antd';
// import { getTimeDistance } from '../../../utils/utils'; // import { getTimeDistance } from '@/utils/utils';
const passwordStrength = { const passwordStrength = {
strong: ( strong: (
...@@ -16,7 +16,8 @@ const passwordStrength = { ...@@ -16,7 +16,8 @@ const passwordStrength = {
), ),
weak: ( weak: (
<font className="weak"> <font className="weak">
<FormattedMessage id="app.settings.security.weak" defaultMessage="Weak" />Weak <FormattedMessage id="app.settings.security.weak" defaultMessage="Weak" />
Weak
</font> </font>
), ),
}; };
...@@ -28,9 +29,8 @@ class SecurityView extends Component { ...@@ -28,9 +29,8 @@ class SecurityView extends Component {
title: formatMessage({ id: 'app.settings.security.password' }, {}), title: formatMessage({ id: 'app.settings.security.password' }, {}),
description: ( description: (
<Fragment> <Fragment>
{formatMessage({ id: 'app.settings.security.password-description' }, {})}:{ {formatMessage({ id: 'app.settings.security.password-description' }, {})}:
passwordStrength.strong {passwordStrength.strong}
}
</Fragment> </Fragment>
), ),
actions: [ actions: [
......
import request from '../../../../utils/request'; import request from '@/utils/request';
export async function queryProvince() { export async function queryProvince() {
return request('/api/geographic/province'); return request('/api/geographic/province');
......
...@@ -23,9 +23,9 @@ import { ...@@ -23,9 +23,9 @@ import {
Bar, Bar,
Pie, Pie,
TimelineChart, TimelineChart,
} from 'components/Charts'; } from '@/components/Charts';
import Trend from 'components/Trend'; import Trend from '@/components/Trend';
import NumberInfo from 'components/NumberInfo'; import NumberInfo from '@/components/NumberInfo';
import numeral from 'numeral'; import numeral from 'numeral';
import GridContent from '@/layouts/GridContent'; import GridContent from '@/layouts/GridContent';
import Yuan from '@/utils/Yuan'; import Yuan from '@/utils/Yuan';
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.iconGroup { .iconGroup {
i { i {
......
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Row, Col, Card, Tooltip } from 'antd'; import { Row, Col, Card, Tooltip } from 'antd';
import { Pie, WaterWave, Gauge, TagCloud } from 'components/Charts'; import { Pie, WaterWave, Gauge, TagCloud } from '@/components/Charts';
import NumberInfo from 'components/NumberInfo'; import NumberInfo from '@/components/NumberInfo';
import CountDown from 'components/CountDown'; import CountDown from '@/components/CountDown';
import ActiveChart from 'components/ActiveChart'; import ActiveChart from '@/components/ActiveChart';
import numeral from 'numeral'; import numeral from 'numeral';
import GridContent from '@/layouts/GridContent'; import GridContent from '@/layouts/GridContent';
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.mapChart { .mapChart {
padding-top: 24px; padding-top: 24px;
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.activitiesList { .activitiesList {
padding: 0 24px 8px 24px; padding: 0 24px 8px 24px;
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { formatMessage } from 'umi/locale'; import { formatMessage } from 'umi/locale';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import Exception from 'components/Exception'; import Exception from '@/components/Exception';
class Exception403 extends Component { class Exception403 extends Component {
render() { render() {
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { formatMessage } from 'umi/locale'; import { formatMessage } from 'umi/locale';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import Exception from 'components/Exception'; import Exception from '@/components/Exception';
class Exception404 extends Component { class Exception404 extends Component {
render() { render() {
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { formatMessage } from 'umi/locale'; import { formatMessage } from 'umi/locale';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import Exception from 'components/Exception'; import Exception from '@/components/Exception';
class Exception500 extends Component { class Exception500 extends Component {
render() { render() {
......
...@@ -13,7 +13,7 @@ import { ...@@ -13,7 +13,7 @@ import {
Popover, Popover,
} from 'antd'; } from 'antd';
import { connect } from 'dva'; import { connect } from 'dva';
import FooterToolbar from 'components/FooterToolbar'; import FooterToolbar from '@/components/FooterToolbar';
import PageHeaderLayout from '@/layouts/PageHeaderLayout'; import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import TableForm from './TableForm'; import TableForm from './TableForm';
import styles from './style.less'; import styles from './style.less';
......
...@@ -2,7 +2,7 @@ import React from 'react'; ...@@ -2,7 +2,7 @@ import React from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Form, Input, Button, Alert, Divider } from 'antd'; import { Form, Input, Button, Alert, Divider } from 'antd';
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import { digitUppercase } from '../../../utils/utils'; import { digitUppercase } from '@/utils/utils';
import styles from './style.less'; import styles from './style.less';
const formItemLayout = { const formItemLayout = {
...@@ -55,11 +55,7 @@ class Step2 extends React.PureComponent { ...@@ -55,11 +55,7 @@ class Step2 extends React.PureComponent {
</Form.Item> </Form.Item>
<Form.Item {...formItemLayout} className={styles.stepFormText} label="转账金钝"> <Form.Item {...formItemLayout} className={styles.stepFormText} label="转账金钝">
<span className={styles.money}>{data.amount}</span> <span className={styles.money}>{data.amount}</span>
<span className={styles.uppercase}> <span className={styles.uppercase}>({digitUppercase(data.amount)}οΌ‰</span>
(
{digitUppercase(data.amount)}
οΌ‰
</span>
</Form.Item> </Form.Item>
<Divider style={{ margin: '24px 0' }} /> <Divider style={{ margin: '24px 0' }} />
<Form.Item {...formItemLayout} label="ζ”―δ»˜ε―†η " required={false}> <Form.Item {...formItemLayout} label="ζ”―δ»˜ε―†η " required={false}>
......
...@@ -2,7 +2,7 @@ import React, { Fragment } from 'react'; ...@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Button, Row, Col } from 'antd'; import { Button, Row, Col } from 'antd';
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import Result from 'components/Result'; import Result from '@/components/Result';
import styles from './style.less'; import styles from './style.less';
@connect(({ form }) => ({ @connect(({ form }) => ({
......
...@@ -4,7 +4,7 @@ import PageHeaderLayout from '@/layouts/PageHeaderLayout'; ...@@ -4,7 +4,7 @@ import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import styles from '../style.less'; import styles from '../style.less';
// import { Route, Redirect, Switch } from 'dva/router'; // import { Route, Redirect, Switch } from 'dva/router';
// import { getRoutes } from '../../../utils/utils'; // import { getRoutes } from '@/utils/utils';
const { Step } = Steps; const { Step } = Steps;
......
...@@ -2,10 +2,10 @@ import React, { PureComponent } from 'react'; ...@@ -2,10 +2,10 @@ import React, { PureComponent } from 'react';
import numeral from 'numeral'; import numeral from 'numeral';
import { connect } from 'dva'; import { connect } from 'dva';
import { Row, Col, Form, Card, Select, Icon, Avatar, List, Tooltip, Dropdown, Menu } from 'antd'; import { Row, Col, Form, Card, Select, Icon, Avatar, List, Tooltip, Dropdown, Menu } from 'antd';
import TagSelect from 'components/TagSelect'; import TagSelect from '@/components/TagSelect';
import StandardFormRow from 'components/StandardFormRow'; import StandardFormRow from '@/components/StandardFormRow';
import { formatWan } from '../../utils/utils'; import { formatWan } from '@/utils/utils';
import styles from './Applications.less'; import styles from './Applications.less';
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.filterCardList { .filterCardList {
margin-bottom: -24px; margin-bottom: -24px;
......
...@@ -3,8 +3,8 @@ import moment from 'moment'; ...@@ -3,8 +3,8 @@ import moment from 'moment';
import { connect } from 'dva'; import { connect } from 'dva';
import { Form, Card, Select, List, Tag, Icon, Avatar, Row, Col, Button } from 'antd'; import { Form, Card, Select, List, Tag, Icon, Avatar, Row, Col, Button } from 'antd';
import TagSelect from 'components/TagSelect'; import TagSelect from '@/components/TagSelect';
import StandardFormRow from 'components/StandardFormRow'; import StandardFormRow from '@/components/StandardFormRow';
import styles from './Articles.less'; import styles from './Articles.less';
const { Option } = Select; const { Option } = Select;
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.listContent { .listContent {
.description { .description {
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.standardList { .standardList {
:global { :global {
......
...@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; ...@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Card, Button, Icon, List } from 'antd'; import { Card, Button, Icon, List } from 'antd';
import Ellipsis from 'components/Ellipsis'; import Ellipsis from '@/components/Ellipsis';
import PageHeaderLayout from '@/layouts/PageHeaderLayout'; import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import styles from './CardList.less'; import styles from './CardList.less';
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.cardList { .cardList {
margin-bottom: -24px; margin-bottom: -24px;
......
...@@ -3,10 +3,10 @@ import moment from 'moment'; ...@@ -3,10 +3,10 @@ import moment from 'moment';
import { connect } from 'dva'; import { connect } from 'dva';
import { Row, Col, Form, Card, Select, List } from 'antd'; import { Row, Col, Form, Card, Select, List } from 'antd';
import TagSelect from 'components/TagSelect'; import TagSelect from '@/components/TagSelect';
import AvatarList from 'components/AvatarList'; import AvatarList from '@/components/AvatarList';
import Ellipsis from 'components/Ellipsis'; import Ellipsis from '@/components/Ellipsis';
import StandardFormRow from 'components/StandardFormRow'; import StandardFormRow from '@/components/StandardFormRow';
import styles from './Projects.less'; import styles from './Projects.less';
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.coverCardList { .coverCardList {
margin-bottom: -24px; margin-bottom: -24px;
......
...@@ -21,7 +21,7 @@ import { ...@@ -21,7 +21,7 @@ import {
Steps, Steps,
Radio, Radio,
} from 'antd'; } from 'antd';
import StandardTable from 'components/StandardTable'; import StandardTable from '@/components/StandardTable';
import PageHeaderLayout from '@/layouts/PageHeaderLayout'; import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import styles from './TableList.less'; import styles from './TableList.less';
......
@import '~antd/lib/style/themes/default.less'; @import '~antd/lib/style/themes/default.less';
@import '../../utils/utils.less'; @import '~@/utils/utils.less';
.tableList { .tableList {
.tableListOperator { .tableListOperator {
......
...@@ -18,7 +18,7 @@ import { ...@@ -18,7 +18,7 @@ import {
Divider, Divider,
} from 'antd'; } from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import DescriptionList from 'components/DescriptionList'; import DescriptionList from '@/components/DescriptionList';
import PageHeaderLayout from '@/layouts/PageHeaderLayout'; import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import styles from './AdvancedProfile.less'; import styles from './AdvancedProfile.less';
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Card, Badge, Table, Divider } from 'antd'; import { Card, Badge, Table, Divider } from 'antd';
import DescriptionList from 'components/DescriptionList'; import DescriptionList from '@/components/DescriptionList';
import PageHeaderLayout from '@/layouts/PageHeaderLayout'; import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import styles from './BasicProfile.less'; import styles from './BasicProfile.less';
......
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { formatMessage, FormattedMessage } from 'umi/locale'; import { formatMessage, FormattedMessage } from 'umi/locale';
import { Button, Row, Col, Icon, Steps, Card } from 'antd'; import { Button, Row, Col, Icon, Steps, Card } from 'antd';
import Result from 'components/Result'; import Result from '@/components/Result';
import PageHeaderLayout from '@/layouts/PageHeaderLayout'; import PageHeaderLayout from '@/layouts/PageHeaderLayout';
const { Step } = Steps; const { Step } = Steps;
......
...@@ -2,7 +2,7 @@ import React, { Component } from 'react'; ...@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import { Checkbox, Alert, Icon } from 'antd'; import { Checkbox, Alert, Icon } from 'antd';
import Login from 'components/Login'; import Login from '@/components/Login';
import styles from './Login.less'; import styles from './Login.less';
const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login; const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login;
......
import React from 'react'; import React from 'react';
import { Button } from 'antd'; import { Button } from 'antd';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
import Result from 'components/Result'; import Result from '@/components/Result';
import styles from './RegisterResult.less'; import styles from './RegisterResult.less';
const actions = ( const actions = (
......
import { stringify } from 'qs'; import { stringify } from 'qs';
import request from '../utils/request'; import request from '@/utils/request';
export async function queryProjectNotice() { export async function queryProjectNotice() {
return request('/api/project/notice'); return request('/api/project/notice');
......
import request from '../utils/request'; import request from '@/utils/request';
export async function query(code) { export async function query(code) {
return request(`/api/${code}`); return request(`/api/${code}`);
......
import request from '../utils/request'; import request from '@/utils/request';
export async function query() { export async function query() {
return request('/api/users'); return request('/api/users');
......
import RenderAuthorized from '../components/Authorized'; import RenderAuthorized from '@/components/Authorized';
import { getAuthority } from './authority'; import { getAuthority } from './authority';
let Authorized = RenderAuthorized(getAuthority()); // eslint-disable-line let Authorized = RenderAuthorized(getAuthority()); // eslint-disable-line
......
import React from 'react'; import React from 'react';
import { yuan } from 'components/Charts'; import { yuan } from '@/components/Charts';
/** /**
* 减少使用 dangerouslySetInnerHTML * 减少使用 dangerouslySetInnerHTML
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment