提交 d6e75447 authored 作者: 钟是志's avatar 钟是志

编辑器修改

上级 e08cf547
......@@ -49,14 +49,15 @@ function EditDrawer(props) {
// TODO localStorage 事件中获取的state 不是最新的.
const handleLocalStorageSave = (e) => {
if (e.key === 'edit-low-code-local') {
if (e.key === 'save-low-code-local') {
const newV = e.newValue;
if (newV && newV.length > 20) {
changeKey(newV, 'beforeShow');
if (!saveTimeOut.current) {
// saveTimeOut.current = window.setTimeout(() => {
// handleSaveTemplate();
// }, 500);
saveTimeOut.current = window.setTimeout(() => {
message.info('正在保存');
handleSaveTemplate();
}, 500);
}
}
}
......@@ -75,11 +76,11 @@ function EditDrawer(props) {
);
const editFullScreen = () => {
localStorage.setItem('edit-low-code-local', lowCodeEdit['beforeShow']);
localStorage.setItem('edit-low-code-local', JSON.stringify(lowCodeEdit));
if(process.env.NODE_ENV === 'development'){
window.open('http://scjoyedu.eicp.net:51352/wisdomSchool/#/quanPingBianji');
window.open('http://scjoyedu.eicp.net:51352/wisdomSchool/#/quanPingBianji?id=' + lowCodeEdit.TEMPLATE);
}
window.open(window.location.origin + '/wisdomSchool/#/quanPingBianji');
window.open(window.location.origin + '/wisdomSchool/#/quanPingBianji?id=' + lowCodeEdit.TEMPLATE);
};
return (
......@@ -108,9 +109,10 @@ function EditDrawer(props) {
maxRows: 20,
}}
defaultValue={lowCodeEdit?.beforeShow || ''}
onChange={(e) => {
changeKey(e.target.value, 'beforeShow');
}}
readOnly={true}
// onChange={(e) => {
// changeKey(e.target.value, 'beforeShow');
// }}
// readOnly={true}
style={{ marginBottom: '20px' }}
/>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论