mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-06 20:02:38 +00:00
update
This commit is contained in:
parent
300d51f79b
commit
92fcd4f7b3
2 changed files with 26 additions and 1 deletions
BIN
public/new_font_k_f.bin
Normal file
BIN
public/new_font_k_f.bin
Normal file
Binary file not shown.
|
@ -10,10 +10,16 @@
|
|||
<a-space>
|
||||
<t-card bordered>
|
||||
<template #header>
|
||||
{{ $t('tool.fontwrite') }}
|
||||
{{ $t('tool.fontwrite') }}
|
||||
</template>
|
||||
<a-button @click="restore(1)">{{ $t('tool.writefontwrite') }}</a-button>
|
||||
</t-card>
|
||||
<t-card bordered v-show="state.showHide >= 5">
|
||||
<template #header>
|
||||
{{ $t('tool.fontwrite') }}(繁體)
|
||||
</template>
|
||||
<a-button @click="restore(6)">{{ $t('tool.writefontwrite') }}</a-button>
|
||||
</t-card>
|
||||
<t-card bordered>
|
||||
<template #header>
|
||||
{{ $t('tool.pinyinwrite') }}
|
||||
|
@ -145,6 +151,25 @@ const restore = async(type: any = 1) => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if(type == 6){
|
||||
if(appStore.configuration?.charset == "gb2312"){
|
||||
fontPacket = await fetch('/new_font_k_f.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(0x02480, binary)
|
||||
return;
|
||||
}else{
|
||||
alert('不支持的版本')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue