We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2239e56 commit f486d7eCopy full SHA for f486d7e
packages/@vue/cli-ui/src/util/shared-data.js
@@ -32,6 +32,14 @@ export default {
32
}
33
},
34
35
+ beforeCreate () {
36
+ Object.defineProperty(this, '$sharedData', {
37
+ get: () => this.$data.$sharedData,
38
+ enumerable: true,
39
+ configurable: true
40
+ })
41
+ },
42
+
43
created () {
44
const options = this.$options.sharedData
45
if (options) {
@@ -48,6 +56,11 @@ export default {
48
56
} else {
49
57
this.$syncSharedData(options)
50
58
59
+ // Force watchers to re-evaluate
60
+ // Because we just added the proxies to this.$data.$sharedData[key]
61
+ this._watchers.forEach(watcher => {
62
+ watcher.update()
63
51
64
52
65
53
66
0 commit comments