开关增加文字支持
parent
0df60c5597
commit
77c3f6480d
|
@ -1,13 +1,21 @@
|
|||
<template>
|
||||
<section>
|
||||
<label>
|
||||
<span class="dot"></span>
|
||||
</label>
|
||||
<slot></slot>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
:host {
|
||||
display: inline-block;
|
||||
|
||||
section {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
label {
|
||||
display: flex;
|
||||
width: 38px;
|
||||
|
@ -107,7 +115,7 @@ export default class Switch {
|
|||
__init__() {
|
||||
/* render */
|
||||
|
||||
this.__SWITCH__ = this.root.lastElementChild
|
||||
this.__SWITCH__ = this.root.lastElementChild.firstElementChild
|
||||
}
|
||||
|
||||
get value() {
|
||||
|
|
Reference in New Issue