Detail.vue
756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<template>
<view style="padding: 10px;" class="container">
<view v-html="info"></view>
</view>
</template>
<script>
import BASE_URL from '@/common/config.js';
export default {
data() {
return {
info: "",
};
},
onLoad(e) {
this.API.GetDetail(e.id).then(res => {
if (res.code == 200) {
let content = res.data.content;
content = content.replaceAll('<img','<img style="max-width:100%;"');
this.info = content;
}
})
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.container{
max-width: 100vw;
img{
max-width: 100%;
}
}
</style>
<style lang="scss">
/deep/ rich-text{
width: 100px !important;
height: 100px !important;
}
</style>