This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 删除不使用的示例代码 2. 添加加载页面 3. 添加登录页面 4. 添加策略卡片和主页
- Loading branch information
Showing
20 changed files
with
210 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_APP_MODE="Development" | ||
VITE_APP_BASE_API="https://web.hackernel.org" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_APP_MODE="Production" | ||
VITE_APP_BASE_API="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,10 @@ | ||
<script setup lang="ts"> | ||
import { RouterLink, RouterView } from 'vue-router' | ||
import HelloWorld from './components/HelloWorld.vue' | ||
import { RouterView } from 'vue-router' | ||
</script> | ||
|
||
<template> | ||
<header> | ||
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" /> | ||
|
||
<div class="wrapper"> | ||
<HelloWorld msg="You did it!" /> | ||
|
||
<nav> | ||
<RouterLink to="/">Home</RouterLink> | ||
<RouterLink to="/about">About</RouterLink> | ||
</nav> | ||
</div> | ||
</header> | ||
|
||
<RouterView /> | ||
<RouterView /> | ||
</template> | ||
|
||
<style scoped> | ||
header { | ||
line-height: 1.5; | ||
max-height: 100vh; | ||
} | ||
.logo { | ||
display: block; | ||
margin: 0 auto 2rem; | ||
} | ||
nav { | ||
width: 100%; | ||
font-size: 12px; | ||
text-align: center; | ||
margin-top: 2rem; | ||
} | ||
nav a.router-link-exact-active { | ||
color: var(--color-text); | ||
} | ||
nav a.router-link-exact-active:hover { | ||
background-color: transparent; | ||
} | ||
nav a { | ||
display: inline-block; | ||
padding: 0 1rem; | ||
border-left: 1px solid var(--color-border); | ||
} | ||
nav a:first-of-type { | ||
border: 0; | ||
} | ||
@media (min-width: 1024px) { | ||
header { | ||
display: flex; | ||
place-items: center; | ||
padding-right: calc(var(--section-gap) / 2); | ||
} | ||
.logo { | ||
margin: 0 2rem 0 0; | ||
} | ||
header .wrapper { | ||
display: flex; | ||
place-items: flex-start; | ||
flex-wrap: wrap; | ||
} | ||
nav { | ||
text-align: left; | ||
margin-left: -1rem; | ||
font-size: 1rem; | ||
padding: 1rem 0; | ||
margin-top: 1rem; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ a, | |
|
||
#app { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
padding: 0 2rem; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<div class="process-card"> | ||
<div class="process-header">{{ title }}</div> | ||
<div class="process-body"> | ||
<p class="process-text">当前状态: {{ status }}</p> | ||
<p class="process-text">当前策略数: {{ policyCount }}</p> | ||
<p class="process-text">未读事件数: {{ unreadCount }}</p> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from "vue"; | ||
// define the props object to receive the parameters | ||
const props = defineProps({ | ||
title: String, | ||
status: String, | ||
policyCount: Number, | ||
unreadCount: Number | ||
}); | ||
// use the props to initialize the data | ||
const title = ref(props.title); | ||
const policyCount = ref(props.policyCount); | ||
const unreadCount = ref(props.unreadCount); | ||
const status = ref(props.status); | ||
</script> | ||
|
||
<style scoped> | ||
.process-card { | ||
border: 1px solid #0099ff; | ||
margin: 1rem; | ||
} | ||
.process-header { | ||
background-color: #0099ff; | ||
color: white; | ||
padding: 0.5rem; | ||
} | ||
.process-body { | ||
padding: 0.5rem; | ||
} | ||
.process-text { | ||
margin: 0; | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.