hookehuyr

新闻详情页图片大小只有自适应模式控制

<!--
* @Date: 2024-10-18 12:06:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-23 13:13:10
* @LastEditTime: 2024-10-25 11:53:21
* @FilePath: /hager/src/views/news/detail.vue
* @Description: 文件描述
-->
......@@ -21,7 +21,7 @@
</hager-box>
<hager-box>
<div class="news-title">{{ title }}</div>
<div class="news-content" v-html="content"></div>
<div :class="['news-content', is_xs ? 'xs' : '']" v-html="content"></div>
</hager-box>
</div>
</template>
......@@ -81,9 +81,11 @@ export default {
:deep(.news-content) {
margin-bottom: 2rem;
img {
width: 100%;
height: auto;
&.xs {
img {
width: 100%;
height: auto;
}
}
}
}
......