mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
feat: preview
This commit is contained in:
parent
f734a612b2
commit
abeb2ba83f
@ -10,7 +10,18 @@ const SamplePreview = ({ editor }: PluginProps) => {
|
||||
if (designer) {
|
||||
console.info('save schema:', designer.schema);
|
||||
localStorage.setItem('lce-dev-store', JSON.stringify(designer.schema));
|
||||
window.open('http://30.5.157.206:3333/', 'preview');
|
||||
fetch('http://30.5.157.206:3000/legao/save.json', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(designer.schema),
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
mode: 'cors',
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then(() => {
|
||||
window.open('http://30.5.157.206:3333/', 'preview');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user