-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(components): [switch] (in)active icon slot #15078
Conversation
👋 @xing403, seems like this is your first time contribution to element-plus.
|
🧪 Playground Preview: https://element-plus.run/?pr=15078 |
I can't think of a better example to demonstrate this functionality in documentation. <template>
<div class="play-container">
<el-switch v-model="value">
<template #active-action>
<div>T</div>
</template>
<template #inactive-action>
<div>F</div>
</template>
</el-switch>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const value = ref(true)
</script> |
Yes, it's a case. Since we design a component, we should consider more details. |
Why did the check not successful? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xing403 Could you add a test case?
A test case was added and the documentation was updated |
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
Add custom activeActionIcon and inactiveActionIcon slots to switch component
🤖[deprecated] Generated by Copilot at 83c3e9e
This pull request adds two new slots
activeActionIcon
andinactiveActionIcon
to the switch component, which enable users to customize the icons with any component. It also updates the template and the documentation of the component to use the slots.Related Issue
Fixes #___.
Explanation of Changes
🤖[deprecated] Generated by Copilot at 83c3e9e
tips: 这是 #15013 的重新 fork,不清楚为什么会出现校验不通过 :(