move styles to richcontent
This commit is contained in:
parent
be79643bcf
commit
a2459c2187
3 changed files with 76 additions and 58 deletions
src/components/rich_content
|
@ -19,7 +19,8 @@ export default Vue.component('RichContent', {
|
|||
},
|
||||
render (h) {
|
||||
const renderImage = (tag) => {
|
||||
return <StillImage {...{ attrs: getAttrs(tag) }} />
|
||||
const attrs = getAttrs(tag)
|
||||
return <StillImage {...{ attrs }} class="img"/>
|
||||
}
|
||||
const structure = convertHtml(this.html)
|
||||
const processItem = (item) => {
|
||||
|
@ -30,7 +31,7 @@ export default Vue.component('RichContent', {
|
|||
this.emoji,
|
||||
({ shortcode, url }) => {
|
||||
return <StillImage
|
||||
class="emoji"
|
||||
class="emoji img"
|
||||
src={url}
|
||||
title={`:${shortcode}:`}
|
||||
alt={`:${shortcode}:`}
|
||||
|
@ -56,8 +57,8 @@ export default Vue.component('RichContent', {
|
|||
}
|
||||
}
|
||||
}
|
||||
return <div>
|
||||
return <span class="RichContent">
|
||||
{ structure.map(processItem) }
|
||||
</div>
|
||||
</span>
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue