fix: 注释掉调试日志以清理控制台输出

This commit is contained in:
alivender
2025-05-20 20:09:39 +08:00
parent dc64a65702
commit a865cfc950
4 changed files with 24 additions and 20 deletions

View File

@@ -615,7 +615,7 @@ function onComponentDrag(e: MouseEvent) {
function stopComponentDrag() {
// 如果有组件被拖拽,保存当前状态
if (draggingComponentId.value) {
console.log(`组件拖拽结束: ${draggingComponentId.value}`);
// console.log(`组件拖拽结束: ${draggingComponentId.value}`);
// 保存图表数据
saveDiagramData(diagramData.value);

View File

@@ -385,6 +385,7 @@ const currentWaveformPath = computed(() => {
function selectWaveform(index: number) {
currentWaveformIndex.value = index;
updateModelValue();
applyOutputWave();
}
async function applyOutputWave() {
@@ -424,7 +425,7 @@ async function applyOutputWave() {
toInteger((phase.value * 4096) / 360),
);
if (ret) {
dialog.info("应用成功");
// dialog.info("应用成功");
} else {
dialog.error("应用失败");
}
@@ -455,6 +456,7 @@ function increaseFrequency() {
frequency.value = parseFloat(frequency.value.toFixed(1)); // 修复浮点数精度问题
frequencyInput.value = formatFrequency(frequency.value);
updateModelValue();
applyOutputWave();
}
function decreaseFrequency() {
@@ -475,6 +477,7 @@ function decreaseFrequency() {
frequency.value = parseFloat(frequency.value.toFixed(1)); // 修复浮点数精度问题
frequencyInput.value = formatFrequency(frequency.value);
updateModelValue();
applyOutputWave();
}
function applyFrequencyInput() {
@@ -505,6 +508,7 @@ function increasePhase() {
}
phaseInput.value = phase.value.toString();
updateModelValue();
applyOutputWave();
}
function decreasePhase() {
@@ -514,6 +518,7 @@ function decreasePhase() {
}
phaseInput.value = phase.value.toString();
updateModelValue();
applyOutputWave();
}
function applyPhaseInput() {

View File

@@ -177,26 +177,26 @@ defineExpose({
getPinPosition: (pinId: string) => {
// 如果是自定义的引脚ID
if (props.pins && props.pins.length > 0) {
console.log('SMT_LED查找Pin ID:', pinId);
console.log('SMT_LED组件尺寸:', props.size, '宽高:', width.value, 'x', height.value);
// console.log('SMT_LED查找Pin ID:', pinId);
// console.log('SMT_LED组件尺寸:', props.size, '宽高:', width.value, 'x', height.value);
const customPin = props.pins.find(p => p.pinId === pinId);
console.log('找到的引脚配置:', customPin);
// console.log('找到的引脚配置:', customPin);
if (customPin) {
// 考虑组件尺寸的缩放
const scaledX = customPin.x * props.size;
const scaledY = customPin.y * props.size;
console.log('使用Pin缩放后的坐标:', scaledX, scaledY);
// console.log('使用Pin缩放后的坐标:', scaledX, scaledY);
return {
x: scaledX,
y: scaledY
};
}
console.log('未找到匹配的引脚');
// console.log('未找到匹配的引脚');
return null;
}
console.log('没有引脚配置');
// console.log('没有引脚配置');
return null;
}
});