Vue gets the data at the backend, how to hide the excess and use ellipses?

I got the back-end text and set css

html


as usual. I tried to write the text to death, and it worked, but this is a data interaction, and I can"t write it to death. In this case, how to hide the excess part and express it with ellipsis?

Mar.14,2021

white-space: nowrap; 
text-overflow: ellipsis;
overflow: hidden;
width: 100px;//

Why write curly braces and write v-html ?


text-overflow: ellipsis;

see document

for details.

you can do hack processing, hide it first, and then add the ellipsis
-sharpnews_content p {

.
font-size: .16rem;
font-weight: 200;
line-height:.35rem;
height: .7rem;
overflow: hidden;
cursor: pointer;
padding-right: 20px;
position: relative;

}
-sharpnews_content p:after {

content:"...";
position: absolute;
right: 16px;
bottom: 0;

}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d1f4-2b8b5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d1f4-2b8b5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?