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-07-25 22:34:01 +08:00
parent d7bde43d53
commit 0e1776cf90
4 changed files with 26 additions and 29 deletions

View File

@ -39,8 +39,7 @@
}
.icon {
width: 18px;
height: 18px;
--size: 18px;
margin-right: 3px;
}
}
@ -65,8 +64,7 @@
font-size: 16px;
}
.icon {
width: 20px;
height: 20px;
--size: 20px;
}
}
:host([size='large'][circle]) {
@ -78,11 +76,6 @@
button {
min-width: 90px;
height: 36px;
font-size: 14px;
}
.icon {
width: 18px;
height: 18px;
}
}
:host([size='medium'][circle]) {
@ -97,8 +90,7 @@
font-size: 12px;
}
.icon {
width: 14px;
height: 14px;
--size: 14px;
}
}

View File

@ -8,6 +8,7 @@
<style lang="scss">
:host {
display: inline-block;
line-height: 1;
font-size: 14px;
label {
@ -36,31 +37,29 @@
}
:host([size='large']) {
font-size: 16px;
label {
width: 58px;
height: 32px;
}
.dot {
--size: 26px;
}
}
:host([size='medium']) {
label {
width: 50px;
height: 28px;
height: 42px;
}
.dot {
--size: 22px;
}
}
:host([size='mini']) {
:host([size='medium']) {
label {
width: 22px;
height: 14px;
padding: 2px;
height: 38px;
}
.dot {
--size: 10px;
--size: 20px;
}
}
:host([size='mini']) {
font-size: 12px;
label {
height: 20px;
}
.dot {
--size: 14px;
}
}
@ -157,8 +156,12 @@ export default class Checkbox {
}
set value(val) {
this.props.value = val
this.checked = this.props.value.includes(this.props.label)
if (Array.isArray(val)) {
this.props.value = val
this.checked = this.props.value.includes(this.props.label)
} else {
throw TypeError(':duplex指令需要传入一个数组, 当前为: ' + typeof val)
}
}
get checked() {

View File

@ -8,6 +8,7 @@
<style lang="scss">
:host {
display: inline-block;
line-height: 1;
font-size: 14px;
label {

View File

@ -11,6 +11,7 @@
display: none;
}
.icon {
display: block;
width: var(--size, 32px);
height: var(--size, 32px);
fill: currentColor;