From 449ada30c271c48658060e127f4d8ad7cdd734cb Mon Sep 17 00:00:00 2001
From: yuetsh <517252939@qq.com>
Date: Tue, 31 Jan 2023 22:41:09 +0800
Subject: [PATCH] refactor header.
---
src/components.d.ts | 2 ++
src/learn/index.vue | 43 ++++++++++-----------------------
src/shared/Header.vue | 20 ++++++++++++---
src/shared/composables/learn.ts | 1 +
4 files changed, 32 insertions(+), 34 deletions(-)
create mode 100644 src/shared/composables/learn.ts
diff --git a/src/components.d.ts b/src/components.d.ts
index c4e0309..eb31f7a 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,8 +12,10 @@ declare module '@vue/runtime-core' {
IEpLoading: typeof import('~icons/ep/loading')['default']
IEpLock: typeof import('~icons/ep/lock')['default']
IEpMenu: typeof import('~icons/ep/menu')['default']
+ IEpMoon: typeof import('~icons/ep/moon')['default']
IEpMore: typeof import('~icons/ep/more')['default']
IEpMoreFilled: typeof import('~icons/ep/more-filled')['default']
+ IEpSunny: typeof import('~icons/ep/sunny')['default']
NAlert: typeof import('naive-ui')['NAlert']
NButton: typeof import('naive-ui')['NButton']
NButtonGroup: typeof import('naive-ui')['NButtonGroup']
diff --git a/src/learn/index.vue b/src/learn/index.vue
index fb83d17..49aa606 100644
--- a/src/learn/index.vue
+++ b/src/learn/index.vue
@@ -1,6 +1,8 @@
@@ -60,27 +58,23 @@ function run() {
-
- 运行
+
-
+
+
+
+ 上一步
+
+
+ 下一步
+
+
-
-
- 上一步
-
-
- 下一步
-
-
-
- 运行
-
-
+
@@ -119,15 +113,4 @@ function run() {
text-align: right;
color: rgba(115, 138, 148, 0.4);
}
-
-.relative {
- position: relative;
-}
-
-.action {
- position: absolute;
- top: 10px;
- right: 10px;
- z-index: 10;
-}
diff --git a/src/shared/Header.vue b/src/shared/Header.vue
index cc65078..a2a1252 100644
--- a/src/shared/Header.vue
+++ b/src/shared/Header.vue
@@ -1,5 +1,4 @@
@@ -75,14 +79,15 @@ const options = computed>(() => [
-
-
+
+
{{ userStore.user.username }}
@@ -92,13 +97,20 @@ const options = computed>(() => [
注册
+
+ 运行
+
+
+ 运行
+
{{ userStore.user.username }}
@@ -106,7 +118,7 @@ const options = computed>(() => [
登录
注册
-
+
diff --git a/src/shared/composables/learn.ts b/src/shared/composables/learn.ts
new file mode 100644
index 0000000..2eb2420
--- /dev/null
+++ b/src/shared/composables/learn.ts
@@ -0,0 +1 @@
+export const code = ref("")