Inconsistent Objects between Dependency and Application Usage. 应用和依赖取到不同的对象 #14891
Closed
7 tasks done
Labels
duplicate
This issue or pull request already exists
Describe the bug
In
APP.vue
, aPage.vue
(dependencies) component is referenced, and thegetData
function is executed in both components. This function is used to retrieve an object nameddata
. However, after executing thegetData
function twice, the obtaineddata
objects are different.The project created with 'Vue-cli' works well.在
APP.vue
中引用了一个Page.vue
(依赖中的)组件,并在两个组件中都执行了名为getData
的函数。这个函数用来获取一个名为data
的对象。然而,两次执行getData
函数后得到的data
对象却是不同的。vue-cli
创建的项目没有这个问题。dependencies:
dependencies(Page.vue):
my app:
console:
Reproduction
https://stackblitz.com/edit/vitejs-vite-kj9ua2?file=main.js
Steps to reproduce
pnpm dev
open console
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: