Skip to content

Commit 2711172

Browse files
committed
feat: 1.x
1 parent d2e6438 commit 2711172

File tree

12 files changed

+48
-29
lines changed

12 files changed

+48
-29
lines changed

packages/xconsole-rc-app-layout/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"lodash.foreach": "^4.5.0",
5353
"lodash.isundefined": "^3.0.1",
5454
"lodash.map": "^4.6.0",
55-
"moment": "^2.24.0",
56-
"styled-components": "^4.2.1"
55+
"moment": "^2.24.0"
5756
}
5857
}

packages/xconsole-rc-app-layout/src/Menu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import {
88
withDefaultToPath,
99
} from './utils'
1010

11+
12+
console.log(require.resolve('@alicloud/console-components-console-menu/lib/RoutableMenu'));
13+
1114
const Menu = ({
1215
header,
1316
title,

packages/xconsole-rc-app-layout/stories/index.stories.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ import * as React from 'react';
22
import { storiesOf } from '@storybook/react';
33
import WindProRcAppLayout from '../src/index'
44
import "@alicloud/console-components/dist/wind.css";
5-
import { Router, Route } from 'dva/router'
5+
import { Router, Route, matchPath } from 'dva/router'
66
import createBrowserHistory from 'history/createBrowserHistory'
77

8+
window.matchPath = matchPath;
9+
810
const intl = key => key
911

1012
const sidebar = {
@@ -47,7 +49,8 @@ const sidebar = {
4749
key: '/test',
4850
subNav: [{
4951
title: intl('menu.title.profile.basic'),
50-
key: '/basic-profile',
52+
key: '/basic-profile?test=1',
53+
activePathPatterns: ['/basic-profile']
5154
}, {
5255
title: intl('menu.title.profile.tab'),
5356
key: '/tab-profile/auth',
@@ -78,7 +81,7 @@ const sidebar = {
7881
}
7982

8083
const App = ({history}) => {
81-
return <button onClick={() => history.push('/basic-profile')}>test</button>
84+
return <button onClick={() => history.push('/basic-profile?test=1')}>test</button>
8285
}
8386

8487
storiesOf('WindProRcAppLayout', module)

packages/xconsole-rc-description/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/xconsole-rc-description",
3-
"version": "1.0.0-beta.1",
3+
"version": "1.0.0-beta.2",
44
"main": "lib/index.js",
55
"module": "es/index.js",
66
"license": "MIT",
@@ -52,7 +52,6 @@
5252
"dependencies": {
5353
"@alicloud/console-components-data-fields": "^1.0.4",
5454
"@alicloud/console-components-info": "^1.0.4",
55-
"moment": "^2.24.0",
56-
"styled-components": "^5.0.1"
55+
"moment": "^2.24.0"
5756
}
5857
}

packages/xconsole-rc-page-header/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"dependencies": {
4949
"@alicloud/console-components-page": "^1.0.5",
5050
"lodash.map": "^4.6.0",
51-
"moment": "^2.24.0",
52-
"styled-components": "^5.0.1"
51+
"moment": "^2.24.0"
5352
}
5453
}

packages/xconsole-rc-page/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
},
5151
"dependencies": {
5252
"@alicloud/console-components-page": "^1.0.5",
53-
"dva": "^2.4.1",
54-
"styled-components": "^4.4.0"
53+
"dva": "^2.4.1"
5554
}
5655
}

packages/xconsole-rc-product-icon/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
},
5151
"dependencies": {
5252
"@alicloud/console-components-page": "^1.0.5",
53-
"dva": "^2.4.1",
54-
"styled-components": "^4.4.0"
53+
"dva": "^2.4.1"
5554
}
5655
}

packages/xconsole-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/xconsole-service",
3-
"version": "1.0.0-beta.7",
3+
"version": "1.0.0-beta.8",
44
"main": "lib/index.js",
55
"module": "es/index.js",
66
"license": "MIT",
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// export origin createService
2-
export { default as createService } from './createService'
2+
export { default as createService } from './createService';
33

44
// export api Client
5-
export { default as createApiClient } from './client'
5+
export { default as createApiClient } from './client';
66

77
// export consoleConfig utils
88
export {
@@ -14,13 +14,14 @@ export {
1414
getCollina,
1515
getRiskInfo,
1616
getSecToken,
17-
} from './utils'
17+
setGetRegionIdFn,
18+
} from './utils';
1819

1920
// export reqeust
20-
export { default as request } from './request'
21+
export { default as request } from './request';
2122

2223
// export interceptors
23-
export { default as consoleRequestInterceptor } from './interceptors/consoleRequestInterceptor'
24-
export { default as searchParamsInterceptor } from './interceptors/searchParamsInterceptor'
25-
export { default as consoleRiskInterceptor } from './interceptors/consoleRiskInterceptor'
26-
export { default as consoleResponseInterceptor } from './interceptors/consoleResponseInterceptor'
24+
export { default as consoleRequestInterceptor } from './interceptors/consoleRequestInterceptor';
25+
export { default as searchParamsInterceptor } from './interceptors/searchParamsInterceptor';
26+
export { default as consoleRiskInterceptor } from './interceptors/consoleRiskInterceptor';
27+
export { default as consoleResponseInterceptor } from './interceptors/consoleResponseInterceptor';

packages/xconsole-service/src/utils/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ export const getLocale = function() {
5454
return getConsoleConfig(LOCALE);
5555
};
5656

57+
let getRegionId = null;
58+
59+
export const setGetRegionIdFn = (fn) => {
60+
getRegionId = fn;
61+
}
62+
5763
export const getActiveRegionId = function() {
58-
return Cookies.get(REGION_COOKIE_NAME) || Cookies.get(CURRENT_REGION_COOKIE_NAME) || 'cn-hangzhou';
59-
};
64+
const regionIdFromCookie = Cookies.get(REGION_COOKIE_NAME) || Cookies.get(CURRENT_REGION_COOKIE_NAME) || 'cn-hangzhou';
65+
return getRegionId ? getRegionId() : Cookies.get(REGION_COOKIE_NAME) || Cookies.get(CURRENT_REGION_COOKIE_NAME) || 'cn-hangzhou';
66+
};

0 commit comments

Comments
 (0)