This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

开关增加文字支持

old
宇天 2019-09-05 21:32:35 +08:00
parent 0df60c5597
commit 77c3f6480d
1 changed files with 12 additions and 4 deletions

View File

@ -1,13 +1,21 @@
<template> <template>
<section>
<label> <label>
<span class="dot"></span> <span class="dot"></span>
</label> </label>
<slot></slot>
</section>
</template> </template>
<style lang="scss"> <style lang="scss">
:host { :host {
display: inline-block; display: inline-block;
section {
display: flex;
justify-content: center;
align-items: center;
}
label { label {
display: flex; display: flex;
width: 38px; width: 38px;
@ -107,7 +115,7 @@ export default class Switch {
__init__() { __init__() {
/* render */ /* render */
this.__SWITCH__ = this.root.lastElementChild this.__SWITCH__ = this.root.lastElementChild.firstElementChild
} }
get value() { get value() {