laravel刀片视图中的Vue.js冲突

问题描述 投票:-1回答:1

我在一个刀片视图中具有两个相同的组件。但是问题在于,vue组件中的功能存在冲突。

[我使vue组件上载了文件,但是当我要使用第二个组件时会触发第一个组件中的功能。

如何防止vue组件中的两个相同功能发生冲突?

laravel vue.js
1个回答
0
投票

只需为您的组件添加键属性

<component1 key="comp100"></componenet/>
<component1 key="comp200"></componenet/>
© www.soinside.com 2019 - 2024. All rights reserved.