indexvue.vue
810 字节
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
<template>
<view>
<view>009987</view>
<u-parse :content="article" @preview="preview" @navigate="navigate" ></u-parse>
</view>
</template>
<script>
import uParse from '@/components/u-parse/u-parse.vue'
export default {
components: {
uParse
},
data () {
return {
article: '<p>课程3<img src="http://fnsxcx.w.brotop.cn//uploads/20200301/3b9c208d0221efca65c619deb7f84296.jpg" style="width: 470px;"></p>'
}
},
methods: {
preview(src, e) {
// do something
},
navigate(href, e) {
// do something
}
},
onLoad() {
console.log(this.article)
}
}
</script>
<style>
/* @import url("../../components/u-parse/u-parse.css"); */
.img{
color:red;
fon-size:20rpx;
}
@import url("@/components/u-parse/u-parse.css");
</style>