forked from devsam/core
feat: 턴 선택기에서 '턴' 부분 선택 시 커맨드로 선택
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
v-for="(turnObj, turnIdx) in reservedCommandList"
|
||||
:key="turnIdx"
|
||||
class="turn_pad center"
|
||||
@click="chooseCommand(turnObj.action)"
|
||||
>
|
||||
<span
|
||||
class="turn_text"
|
||||
@@ -398,6 +399,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(this.date);
|
||||
@@ -427,6 +431,13 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const invCommandMap: Record<string, commandItem> = {};
|
||||
for(const category of this.commandList){
|
||||
for(const command of category.values){
|
||||
invCommandMap[command.value] = command;
|
||||
}
|
||||
}
|
||||
|
||||
const searchModeOn = (localStorage.getItem(searchModeKey) ?? "0") != "0";
|
||||
|
||||
const emptyTurn: TurnObjWithTime[] = Array.from<TurnObjWithTime>({
|
||||
@@ -461,6 +472,7 @@ export default defineComponent({
|
||||
rowGridStyle,
|
||||
isDragSingle: false,
|
||||
isDragToggle: false,
|
||||
invCommandMap,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user