diff --git a/dist/fix/fix.js b/dist/fix/fix.js index e16bdf99f..63ebd6374 100644 --- a/dist/fix/fix.js +++ b/dist/fix/fix.js @@ -904,6 +904,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons return target; } + function freeze() { + return Object.freeze.apply(null, arguments); + } + /** * Delete a property and trigger change if necessary. */ @@ -1519,6 +1523,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons exports.notify = notify; exports.defineReactive = defineReactive; exports.set = set; + exports.freeze = freeze; exports.del = del; exports.Watcher = Watcher; exports.pushTarget = pushTarget; diff --git a/dist/fix/fix.proxy.js b/dist/fix/fix.proxy.js index f332da88b..19eca6178 100644 --- a/dist/fix/fix.proxy.js +++ b/dist/fix/fix.proxy.js @@ -1838,6 +1838,7 @@ if (!runner.effect.active) { return; } + if (cb) { // watch(source, cb) var newValue = runner(); @@ -2404,6 +2405,15 @@ } target[key] = val; + return target; + } + function freeze(value) { + Object.defineProperty(value, '__v_skip', { + configurable: true, + enumerable: false, + value: value + }); + return value; } function del(target, key) { if (_.isArray(target)) { @@ -2456,6 +2466,7 @@ exports.config = config; exports.define = define; exports.del = del; + exports.freeze = freeze; exports.mixin = mixin; exports.set = set; exports.toJSON = toJSON;