设计器:Designer.cs 标签页默认隐藏

和 VS 里藏在窗体文件下面一样,平时不显示;在设计器里点"查看生成的代码"或点到其中的
编译错误时才临时出现,切走后收起。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-22 18:20:41 +08:00
1 parent 400814d1f6
commit a3eb563b70
2 files changed
+16 -2

No files matched your search

+9
View File
@@ -38,6 +38,8 @@ const emit = defineEmits<{
update: [designerText: string, codeText?: string]
/** 跳到窗体代码文件的某一行 */
openCode: [line: number]
/** 查看设计器生成的 Designer.cs */
openDesignerFile: []
undo: []
redo: []
}>()
@@ -431,6 +433,9 @@ const noop = () => {}
<button :disabled="!canUndo" title="撤销(Ctrl+Z)" @click="emit('undo')">↶ 撤销</button>
<button :disabled="!canRedo" title="重做(Ctrl+Y)" @click="emit('redo')">↷ 重做</button>
<span class="tips">拖动工具箱里的控件到窗体上;双击控件生成事件处理方法;Delete 删除</span>
<button class="view-code" title="设计器根据窗体上的控件自动生成的代码(Designer.cs)" @click="emit('openDesignerFile')">
查看生成的代码
</button>
</div>
<div class="window" :class="{ selected: selected === '' }">
<div class="titlebar" @pointerdown="selected = ''">
@@ -581,6 +586,10 @@ const noop = () => {}
cursor: default;
}
.view-code {
margin-left: auto;
}
.tips {
min-width: 0;
margin-left: 8px;