Merge pull request #153 from cshaptx4869/patch-99

fix: 🐛 修复错误页样式问题
This commit is contained in:
Ray Hao
2024-07-04 17:02:00 +08:00
committed by GitHub
2 changed files with 56 additions and 72 deletions

View File

@@ -2,15 +2,12 @@
import { reactive, toRefs } from "vue"; import { reactive, toRefs } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { defineComponent } from "vue"; defineOptions({
defineComponent({
name: "Page401", name: "Page401",
}); });
const state = reactive({ const state = reactive({
errGif: new URL(`../../assets/images/401.gif`, import.meta.url).href, errGif: new URL(`../../assets/images/401.gif`, import.meta.url).href,
ewizardClap: ewizardClap:
"https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646", "https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646",
dialogVisible: false, dialogVisible: false,
@@ -26,7 +23,7 @@ function back() {
</script> </script>
<template> <template>
<div class="errPage-container"> <div class="page-container">
<el-button icon="el-icon-arrow-left" class="pan-back-btn" @click="back"> <el-button icon="el-icon-arrow-left" class="pan-back-btn" @click="back">
返回 返回
</el-button> </el-button>
@@ -65,10 +62,9 @@ function back() {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.errPage-container { .page-container {
width: 800px; width: 100%;
max-width: 100%; padding: 100px;
margin: 100px auto;
.pan-back-btn { .pan-back-btn {
color: #fff; color: #fff;

View File

@@ -1,19 +1,19 @@
<!-- setup 无法设置组件名称组件名称keepAlive必须 -->
<script lang="ts">
export default {
name: "Page404",
};
</script>
<script setup lang="ts"> <script setup lang="ts">
function message() { import { useRouter } from "vue-router";
return "The webmaster said that you can not enter this page...";
defineOptions({
name: "Page404",
});
const router = useRouter();
function back() {
router.back();
} }
</script> </script>
<template> <template>
<div class="wscn-http404-container"> <div class="page-container">
<div class="wscn-http404">
<div class="pic-404"> <div class="pic-404">
<img class="pic-404__parent" src="@/assets/images/404.png" alt="404" /> <img class="pic-404__parent" src="@/assets/images/404.png" alt="404" />
<img <img
@@ -43,34 +43,26 @@ function message() {
>wallstreetcn</a >wallstreetcn</a
> >
</div> </div>
<div class="bullshit__headline">{{ message() }}</div> <div class="bullshit__headline">
The webmaster said that you can not enter this page...
</div>
<div class="bullshit__info"> <div class="bullshit__info">
Please check that the URL you entered is correct, or click the button Please check that the URL you entered is correct, or click the button
below to return to the homepage. below to return to the homepage.
</div> </div>
<a href="" class="bullshit__return-home">Back to home</a> <a href="#" class="bullshit__return-home" @click.prevent="back">
</div> Back to home
</a>
</div> </div>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.wscn-http404-container { .page-container {
position: absolute; display: flex;
top: 40%; padding: 100px;
left: 50%;
transform: translate(-50%, -50%);
}
.wscn-http404 {
position: relative;
width: 1200px;
padding: 0 50px;
overflow: hidden;
.pic-404 { .pic-404 {
position: relative;
float: left;
width: 600px; width: 600px;
overflow: hidden; overflow: hidden;
@@ -79,8 +71,6 @@ function message() {
} }
&__child { &__child {
position: absolute;
&.left { &.left {
top: 17px; top: 17px;
left: 220px; left: 220px;
@@ -198,8 +188,6 @@ function message() {
} }
.bullshit { .bullshit {
position: relative;
float: left;
width: 300px; width: 300px;
padding: 30px 0; padding: 30px 0;
overflow: hidden; overflow: hidden;