Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复react子应用图片加载失败问题 #826

Merged
merged 1 commit into from Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/react15/index.js
Expand Up @@ -2,10 +2,10 @@
* @author Kuitos
* @since 2019-05-16
*/
import './public-path';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './public-path';

import 'antd/dist/antd.min.css';
import './index.css';
Expand Down
8 changes: 2 additions & 6 deletions examples/react16/src/index.js
@@ -1,7 +1,7 @@
import './public-path';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './public-path';
import * as serviceWorker from './serviceWorker';

function render(props) {
Expand Down Expand Up @@ -35,11 +35,7 @@ export async function mount(props) {

export async function unmount(props) {
const { container } = props;
ReactDOM.unmountComponentAtNode(
container
? container.querySelector('#root')
: document.querySelector('#root')
);
ReactDOM.unmountComponentAtNode(container ? container.querySelector('#root') : document.querySelector('#root'));
}

// If you want your app to work offline and load faster, you can change
Expand Down