diff --git a/src/components/keyboard/KeyBoard.vue b/src/components/keyboard/KeyBoard.vue index 3d06d08..855f19a 100644 --- a/src/components/keyboard/KeyBoard.vue +++ b/src/components/keyboard/KeyBoard.vue @@ -11,16 +11,8 @@ import { useDialog, useMessage } from "naive-ui"; import { onBeforeRouteLeave } from "vue-router"; import KeyObservation from "./KeyObservation.vue"; -// TODO 按钮齿轮图标可修改 -// TODO 普通按钮 KeyMacro,KeyCancelSkill,KeyTap -// KeyMacro有输入框 -// TODO 方向轮盘按钮 KeySteeringWheel -// offset -// TODO 技能按钮 KeyDirectionalSkill,KeyDirectionlessSkill,KeyTriggerWhenPressedSkill(有区分directional) -// 靠两个flag来区分这四种情况,还有range或time要视情况 -// TODO 添加视野按钮 KeyObservation -// 有灵敏度scale - +// TODO 设置面板的出现位置,不应该超出范围 +// TODO 为技能添加圆形边框范围,将range属性转换为技能的灵敏度,鼠标移动按比例缩放,100时技能范围最大,最不灵敏,0时就是直接指向对应方向的技能边框的 // TODO 右键空白区域添加按键 // TODO 设置界面添加本地数据编辑器(类似utools) // TODO 添加开发者工具打开按钮 diff --git a/src/components/keyboard/KeyCommon.vue b/src/components/keyboard/KeyCommon.vue index 21b4f12..f6a4915 100644 --- a/src/components/keyboard/KeyCommon.vue +++ b/src/components/keyboard/KeyCommon.vue @@ -11,9 +11,14 @@ import { NCard, useMessage, NFlex, + NInputNumber, } from "naive-ui"; import { CloseCircle, Settings } from "@vicons/ionicons5"; -import { KeyMacro, KeyMacroList } from "../../keyMappingConfig"; +import { + KeyMacro, + KeyMacroList, + KeyTap, +} from "../../keyMappingConfig"; const emit = defineEmits<{ edit: []; @@ -200,6 +205,14 @@ function saveMacro() { 编辑代码 + + + (); + const store = useGlobalStore(); const localStore = new Store("store.bin"); const message = useMessage(); @@ -242,11 +246,6 @@ function saveKeyMappingConfig() { } } -function resetKeyMappingConfig() { - store.resetEditKeyMappingList(); - edited.value = false; -} - function checkConfigSize() { const keyboardElement = document.getElementById( "keyboardElement" @@ -337,7 +336,9 @@ function migrateKeyMappingConfig() { 新建方案 复制方案 @@ -377,7 +378,9 @@ function migrateKeyMappingConfig() { round clearable /> - 导入 + 导入 @@ -385,7 +388,9 @@ function migrateKeyMappingConfig() { - 重命名 + 重命名 diff --git a/src/components/keyboard/KeySkill.vue b/src/components/keyboard/KeySkill.vue index 5659fe9..7f868af 100644 --- a/src/components/keyboard/KeySkill.vue +++ b/src/components/keyboard/KeySkill.vue @@ -1,8 +1,21 @@