add dom2component mixin

This commit is contained in:
Absturztaube 2022-04-03 19:50:02 +02:00
parent 5ce9136d89
commit ef986724ef
3 changed files with 13 additions and 0 deletions

View file

@ -15,6 +15,7 @@
* tags as buttons bellow a post
* [pinch and pan media](https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1403)
* swap of react and favorite button in status
* adding __vueComponent__ to DOM nodes to make new mods work
# For Translators

View file

@ -15,6 +15,8 @@ import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js'
import { applyTheme } from '../services/style_setter/style_setter.js'
import FaviconService from '../services/favicon_service/favicon_service.js'
import DomNodeToComponent from '../modules/domNodeToComponent.js'
let staticInitialResults = null
const parsedInitialResults = () => {
@ -392,6 +394,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
app.use(vClickOutside)
app.use(VBodyScrollLock)
app.use(DomNodeToComponent)
app.component('FAIcon', FontAwesomeIcon)
app.component('FALayers', FontAwesomeLayers)

View file

@ -0,0 +1,9 @@
export default {
install: (Vue, options) => {
Vue.mixin({
mounted () {
this.$el.__vueComponent__ = this
}
})
}
}