mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-07 20:33:28 +00:00
update
This commit is contained in:
parent
7438344ea3
commit
0a6a307ef8
2 changed files with 16 additions and 0 deletions
BIN
public/pinyin.bin
Normal file
BIN
public/pinyin.bin
Normal file
Binary file not shown.
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue