Skip to content

Commit

Permalink
style: 高度设置
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiaa12 committed Oct 23, 2023
1 parent 24f0179 commit e64add2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Expand Up @@ -7,6 +7,7 @@ import Text from "./text.vue"
import { cloudmusicComment } from "@/api"
const format = (txt: string) => {
if(!txt) return ''
const temp = txt.split("——")
temp[1] = `<p style="text-align: right;">——${temp[1]}</p>`
return temp.join('')
Expand Down
15 changes: 5 additions & 10 deletions src/docs/在线应用/小游戏/components/text.vue
Expand Up @@ -32,7 +32,7 @@
/>
<div
class="btn"
v-if="showBtn"
v-if="showBtn && word"
>
<el-button
type="primary"
Expand Down Expand Up @@ -64,7 +64,7 @@ const props = withDefaults(
{
showBtn: true,
position: true,
size: "30px",
size: "1.5rem",
btnText: '换一句'
}
)
Expand All @@ -86,20 +86,15 @@ getData()
</script>
<style lang="scss" scoped>
.min-h100 {
position: relative;
min-height: calc(
var(--vh) - var(--vp-nav-height) - var(--page-pv-height) - 32px
var(--vh) - var(--vp-nav-height) - var(--page-pv-height) - 32px - 7rem
);
display: flex;
align-items: center;
}
.text {
line-height: 1.5;
width: 100%;
&.position {
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
:deep() p {
line-height: inherit;
}
Expand Down

0 comments on commit e64add2

Please sign in to comment.