mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-14 18:11:48 +08:00
refactor(components): [switch] Simplify color handling (#8199)
1. Use CSS variables to set `(in)activeColor` in order not to modify DOM 2. Deprecate property `(in)activeColor` in favor of CSS variables
This commit is contained in:
@ -3,8 +3,7 @@
|
||||
<el-switch
|
||||
v-model="value2"
|
||||
class="ml-2"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
Reference in New Issue
Block a user