wip: vm._data for vuex compat
This commit is contained in:
parent
a9d0de50ee
commit
4d62670d3d
@ -117,9 +117,11 @@ export function installCompatInstanceProperties(map: PublicPropertiesMap) {
|
||||
/* istanbul ignore if */
|
||||
if (isCompatEnabled(DeprecationTypes.PRIVATE_APIS, null)) {
|
||||
extend(map, {
|
||||
// needed by many libs / render fns
|
||||
$vnode: i => i.vnode,
|
||||
|
||||
// inject addtional properties into $options for compat
|
||||
// e.g. vuex needs this.$options.parent
|
||||
$options: i => {
|
||||
let res = resolveMergedOptions(i)
|
||||
if (res === i.type) res = i.type.__merged = extend({}, res)
|
||||
@ -128,6 +130,9 @@ export function installCompatInstanceProperties(map: PublicPropertiesMap) {
|
||||
return res
|
||||
},
|
||||
|
||||
// internal data access... (vuex uses this)
|
||||
_data: i => i.data,
|
||||
|
||||
// v2 render helpers
|
||||
$createElement: () => compatH,
|
||||
_self: i => i.proxy,
|
||||
|
Loading…
Reference in New Issue
Block a user