refactor: rename components
This commit is contained in:
parent
a4d235b6fe
commit
df9ee293a7
9 changed files with 11 additions and 2 deletions
24
components/common/CommonRichContent.ts
Normal file
24
components/common/CommonRichContent.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import type { Emoji } from 'masto'
|
||||
import type { PropType } from 'vue'
|
||||
import { emojisArrayToObject } from '~/composables/utils'
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
content: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
emojis: {
|
||||
type: Array as PropType<Emoji[]>,
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const emojiObject = emojisArrayToObject(props.emojis || [])
|
||||
|
||||
return () => h(
|
||||
'div',
|
||||
{ class: 'rich-content' },
|
||||
contentToVNode(props.content, undefined, emojiObject),
|
||||
)
|
||||
},
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue