展开收起

This commit is contained in:
pplokijuhyg 2019-11-26 11:00:46 +08:00
parent e3743ea8c9
commit e36efea102
4 changed files with 283 additions and 93 deletions

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -57,14 +58,18 @@
}
})(750, 1024);
</script>
<script src="./jquery-3.4.1.min.js"></script>
<title>falv</title>
</head>
<body>
<noscript>
<strong>We're sorry but falv doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong>We're sorry but falv doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

2
public/jquery-3.4.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,10 @@
<div class="line"></div>
<p class="question">有哪些击中你内心阴暗处的句子</p>
<div class="line"></div>
<follow :indexs="0"></follow>
<div class="line"></div>
<follow :indexs="1"></follow>
<div class="line"></div>
<p class="title">相关推荐</p>
<div class="recommend">
<div>
@ -17,7 +21,7 @@
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> -->
<div class="author">汉王的文章 · 556 赞同</div>
</div>
<img src="./assets/tuijian.png" alt="" class="pic">
<img src="./assets/tuijian.png" alt class="pic" />
</div>
<div class="recommend">
<div>
@ -25,21 +29,19 @@
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> -->
<div class="author">汉王的文章 · 556 赞同</div>
</div>
<img src="./assets/tuijian.png" alt="" class="pic">
<img src="./assets/tuijian.png" alt class="pic" />
</div>
<p class="title">热门推荐</p>
<div class="recommend">
<div>
<p class="articlename">丧后即燃李松蔚认知升级 16 </p>
<div class="author">李松蔚的私家课 · 共18</div>
<div class="pics">
<img src="./assets/tuijian.png" alt="" class="picture">
<img src="./assets/tuijian.png" alt="" class="picture">
<img src="./assets/tuijian.png" alt="" class="picture">
<img src="./assets/tuijian.png" alt class="picture" />
<img src="./assets/tuijian.png" alt class="picture" />
<img src="./assets/tuijian.png" alt class="picture" />
</div>
</div>
</div>
<div class="recommend">
@ -48,7 +50,7 @@
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> -->
<div class="author">汉王的文章 · 556 赞同</div>
</div>
<img src="./assets/tuijian.png" alt="" class="pic">
<img src="./assets/tuijian.png" alt class="pic" />
</div>
<div class="recommend">
<div>
@ -56,13 +58,22 @@
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> -->
<div class="author">汉王的文章 · 556 赞同</div>
</div>
<img src="./assets/tuijian.png" alt="" class="pic">
<img src="./assets/tuijian.png" alt class="pic" />
</div>
</div>
</template>
<script>
export default {};
import follow from "./components/indexFollow";
export default {
name: "IndexArticleDetail",
data() {
return {};
},
components: {
follow
}
};
</script>
<style lang="scss">
@ -126,7 +137,7 @@ export default {};
> img {
width: 2.23rem;
height: 1.47rem;
margin-right: 0.1rem
margin-right: 0.1rem;
}
}
}

View File

@ -0,0 +1,172 @@
<template>
<div class="PersonafFollow">
<div class="answer">
<div class="user">
<img src="http://q1.qlogo.cn/g?b=qq&nk=1162963624&s=5" alt srcset />
<div>
<p>啦啦啦</p>
<p>律师</p>
</div>
</div>
<div class="agree">1345人赞同了该回答</div>
<div class="content" style="max-height: 6.1rem;">
<img src alt srcset />
<p>这取决于司法是否独立舆论能影响司法判决结果的只能说明司法肯定不仅仅收到舆论的影响还会收到同样的来自其他多方面的强力的影响这种情况只能说明这取决于司法是否独立舆论能影响司法判决结果的只能说明司法肯定不仅仅收到舆论的影响还会收到同样的来自其他多方面的强力的影响这种情况只能说明这取决于司法是否独立舆论能影响司法判决结果的只能说明司法肯定不仅仅收到舆论的影响还会收到同样的来自其他多方面的强力的影响这种情况只能说明这取决于司法是否独立舆论能影响司法判决结果的只能说明司法肯定不仅仅收到舆论的影响还会收到同样的来自其他多方面的强力的影响这种情况只能说明这取决于司法是否独立舆论能影响司法判决结果的只能说明司法肯定不仅仅收到舆论的影响还会收到同样的来自其他多方面的强力的影响这种情况只能说明这取决于司法是否独立舆论能影响司法判决结果的只能说明司法肯定不仅仅收到舆论的影响还会收到同样的来自其他多方面的强力的影响这种情况只能说明</p>
<div v-show="show" @click="shows">展开阅读全文</div>
</div>
<div class="operation">
<div>
<img src="../assets/share.png" alt srcset />
分享
</div>
<div>
<img src="../assets/share.png" alt srcset />
888评论
</div>
<div v-show="!show && lang" @click="hadd">收起</div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.PersonafFollow {
padding: 0 36px 39px 30px;
border-bottom: 1px solid #dfdfdf;
.title {
display: flex;
justify-content: space-between;
font-size: 26px;
color: #95998f;
margin-bottom: 28px;
}
.center {
font-size: 30px;
color: #000;
line-height: 46px;
}
.answer {
.user {
display: flex;
align-items: center;
margin-top: 34px;
> img {
width: 58px;
height: 58px;
border-radius: 4px;
margin-right: 20px;
}
> div {
display: flex;
flex-direction: column;
> p {
font-size: 24px;
color: #000;
}
> p:last-child {
margin-top: 10px;
font-size: 24px;
color: #999;
}
}
}
.agree {
margin-top: 29px;
font-size: 26px;
color: #95998f;
}
.content {
position: relative;
overflow: hidden;
> img {
width: 690px;
height: 374px;
background-color: #000;
display: block;
margin-top: 39px;
margin-bottom: 32px;
}
> p {
line-height: 40px;
font-size: 26px;
}
> div {
position: absolute;
width: 750px;
height: 45px;
background-color: #fff;
bottom: 0px;
line-height: 35px;
font-size: 24px;
color: #465a33;
text-align: center;
left: -30px;
box-shadow: 0px 0px 30px #fff;
}
}
.operation {
display: flex;
margin-top: 30px;
> div {
margin-right: 60px;
font-size: 22px;
color: #95998f;
> img {
width: 17px;
height: 17px;
margin-right: 11px;
}
}
> div:last-child {
margin-left: 300px;
margin-right: 0;
}
}
}
}
</style>
<script>
export default {
name: "PersonafFollow",
data() {
return {
show: false,
lang:true
};
},
props: {
indexs: {
default: 0
}
},
methods: {
shows() {
var a = window.document.getElementsByClassName("content")[this.indexs];
a.style.setProperty("max-height", "", "important");
this.show = false;
},
hadd() {
var a = window.document.getElementsByClassName("content")[this.indexs];
a.style.setProperty("max-height", "6.1rem", "important");
this.show = true;
}
},
mounted() {
this.$nextTick(() => {
window.console.log(122)
var a = window.document.getElementsByClassName("content")[this.indexs];
var rem = parseFloat(
window.getComputedStyle(window.document.documentElement)["fontSize"]
);
window.console.log(a.offsetHeight, 5.9 * rem);
if (a.offsetHeight > 5.9 * rem) {
this.show = true;
}else{
this.lang=false
}
});
}
};
</script>