Skip to content

Commit b18a495

Browse files
committed
优化:快捷键修改提示文案根据不同系统显示名称优化
1 parent 933528d commit b18a495

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/pages/System/components/HotkeyInput.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {computed, onBeforeMount, ref, watch} from "vue";
33
import {HotkeyKeyItem} from "../../../../electron/mapi/keys/type";
44
55
const focus = ref(false);
6-
const platformName = ref<'win' | 'osx' | 'linux' | null>('');
6+
const platformName = ref<'win' | 'osx' | 'linux' | null>(null);
77
88
onBeforeMount(() => {
99
platformName.value = window.$mapi?.app?.platformName() as any
@@ -131,7 +131,15 @@ const onBlur = () => {
131131
emit('change', newValue)
132132
}
133133
}
134-
const content = "使用方式:① 点击激活 ② 先按功能键(Ctrl、Shift、Alt)再按其他普通键,也可快速按快功能键2次"
134+
const content = computed(() => {
135+
return [
136+
'使用方式:',
137+
'① 点击激活',
138+
platformName.value === 'osx'
139+
? '② 先按功能键(Control、Command、Option)再按其他普通键,也可快速按快功能键2次'
140+
: '② 先按功能键(Ctrl、Shift、Alt)再按其他普通键,也可快速按快功能键2次',
141+
].join('')
142+
})
135143
</script>
136144

137145
<template>

0 commit comments

Comments
 (0)