Skip to content

Commit

Permalink
Merge pull request MrXujiang#126 from mokinzhao/master
Browse files Browse the repository at this point in the history
update: preview open the ui project
  • Loading branch information
mokinzhao authored Sep 30, 2021
2 parents 2079f62 + 7914f04 commit 35ed338
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/editor/src/pages/editor/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ const HeaderComponent = memo((props: HeaderComponentProps) => {
const toPreview = () => {
localStorage.setItem('pointData', JSON.stringify(pointData));
savePreview();
setTimeout(() => {
window.open(
isDev
? `/preview?tid=${props.location.query.tid}`
: `/preview?tid=${props.location.query.tid}`,
);
// setTimeout(() => {
// window.open(
// isDev
// ? `/preview?tid=${props.location.query.tid}`
// : `/preview?tid=${props.location.query.tid}`,
// );
// }, 600);
setTimeout(() => {
window.open(`http://localhost:8008/preview?tid=${props.location.query.tid}&pointData=${JSON.stringify(pointData)}`);
}, 600);
};

Expand Down

0 comments on commit 35ed338

Please sign in to comment.