注入“Symbol()”未找到错误Vuejs

Hie*_* Le 5 vue.js vue-component vuejs2 primevue vuejs3

我在 primevue 中使用确认对话框并收到此错误:

[Vue警告]:找不到注入“Symbol()”

我不知道这个错误是什么以及如何修复它。有人可以帮我吗?这是我的源代码

const deleteCategory = () => {
        confirm.require({
            message: 'Are you sure you want to proceed?',
            header: 'Confirmation',
            icon: 'pi pi-exclamation-triangle',
            accept: () => {
               notification.showMessage("Successfully!");
            },
            reject: () => {
              router.push({ name: "CategoriesPage" });
            }
        });
    }
Run Code Online (Sandbox Code Playgroud)

Ste*_*ert 7

该错误[Vue warn]: injection "Symbol()" not found与您提供的代码无关。在嵌套组件中[Vue warn]: injection ... not found使用时可以重现,而无需从父级实际提供它。inject: ['injectedVar']

因此,您应该检查您尝试注入的内容以及需要从何处提供。有关更多信息,请参阅文档:提供/注入