diff --git a/src/App.vue b/src/App.vue
index 0ae533c..7b180aa 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -10,20 +10,18 @@ import { storeToRefs } from 'pinia';
import { useRouter } from 'vue-router';
import YDropDown from '@/components/ui/DropDown.vue';
-const router = useRouter();
const userStore = useUserStore();
userStore.setProfile();
userStore.setConfig();
const useConfig = useConfigStore();
const { config } = storeToRefs(userStore);
-const { currentSystem, onlyShowMain } = storeToRefs(useConfig);
+const { onlyShowMain } = storeToRefs(useConfig);
setTheme(getTheme());
const obj = reactive({
showChangeFontModal: false,
- showChangeSystemModal: false,
userName: '',
password: '',
userNameError: '',
@@ -75,10 +73,6 @@ const changeTheme = () => {
const currentTheme = getTheme();
currentTheme === 'light' ? setTheme('dark') : setTheme('light');
};
-
-function changeSystem(system: string) {
- useConfig.setCurrentSystem(system);
-}
@@ -103,11 +97,6 @@ function changeSystem(system: string) {
@@ -143,7 +120,11 @@ function changeSystem(system: string) {
-
+
选择字体
@@ -170,29 +151,6 @@ function changeSystem(system: string) {
-
-
-
- 选择系统
-
-
-
-
- -
- Windows
-
- -
- Mac
-
-
-
-
-
-
diff --git a/src/store/config.ts b/src/store/config.ts
index 02f40d3..aa3944b 100644
--- a/src/store/config.ts
+++ b/src/store/config.ts
@@ -3,9 +3,7 @@ import { defineStore } from 'pinia';
export const useConfigStore = defineStore('config', {
state: () => ({
onlyShowMain: false as boolean,
- currentSystem: 'win' as string, // win, mac
currentFont: 'default' as string,
- keyboardModalStatus: false as boolean,
printContent: '' as string,
currentCode: [] as any[]
}),
@@ -13,15 +11,9 @@ export const useConfigStore = defineStore('config', {
setOnlyShowMain(val: boolean) {
this.onlyShowMain = val;
},
- setCurrentSystem(val: string) {
- this.currentSystem = val;
- },
setCurrentFont(val: string) {
this.currentFont = val;
},
- setKeyboardModalStatus(val: boolean) {
- this.keyboardModalStatus = val;
- },
setPrintContent(val: string) {
this.printContent += val;
},
diff --git a/src/view/TypingKeyboard.vue b/src/view/TypingKeyboard.vue
index 7a6ab73..1cf7e91 100644
--- a/src/view/TypingKeyboard.vue
+++ b/src/view/TypingKeyboard.vue
@@ -10,11 +10,12 @@ import YModal from '@/components/ui/Modal.vue';
const screenBottomRef = ref();
const state = reactive({
currentKeyBoard: 'standard', // '68' | 'standard'
- currentSystem: 'win' // 'mac' | 'win'
+ currentSystem: 'win', // 'mac' | 'win'
+ keyboardModal: false
});
const configStore = useConfigStore();
-const { printContent, keyboardModalStatus, currentCode, currentSystem } = storeToRefs(configStore);
+const { printContent, currentCode, onlyShowMain } = storeToRefs(configStore);
let timeout: any = null;
@@ -50,6 +51,25 @@ const changeKeyboard = (keyboard: string) => {
>
+
+
+
+ Windows
+
+
+ Mac
+
+
切换键盘
+
+
{
@@ -84,8 +104,8 @@ const changeKeyboard = (keyboard: string) => {
@@ -96,9 +116,9 @@ const changeKeyboard = (keyboard: string) => {
选择键盘
@@ -120,6 +140,26 @@ const changeKeyboard = (keyboard: string) => {
margin: 20px auto;
justify-content: center;
align-items: flex-end;
+ position: relative;
+}
+.y-main__selection {
+ position: absolute;
+ right: 0;
+ width: 100px;
+}
+.y-main__selection-item {
+ padding: 4px 8px;
+ color: $gray-06;
+ margin-bottom: 4px;
+ cursor: pointer;
+ text-align: center;
+ transform: scale(0.9);
+ opacity: 0.6;
+ transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
+ &:hover {
+ opacity: 1;
+ transform: scale(1);
+ }
}
.y-main__screen {
width: 600px;