fix: frontend upload bitstream failed

This commit is contained in:
2025-05-19 15:56:23 +08:00
parent 5042bf8ce5
commit ba6ec73b84
6 changed files with 99 additions and 102 deletions

View File

@@ -10,15 +10,15 @@
</svg>
</div>
<Teleport to="#ComponentCapabilities" v-if="selectecComponentID === props.componentId">
<MotherBoardCaps :jtagAddr="eqps.boardAddr" :jtagPort="eqps.boardPort.toString()" />
<MotherBoardCaps :jtagAddr="props.boardAddr" :jtagPort="toNumber(props.boardPort)" />
</Teleport>
</template>
<script setup lang="tsx">
import MotherBoardCaps from "./MotherBoardCaps.vue";
import { useEquipments } from "@/stores/equipments";
import { ref, computed, watchEffect, inject } from "vue";
import { CanvasCurrentSelectedComponentID } from "../InjectKeys";
import { toNumber } from "lodash";
// 主板特有属性
export interface MotherBoardProps {
@@ -39,16 +39,6 @@ const selectecComponentID = inject(CanvasCurrentSelectedComponentID, ref(null));
const width = computed(() => 800 * props.size);
const height = computed(() => 600 * props.size);
// Global store
const eqps = useEquipments();
const bitstreamFile = ref<File | null>();
watchEffect(() => {
eqps.setAddr(props.boardAddr);
eqps.setPort(props.boardPort);
});
// 向外暴露方法
defineExpose({
getInfo: () => ({