效果如下
下面是template html
<template>
<div>
<label role="checkbox" :class="['switch', { value }]">
<input type="checkbox" class="switch-input" @change="toggle" />
<div class="switch-core" :style="{ backgroundColor: value ? '#11CED2' : '#E6EAF1' }">
<div
class="switch-button"
:style="{
transition: `transform 100ms`,
transform: value ? `translate3d(32px, 0px, 0px)`<