Merge pull request #1273 from nineMangos/dev
bugfix,修复ui.click.target的targetprompt显示错误的问题
This commit is contained in:
commit
c866220495
|
@ -2843,10 +2843,20 @@ export class Click {
|
||||||
}
|
}
|
||||||
if (targetprompt) {
|
if (targetprompt) {
|
||||||
if (Array.isArray(targetprompt)) {
|
if (Array.isArray(targetprompt)) {
|
||||||
targetprompt =
|
const targets = ui.selected.targets.slice();
|
||||||
targetprompt[
|
let index = ui.selected.targets.indexOf(this);
|
||||||
Math.min(targetprompt.length - 1, ui.selected.targets.indexOf(this))
|
for (let i = 0; i < targetprompt.length; i++) {
|
||||||
];
|
const target = targets.find(
|
||||||
|
(cur) => cur.node.prompt && cur.node.prompt.innerText === targetprompt[i]
|
||||||
|
);
|
||||||
|
if (target) {
|
||||||
|
targets.remove(target);
|
||||||
|
} else {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
targetprompt = targetprompt[Math.min(targetprompt.length - 1, index)];
|
||||||
} else if (typeof targetprompt == "function") {
|
} else if (typeof targetprompt == "function") {
|
||||||
targetprompt = targetprompt(this);
|
targetprompt = targetprompt(this);
|
||||||
}
|
}
|
||||||
|
@ -3706,7 +3716,7 @@ export class Click {
|
||||||
showSkillNamePinyin == "showCodeIdentifier"
|
showSkillNamePinyin == "showCodeIdentifier"
|
||||||
? derivation
|
? derivation
|
||||||
: lib.translate[`${derivation}_rt`] ||
|
: lib.translate[`${derivation}_rt`] ||
|
||||||
get.pinyin(derivationName).join(" ");
|
get.pinyin(derivationName).join(" ");
|
||||||
ruby.appendChild(rt);
|
ruby.appendChild(rt);
|
||||||
const rightParenthesisRP = document.createElement("rp");
|
const rightParenthesisRP = document.createElement("rp");
|
||||||
rightParenthesisRP.textContent = ")";
|
rightParenthesisRP.textContent = ")";
|
||||||
|
|
Loading…
Reference in New Issue