init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.layui-radio[size=lg] .layui-form-radio>i{font-size:24px}.layui-radio[size=md] .layui-form-radio>i{font-size:22px}.layui-radio[size=sm] .layui-form-radio>i{font-size:20px}.layui-radio[size=xs] .layui-form-radio>i{font-size:18px}.layui-radio input[type=radio]{display:none}.layui-form-radio,.layui-form-radio *{display:inline-block;vertical-align:middle}.layui-form-radio{line-height:28px;margin:6px 10px 0 0;padding-right:10px;cursor:pointer;font-size:0}.layui-form-radio *{font-size:14px}.layui-form-radio>i{margin-right:8px;font-size:22px;color:var(--global-neutral-color-8)}.layui-form-radio:hover *,.layui-form-radioed,.layui-form-radioed>i{color:var(--global-checked-color)}.layui-radio-disabled>i{color:var(--global-neutral-color-3)!important}.layui-radio-disabled *{color:var(--global-neutral-color-8)!important}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,51 @@
|
||||
.layui-avatar {
|
||||
font-size: 14px;
|
||||
font-variant: tabular-nums;
|
||||
border-radius: var(--global-border-radius);
|
||||
box-sizing: border-box;
|
||||
color: #ffffff;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
background: #eeeeee;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.layui-avatar.layui-avatar-radius {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.layui-avatar.layui-avatar-sm {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.layui-avatar.layui-avatar-lg {
|
||||
height: 36px;
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.layui-avatar.layui-avatar-xs {
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
.layui-avatar-list .layui-avatar {
|
||||
margin-left: -10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.layui-avatar {
|
||||
& > img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
@switch-lg: 24px;
|
||||
@switch-md: 22px;
|
||||
@switch-sm: 20px;
|
||||
@switch-xs: 18px;
|
||||
|
||||
@switch-lg-min-width: 42px;
|
||||
@switch-md-min-width: 37px;
|
||||
@switch-sm-min-width: 32px;
|
||||
@switch-xs-min-width: 27px;
|
||||
|
||||
.set-size(@size, @min-width) {
|
||||
& {
|
||||
.layui-form-switch {
|
||||
height: @size;
|
||||
min-width: @min-width;
|
||||
span{
|
||||
width: calc(@size - 4px);
|
||||
height: calc(@size - 4px);
|
||||
transition:all 0.1s linear;
|
||||
}
|
||||
em{
|
||||
margin-left: calc(@size - 3px);
|
||||
}
|
||||
}
|
||||
.layui-form-onswitch{
|
||||
span{
|
||||
left: calc(100% - calc(@size - 1px));
|
||||
}
|
||||
em{
|
||||
margin-right: calc(@size - 3px);
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.layui-switch-container{
|
||||
&[size="lg"] {
|
||||
.set-size(@switch-lg,@switch-lg-min-width);
|
||||
}
|
||||
&[size="md"] {
|
||||
.set-size(@switch-md,@switch-md-min-width);
|
||||
}
|
||||
&[size="sm"] {
|
||||
.set-size(@switch-sm,@switch-sm-min-width);
|
||||
}
|
||||
&[size="xs"] {
|
||||
.set-size(@switch-xs,@switch-xs-min-width);
|
||||
}
|
||||
}
|
||||
|
||||
.layui-switch-container .layui-switch-input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-form-switch {
|
||||
position: relative;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
min-width: 35px;
|
||||
padding: 0 4px;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
background-color: var(--global-neutral-color-6);
|
||||
-webkit-transition:all 0.1s linear;
|
||||
transition:all 0.1s linear;
|
||||
}
|
||||
|
||||
.layui-form-switch span {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
left: 3px;
|
||||
top: 2px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
border-radius: 20px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 4px #00230b33;
|
||||
-webkit-transition:all 0.1s linear;
|
||||
transition:all 0.1s linear;
|
||||
}
|
||||
|
||||
.layui-form-switch em {
|
||||
position: relative;
|
||||
padding: 0 2px;
|
||||
text-align: center !important;
|
||||
color: #999 !important;
|
||||
font-style: normal !important;
|
||||
font-size: 12px;
|
||||
width: 25px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.layui-form-onswitch {
|
||||
border-color: var(--global-checked-color);
|
||||
background-color: var(--global-checked-color);
|
||||
}
|
||||
|
||||
.layui-form-onswitch span {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.layui-form-onswitch em {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.layui-switch-disabled {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.layui-switch-disabled,
|
||||
.layui-switch-disabled *{
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import { w as withInstall } from "../badge/index2.js";
|
||||
import { defineComponent, ref, provide, watch, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
||||
const __default__ = {
|
||||
name: "LayCheckboxGroup"
|
||||
};
|
||||
const _sfc_main = defineComponent({
|
||||
...__default__,
|
||||
props: {
|
||||
modelValue: { default: () => [] },
|
||||
disabled: { type: Boolean, default: false }
|
||||
},
|
||||
emits: ["update:modelValue", "change"],
|
||||
setup(__props, { emit }) {
|
||||
const props = __props;
|
||||
const modelValue = ref(props.modelValue);
|
||||
const disabled = ref(props.disabled);
|
||||
provide("checkboxGroup", {
|
||||
name: "LayCheckboxGroup",
|
||||
modelValue,
|
||||
disabled
|
||||
});
|
||||
watch(() => modelValue, (val) => {
|
||||
emit("change", modelValue.value);
|
||||
emit("update:modelValue", modelValue.value);
|
||||
}, { deep: true });
|
||||
watch(() => props.modelValue, (val) => modelValue.value = val);
|
||||
watch(() => props.disabled, (val) => disabled.value = val);
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: normalizeClass(["layui-checkbox-group", { "layui-checkbox-group-disabled": disabled.value }])
|
||||
}, [
|
||||
renderSlot(_ctx.$slots, "default")
|
||||
], 2);
|
||||
};
|
||||
}
|
||||
});
|
||||
const component = withInstall(_sfc_main);
|
||||
export { component as default };
|
||||
Reference in New Issue
Block a user