add: 为逻辑分析仪添加了深度、预存储深度、通道组设置

This commit is contained in:
alivender
2025-07-31 13:14:23 +08:00
parent 3257a68407
commit 6b701658d1
8 changed files with 1012 additions and 718 deletions

View File

@@ -21,60 +21,7 @@
<h3 class="text-xl font-semibold text-slate-600 mb-2">
暂无逻辑分析数据
</h3>
<p class="text-sm text-slate-500">点击下方按钮开始捕获</p>
</div>
<!-- <button
class="group relative px-8 py-3 bg-gradient-to-r from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700 text-white font-medium rounded-lg shadow-lg hover:shadow-xl transform hover:scale-105 transition-all duration-200 ease-in-out focus:outline-none focus:ring-4 focus:ring-blue-300 active:scale-95"
@click="analyzer.generateTestData"
>
<span class="flex items-center gap-2">
<RefreshCcw
class="w-5 h-5 group-hover:rotate-180 transition-transform duration-300"
/>
生成测试数据
</span>
<div
class="absolute inset-0 bg-white opacity-0 group-hover:opacity-20 rounded-lg transition-opacity duration-200"
></div>
</button> -->
<button
class="group relative px-8 py-3 bg-gradient-to-r text-white font-medium rounded-lg shadow-lg hover:shadow-xl transform hover:scale-105 transition-all duration-200 ease-in-out focus:outline-none focus:ring-4 active:scale-95"
:class="{
'from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700 focus:ring-blue-300':
!analyzer.isCapturing.value,
'from-red-500 to-red-600 hover:from-red-600 hover:to-red-700 focus:ring-red-300':
analyzer.isCapturing.value,
}"
@click="
analyzer.isCapturing.value
? analyzer.stopCapture()
: analyzer.startCapture()
"
>
<span class="flex items-center gap-2">
<template v-if="analyzer.isCapturing.value">
<Square class="w-5 h-5" />
停止捕获
</template>
<template v-else>
<Play class="w-5 h-5" />
开始捕获
</template>
</span>
</button>
<!-- 强制捕获按钮 - 只在正在捕获时显示 -->
<button
v-if="analyzer.isCapturing.value"
class="group relative px-8 py-3 bg-gradient-to-r from-orange-500 to-orange-600 hover:from-orange-600 hover:to-orange-700 text-white font-medium rounded-lg shadow-lg hover:shadow-xl transform hover:scale-105 transition-all duration-200 ease-in-out focus:outline-none focus:ring-4 focus:ring-orange-300 active:scale-95"
@click="analyzer.forceCapture()"
>
<span class="flex items-center gap-2">
<Square class="w-5 h-5" />
强制捕获
</span>
</button>
</div>
</div>
</template>
@@ -82,7 +29,6 @@
<script setup lang="ts">
import { computed, shallowRef } from "vue";
import VChart from "vue-echarts";
import { RefreshCcw, Play, Square } from "lucide-vue-next";
// Echarts
import { use } from "echarts/core";