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