feat: 턴 선택기에서 '턴' 부분 선택 시 커맨드로 선택

This commit is contained in:
2021-12-26 23:57:20 +09:00
parent c3f1457fce
commit 8ccedb598b
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -143,6 +143,7 @@
)"
:key="turnIdx"
class="turn_pad center"
@click="chooseCommand(turnObj.action)"
>
<span
class="turn_text"
@@ -547,6 +548,9 @@ export default defineComponent({
this.searchModeOn = searchModeOn;
localStorage.setItem(searchModeKey, searchModeOn ? "1" : "0");
},
chooseCommand(val: string){
this.selectedCommand = this.invCommandMap[val];
}
},
data() {
const serverNowObj = parseTime(serverNow);
@@ -613,12 +617,20 @@ export default defineComponent({
const isDragSingle = ref(false);
const isDragToggle = ref(false);
const invCommandMap: Record<string, commandItem> = {};
for(const category of commandList){
for(const command of category.values){
invCommandMap[command.value] = command;
}
}
return {
isDragSingle,
isDragToggle,
flippedMaxTurn,
viewMaxTurn,
rowGridStyle,
invCommandMap,
};
},
mounted() {