remove Vue.component, just export an object. Seems to be working

This commit is contained in:
Henry Jameson 2021-04-25 12:46:13 +03:00
parent 509ec99574
commit 1f5f612163
2 changed files with 4 additions and 6 deletions

View file

@ -1,8 +1,7 @@
import Vue from 'vue'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
import UserAvatar from '../user_avatar/user_avatar.vue' import UserAvatar from '../user_avatar/user_avatar.vue'
export default Vue.component('chat-title', { export default {
name: 'ChatTitle', name: 'ChatTitle',
components: { components: {
UserAvatar UserAvatar
@ -23,4 +22,4 @@ export default Vue.component('chat-title', {
return generateProfileLink(user.id, user.screen_name) return generateProfileLink(user.id, user.screen_name)
} }
} }
}) }

View file

@ -1,4 +1,3 @@
import Vue from 'vue'
import isEmpty from 'lodash/isEmpty' import isEmpty from 'lodash/isEmpty'
import { getComponentProps } from '../../services/component_utils/component_utils' import { getComponentProps } from '../../services/component_utils/component_utils'
import './with_load_more.scss' import './with_load_more.scss'
@ -23,7 +22,7 @@ const withLoadMore = ({
const originalProps = Object.keys(getComponentProps(WrappedComponent)) const originalProps = Object.keys(getComponentProps(WrappedComponent))
const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames) const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames)
return Vue.component('withLoadMore', { return {
props, props,
data () { data () {
return { return {
@ -106,7 +105,7 @@ const withLoadMore = ({
</div> </div>
) )
} }
}) }
} }
export default withLoadMore export default withLoadMore