vue3-sfc-loader
vue3-sfc-loader copied to clipboard
The computed property "xx" is already defined in data.
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.'
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