refactor(module-management): R2a UI 归一——小文件替换为 ui 组件

- ui Input 补 defineExpose(focus/select/blur),供内联重命名程序化聚焦
- index.vue 树头新建按钮、ModuleBasicPanel 多语言按钮 → ui Button
- StructureTreeNode 内联重命名 input → ui Input,六个操作钮 → ui Button
- ModuleStructureTree 自绘右键菜单 → ui Dropdown(trigger=contextmenu),
  删除自绘定位/关闭监听与 .mst-context-* 样式
This commit is contained in:
oneao committed 2026-08-28 16:25:58 +08:00
1 parent 2dba857880
commit ce3a9d87f8
5 files changed
+108 -221

No files matched your search

@@ -34,6 +34,7 @@ const slots = useSlots()
/* ---------- 公共状态 ---------- */
const focused = ref(false)
const hovered = ref(false)
const inputEl = ref(null)
/* ---------- 公共 computed ---------- */
const isTextarea = computed(() => props.type === 'textarea')
@@ -255,6 +256,13 @@ onMounted(() => {
nextTick(measureDefaultTextareaHeight)
})
/* 程序化聚焦/选中文本(内联重命名等场景需要 focus + select) */
defineExpose({
focus: () => inputEl.value?.focus(),
select: () => inputEl.value?.select(),
blur: () => inputEl.value?.blur(),
})
watch(
() => [props.rows, isTextarea.value],
() => {
@@ -285,6 +293,7 @@ onBeforeUnmount(() => {
<input
v-if="!isTextarea"
ref="inputEl"
class="input"
data-slot="input"
:type="inputType"