fix: 修复编码器需要重新开关才能使用的问题
This commit is contained in:
@@ -55,7 +55,10 @@ export const useRotaryEncoder = defineStore("RotaryEncoder", () => {
|
||||
}
|
||||
|
||||
function getHubProxy() {
|
||||
if (!rotaryEncoderHub.value) throw new Error("Hub not initialized");
|
||||
if (!rotaryEncoderHub.value) {
|
||||
reinitializeHub();
|
||||
throw new Error("Hub not initialized");
|
||||
}
|
||||
return rotaryEncoderHub.value.proxy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user