修复重量单位

This commit is contained in:
2026-07-09 11:06:20 +08:00
parent c3bd7960d0
commit 23aed5f512
3 changed files with 78 additions and 75 deletions
+4 -7
View File
@@ -99,13 +99,10 @@ export default {
// 断开打印机连接
async disconnectPrinter({ commit, dispatch }) {
try {
const config = {
connected: false,
deviceId: '',
deviceName: '',
lastUpdated: new Date().toISOString()
};
await dispatch('savePrinterConfig', config);
commit('SET_PRINTER_CONFIG', {
connected: false // ✅ 只更新连接状态
});
await dispatch('savePrinterConfig');
return true;
} catch (error) {
console.error('断开打印机失败:', error);