mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-11 16:14:30 +08:00
fix: 打字机速度 & 选择框确认框界面按键报错
This commit is contained in:
1 parent
b74c61b8ba
commit
1ce79154d2
3 files changed
+4
-18
No files matched your search
@@ -94,7 +94,7 @@ export const ConfirmBox = defineComponent<
|
||||
});
|
||||
const yesText = computed(() => props.yesText ?? '确认');
|
||||
const noText = computed(() => props.noText ?? '取消');
|
||||
const pad = computed(() => props.pad ?? 32);
|
||||
const pad = computed(() => props.pad ?? 24);
|
||||
const yesLoc = computed<ElementLocator>(() => {
|
||||
const y = height.value - pad.value;
|
||||
return [props.width / 3, y, void 0, void 0, 0.5, 1];
|
||||
|
||||
@@ -462,7 +462,7 @@ export class TextContentTyper extends EventEmitter<TextContentTyperEvent> {
|
||||
renderable.cut = false;
|
||||
const chars = renderable.text.length - renderable.pointer;
|
||||
if (chars >= rest) {
|
||||
renderable.pointer += chars;
|
||||
renderable.pointer += rest;
|
||||
return false;
|
||||
} else {
|
||||
renderable.pointer = renderable.text.length;
|
||||
@@ -1257,7 +1257,7 @@ export class TextContentParser {
|
||||
if (
|
||||
breakChars.has(char) ||
|
||||
isCJK(char.charCodeAt(0)) ||
|
||||
isCJK(next.charCodeAt(0))
|
||||
isCJK(next?.charCodeAt(0))
|
||||
) {
|
||||
this.wordBreak.push(pointer + 1);
|
||||
const rest = width - this.lineWidth;
|
||||
|
||||
Reference in new issue
Block a user