设置vue组件当中的style样式只作用于当前组件

在style当中添加scoped即可

原文地址:https://www.cnblogs.com/kugeliu/p/6649938.html