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

WIP: Feat 2.x diff editor #902

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from
Open

WIP: Feat 2.x diff editor #902

wants to merge 3 commits into from

Conversation

kiwiwong
Copy link
Collaborator

@kiwiwong kiwiwong commented Sep 25, 2024

简介

1、支持DiffEditor

  • group上增加 diffEditorInstance,同一 group 内所有 diffEditor 共用一个 diffEditorInstance
  • tab 上新增 isDiff、originalValue、modifiedValue、diffEditorModel 属性,根据 isDiff 来决定是否使用 diffEditor
  • EditorController 新增 onDiffEditorMount、onDiffEditorModelMount 方法,处理 diffEditor 的挂载
  • 创建方式仍使用 molecule.editor.open 方法进行创建

2、更新 pnpm-lock 文件,原先包含 taobao 镜像源信息会下载失败,所以进行更新

language: 'typescript',
isDiff: true,
originalValue: '// this is original content',
modifiedValue: '// this is modified content',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉这么写有点复杂,考虑直接 value 是 string 则 Editor,如果是 [string, string] 或者其他类型则为 DiffEditor 吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants