-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a93b842
commit ee7ab7c
Showing
12 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/midway-web/test/fixtures/enhance/base-app-controller-tsx/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "ali-demo" | ||
} |
29 changes: 29 additions & 0 deletions
29
packages/midway-web/test/fixtures/enhance/base-app-controller-tsx/src/app/controller/my.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { provide } from 'injection'; | ||
import { controller, get } from '../../../../../../../src/'; | ||
import * as React from 'react'; | ||
import * as ReactDOM from 'react-dom/server'; | ||
import App from '../../shared/App'; | ||
|
||
@provide() | ||
@controller('/') | ||
export class My { | ||
@get('/') | ||
async index(ctx) { | ||
ctx.body = ` | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
<title>SSR Test</title> | ||
</head> | ||
<body> | ||
<div id="app">${ReactDOM.renderToString(<App />)}</div> | ||
</body> | ||
</html> | ||
`; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...ges/midway-web/test/fixtures/enhance/base-app-controller-tsx/src/config/config.default.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
export const keys = 'key'; | ||
|
||
export const hello = { | ||
a: 1, | ||
b: 2, | ||
d: [1, 2, 3], | ||
}; | ||
|
||
export const plugins = { | ||
bucLogin: false, | ||
}; |
5 changes: 5 additions & 0 deletions
5
...es/midway-web/test/fixtures/enhance/base-app-controller-tsx/src/config/config.unittest.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
exports.hello = { | ||
b: 4, | ||
c: 3, | ||
}; |
9 changes: 9 additions & 0 deletions
9
packages/midway-web/test/fixtures/enhance/base-app-controller-tsx/src/shared/App.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
h1 { | ||
font-size: 2rem; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/midway-web/test/fixtures/enhance/base-app-controller-tsx/src/shared/App.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as React from 'react'; | ||
import Header from './components/Header'; | ||
// import './App.css'; | ||
|
||
export default () => { | ||
return ( | ||
<div> | ||
<Header /> | ||
<h1>App</h1> | ||
</div> | ||
); | ||
}; |
12 changes: 12 additions & 0 deletions
12
...midway-web/test/fixtures/enhance/base-app-controller-tsx/src/shared/components/Header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as React from 'react'; | ||
|
||
export default () => { | ||
return ( | ||
<ul style={{display: 'flex'}}> | ||
<li>Home</li> | ||
<li style={{marginLeft: 'auto'}}>Menu1</li> | ||
<li>Menu2</li> | ||
<li>Menu3</li> | ||
</ul> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters