diff --git a/src/utils/instance.ts b/src/utils/instance.ts index 5abfa75e..157a108b 100644 --- a/src/utils/instance.ts +++ b/src/utils/instance.ts @@ -39,6 +39,9 @@ export function asVmProperty( // expose binding to Vue Devtool as a data property // delay this until state has been resolved to prevent repeated works vm.$nextTick(() => { + if (Object.keys(vm._data).indexOf(propName) !== -1) { + return + } if (isRef(propValue)) { proxy(vm._data, propName, { get: () => propValue.value, diff --git a/test/setup.spec.js b/test/setup.spec.js index e1ac9a6d..d63f72c4 100644 --- a/test/setup.spec.js +++ b/test/setup.spec.js @@ -942,6 +942,34 @@ describe('setup', () => { expect(vm.$el.textContent).toBe('1') }) + // #679 html text change + it('should id not change when msg changed in development', async () => { + global.__DEV__ = true + const vm = new Vue({ + template: '