Closed bingxueyinlian closed 5 months ago
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
Hello bingxueyinlian, this issue is not related to vue3-sfc-loader. see Vue SFC Playground
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](https://user-images.githubusercontent.com/1235035/162945178-bc2a013d-196b-44dc-a708-985cfce9bb50.png)
To Reproduce
remote component
host page with mixin mixin.js
main.js
Expected behavior The data variable definition of the remote component is independent of the computed property of the host page with mixin.
Versions