-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# 优化文件编辑功能 ## 修改 monaco-editor 默认换行符 monaco 编辑器会自动判断文件的换行符类型。 1. 如果是新建的空文件,则会根据当前运行环境(例如 windows)来决定换行符。 2. 如果不是空文件会根据当前文件的换行符自动判断后续的换行符,如果是 \r\n 后续也是 \r\n 如果原本就是 \n 那后续也是 \n 提交文件运行的模式下,如果文件换行符为 \r\n 时无法提交成功。 用户在 scow 上编写的时 monaco-editor 可能处于 windows 环境,如果在编辑一个新文件就会导致换行符为 \r\n 所以直接将 monaco-editor 的默认换行符设置为 \n,来避免上述情况的发生。但这样对于原本就是 \r\n 的文件,后续编辑会存在两种换行符。 如果要完全避免文件提交运行报错这个问题,还是应该在提交该文件时将换行符进行切换,这种情况仍然会导致该问题: 1. 用户直接上传的文件的换行符为 \r\n 2. 原本的文件就是 \r\n ## 增加流式文件下载中断逻辑 如果流式下载文件未结束时直接关闭模态框打开其他文件模态框会有内容覆盖问题,所需要增加中断流式加载 ## 新增文件加载时禁止点击编辑按钮
- Loading branch information
1 parent
d44b477
commit 43c52ee
Showing
4 changed files
with
85 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@scow/portal-web": patch | ||
--- | ||
|
||
优化文件编辑功能 |
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