refactor: 路由参数 from 改为fromPage
This commit is contained in:
@@ -58,16 +58,16 @@ export const useDeviceSelection = () => {
|
||||
stationCode,
|
||||
deviceType,
|
||||
deviceDbId,
|
||||
from: route.path,
|
||||
fromPage: route.path,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const syncToRoute = () => {
|
||||
const query = { ...route.query };
|
||||
// 当选中的设备发生变化时,删除from参数
|
||||
// 当选中的设备发生变化时,删除fromPage参数
|
||||
if (selectedDevice.value?.id && route.query.deviceDbId !== selectedDevice.value.id) {
|
||||
delete query['from'];
|
||||
delete query['fromPage'];
|
||||
}
|
||||
if (selectedStationCode.value) {
|
||||
query['stationCode'] = selectedStationCode.value;
|
||||
|
||||
Reference in New Issue
Block a user