feat: frontend add set jtag frequency

This commit is contained in:
2025-05-19 21:18:22 +08:00
parent a6ac728cf1
commit d754a881d7
6 changed files with 184 additions and 16 deletions

View File

@@ -10,7 +10,8 @@
</svg>
</div>
<Teleport to="#ComponentCapabilities" v-if="selectecComponentID === props.componentId">
<MotherBoardCaps :jtagAddr="props.boardAddr" :jtagPort="toNumber(props.boardPort)" />
<MotherBoardCaps :jtagAddr="props.boardAddr" :jtagPort="toNumber(props.boardPort)" :jtagFreq="jtagFreq"
@change-jtag-freq="changeJtagFreq" />
</Teleport>
</template>
@@ -35,6 +36,11 @@ const emit = defineEmits<{
const props = withDefaults(defineProps<MotherBoardProps>(), getDefaultProps());
const selectecComponentID = inject(CanvasCurrentSelectedComponentID, ref(null));
const jtagFreq = ref("25 MHz");
function changeJtagFreq(text: string) {
jtagFreq.value = text;
}
// 计算实际宽高
const width = computed(() => 800 * props.size);
const height = computed(() => 600 * props.size);