remove Vue.component from hooks
This commit is contained in:
parent
1f5f612163
commit
76a2e6befb
|
@ -38,7 +38,7 @@ const withLoadMore = ({
|
||||||
this.fetchEntries()
|
this.fetchEntries()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed () {
|
unmounted () {
|
||||||
window.removeEventListener('scroll', this.scrollLoad)
|
window.removeEventListener('scroll', this.scrollLoad)
|
||||||
destroy && destroy(this.$props, this.$store)
|
destroy && destroy(this.$props, this.$store)
|
||||||
},
|
},
|
|
@ -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_subscription.scss'
|
import './with_subscription.scss'
|
||||||
|
@ -22,7 +21,7 @@ const withSubscription = ({
|
||||||
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('withSubscription', {
|
return {
|
||||||
props: [
|
props: [
|
||||||
...props,
|
...props,
|
||||||
'refresh' // boolean saying to force-fetch data whenever created
|
'refresh' // boolean saying to force-fetch data whenever created
|
||||||
|
@ -88,7 +87,7 @@ const withSubscription = ({
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withSubscription
|
export default withSubscription
|
Loading…
Reference in New Issue