1.1.1
This commit is contained in:
@@ -125,9 +125,13 @@ export default {
|
||||
// 更新纸张尺寸
|
||||
async updatePaperSize({ dispatch }, { width, height }) {
|
||||
try {
|
||||
const presetKey = `${width}x${height}`;
|
||||
// 预设尺寸同步记录 currentPreset,保证补打/生成页布局正确
|
||||
const currentPreset = ['100x100', '150x150', '200x200'].includes(presetKey) ? presetKey : null;
|
||||
await dispatch('savePrinterConfig', {
|
||||
paperWidth: width,
|
||||
paperHeight: height,
|
||||
currentPreset,
|
||||
lastUpdated: new Date().toISOString()
|
||||
});
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user