修正拼写错误,移除注释,移除无用组件

This commit is contained in:
2025-11-05 11:11:02 +08:00
parent e0e946d9be
commit 9ea792c1c3
7 changed files with 7 additions and 41 deletions

View File

@@ -10,7 +10,6 @@
@font-color2: #666;
@iconfont: 25px;
//基本字体反色
.font-color(@color) when not (@color = black) {
color: white;
}

View File

@@ -1,5 +1,5 @@
@font-face {
font-family: "iconfont"; /* Project id */
font-family: "iconfont";
src: url('iconfont.ttf?t=1762243995389') format('truetype');
}

View File

@@ -1,20 +0,0 @@
<template>
<div>
<h1>123</h1>
<h2>这是一个子组件{{ a }}</h2>
</div>
</template>
<script>
export default {
data() {
return {
a: 114514
}
}
}
</script>
<style scoped>
/* h1{
color: red;
} */
</style>

View File

@@ -1,6 +1,5 @@
<template>
<main class="main">
<!-- 所需数据转为依赖注入 -->
<Most-Popular />
<Movie-List />
</main>
@@ -27,7 +26,6 @@ export default {
overflow: auto;
background-color: @background-color;
//隐藏滚动条
&::-webkit-scrollbar {
display: none;
}

View File

@@ -73,7 +73,6 @@ export default {
>p {
font-size: @ssfont;
color: @font-color2;
//不换行,超出省略
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
@@ -100,7 +99,6 @@ export default {
>.btn-box {
overflow: hidden;
// padding: 0 5px;
>.btn {
width: 54px;

View File

@@ -11,21 +11,21 @@ import Headera from "@/pages/home/components/MyHeader.vue";
import Nav from "@/pages/home/components/MyNav.vue";
import Main from "@/pages/home/components/MyMain.vue";
import Footer from "@/pages/home/components/MyFooter.vue";
import requset from "@/utils";
import request from "@/utils";
import { computed } from "vue";
export default {
data() {
return { rated: {}, movies: {} };
},
mounted() {
requset("http://101.35.148.193:3000/api/rated/list").then((data) => {
request("http://101.35.148.193:3000/api/rated/list").then((data) => {
if (data.success) {
this.rated = data.data;
} else {
this.rated = undefined;
}
});
requset("http://101.35.148.193:3000/api/movies/list").then((data) => {
request("http://101.35.148.193:3000/api/movies/list").then((data) => {
if (data.success) {
this.movies = data.data;
} else {
@@ -41,19 +41,10 @@ export default {
},
provide() {
return {
// 最受好评的电影数据依赖
mostpopular: computed(() => this.rated),
// 电影列表数据依赖
movieList: computed(() => this.movies),
};
},
};
</script>
<style lang="less" scoped>
.home {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
</style>
<style lang="less" scoped></style>

View File

@@ -1,4 +1,4 @@
function requset(url) {
function request(url) {
return fetch(url).then((res) => res.json());
}
export default requset;
export default request;