vue3-sfc-loader icon indicating copy to clipboard operation
vue3-sfc-loader copied to clipboard

The computed property "xx" is already defined in data.

Open bingxueyinlian opened this issue 2 years ago • 0 comments

Describe the bug When the data variable in the remote component has the same name as the computed property of the host page with mixin, an error is reported,like 'The computed property "aa" is already defined in data.' image

To Reproduce

remote component

<script>
export default {
  data() {
    return {
      aa: '',
    };
  },
};
</script>

host page with mixin mixin.js

let mixin = {
  computed: {
    aa() {
      return '123';
    },
  },
};
export default mixin;

main.js

import mixin from '@/mixin.js';
Vue.mixin(mixin);

Expected behavior The data variable definition of the remote component is independent of the computed property of the host page with mixin.

Versions

  • Browser (name & version): Chrome 100.0.4896.75
  • vue3-sfc-loader: 0.8.4
  • vue:2.6.12

bingxueyinlian avatar Apr 12 '22 10:04 bingxueyinlian