You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
634 B
35 lines
634 B
3 years ago
|
<template>
|
||
|
<view class="lxwm ql-editor" v-html="node">
|
||
|
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import {criticismaboutMe} from '@/api/user.js'
|
||
|
import {ref} from 'vue'
|
||
|
export default {
|
||
|
setup() {
|
||
|
let node=ref('')
|
||
|
criticismaboutMe({}).then(res=>{
|
||
|
console.log(res.data);
|
||
|
node.value=res.data.content
|
||
|
let richtext = node.value
|
||
|
let regex = new RegExp('<img', 'gi');
|
||
|
richtext = richtext.replace(regex, '<img style="max-width: 100%;"');
|
||
|
node.value = richtext
|
||
|
})
|
||
|
return {
|
||
|
node
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
|
.lxwm{
|
||
|
width: 100%;
|
||
|
padding: 20upx 30upx;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
</style>
|