vue3 el-input-group__append如何不影响另一个页面的同一个类名
在Vue.js中,每个页面都有自己的组件实例,因此不同页面之间的同一个类名不会相互影响。可以在每个页面的组件中使用.el-input-group__append类名,它们不会相互冲突。
示例代码:
<template>
<div>
<el-input-group>
<el-input></el-input>
<div class="el-input-group__append">页面1</div>
</el-input-group>
</div>
</template>
<template>
<div>
<el-input-group>
<el-input></el-input>
<div class="el-input-group__append">页面2</div>
</el-input-group>
</div>
</template>
在上面的示例中,页面1和页面2都有一个.el-input-group__append的元素,它们不会相互影响
原文地址: https://www.cveoy.top/t/topic/ie1U 著作权归作者所有。请勿转载和采集!