This commit is contained in:
Silent YANG 2024-02-09 13:00:12 +08:00
parent 7438344ea3
commit 0a6a307ef8
2 changed files with 16 additions and 0 deletions

BIN
public/pinyin.bin Normal file

Binary file not shown.

View file

@ -8,6 +8,7 @@
<a-button @click="restore(1)">写入 117 字库K</a-button>
<a-button @click="restore(2)">写入 118+ 字库K</a-button>
<a-button @click="restore(3)">写入 118+ 字库H</a-button>
<a-button @click="restore(4)">写入拼音检索表2Mbit EEPROM可用</a-button>
</a-space>
<a-divider />
<div id="statusArea" style="height: 20em; background-color: azure; color: silver; overflow: auto; padding: 20px" v-html="state.status"></div>
@ -108,6 +109,21 @@ const restore = async(type: any = 1) => {
await restoreRange(0x02480, binary)
return;
}
if(type == 4){
fontPacket = await fetch('/pinyin.bin')
const reader = fontPacket.body.getReader();
const chunks = [];
while(true) {
const {done, value} = await reader.read();
if (done) {
break;
}
chunks.push(...value)
}
const binary = new Uint8Array(chunks)
await restoreRange(0x20000, binary)
return;
}
}
</script>