Merge branch 'master' of ssh://git.swordlost.top:222/SikongJueluo/FPGA_WebLab

This commit is contained in:
alivender
2025-07-13 13:56:39 +08:00
5 changed files with 112 additions and 67 deletions

View File

@@ -92,8 +92,6 @@
<ComponentSelector
:open="showComponentsMenu"
@update:open="showComponentsMenu = $event"
@add-component="handleAddComponent"
@add-template="handleAddTemplate"
@close="showComponentsMenu = false"
/>
@@ -219,27 +217,6 @@ function openComponentsMenu() {
showComponentsMenu.value = true;
}
// 处理 ComponentSelector 组件添加元器件事件
async function handleAddComponent(componentData: {
type: string;
name: string;
props: Record<string, any>;
}) {
await componentManager.addComponent(componentData);
}
// 处理模板添加事件
async function handleAddTemplate(templateData: {
id: string;
name: string;
template: any;
}) {
const result = await componentManager.addTemplate(templateData);
if (result) {
alert?.show(result.message, result.success ? "success" : "error");
}
}
// 处理图表数据更新事件
function handleDiagramUpdated(data: DiagramData) {
console.log("Diagram data updated:", data);

View File

@@ -1,7 +1,7 @@
<template>
<div
v-if="open"
class="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50"
class="fixed inset-0 z-50 flex items-center justify-center bg-opacity-30 backdrop-blur-sm shadow-2xl"
>
<div class="bg-base-100 rounded-lg shadow-xl max-w-md w-full mx-4">
<div class="p-6">