feat: add switch onswitch-icon and unswitch-icon slot

This commit is contained in:
就眠儀式
2022-03-24 04:23:24 +08:00
parent 5df0a0dea6
commit ce356012ce
9 changed files with 50 additions and 27 deletions

View File

@@ -51,7 +51,12 @@ const handleClick = function () {
}"
>
<em>{{ isActive == true ? activeText : inactiveText }}</em>
<i></i>
<span>
<div>
<slot v-if="isActive" name="onswitch-icon"></slot>
<slot v-else name="unswitch-icon"></slot>
</div>
</span>
</div>
</span>
</template>