diff --git a/package/component/src/component/select/index.less b/package/component/src/component/select/index.less index 546f488c..389a2a6f 100644 --- a/package/component/src/component/select/index.less +++ b/package/component/src/component/select/index.less @@ -13,8 +13,10 @@ } } -.layui-select-options { - padding: 5px 0; +.layui-select-content { + max-height: 300px; + padding: 5px 0px; + overflow: auto; } .layui-select .layui-icon-triangle-d { @@ -27,7 +29,7 @@ transform: rotate(180deg); } -.layui-select-options .layui-select-option { +.layui-select-content .layui-select-option { padding: 0 10px; line-height: 36px; white-space: nowrap; @@ -35,11 +37,16 @@ text-overflow: ellipsis; } -.layui-select-options .layui-select-option .layui-form-checkbox[lay-skin="primary"] { +.layui-select-content .layui-select-option.layui-disabled { + color: var(--global-neutral-color-6)!important; + cursor: not-allowed!important; +} + +.layui-select-content .layui-select-option .layui-form-checkbox[lay-skin="primary"] { padding-left: 12px; } -.layui-select-options .layui-select-option.layui-this { +.layui-select-content .layui-select-option.layui-this { background-color: var(--global-neutral-color-2); color: var(--global-checked-color); font-size: 700; diff --git a/package/component/src/component/select/index.vue b/package/component/src/component/select/index.vue index 952c93c8..d99ac0af 100644 --- a/package/component/src/component/select/index.vue +++ b/package/component/src/component/select/index.vue @@ -56,7 +56,7 @@ const props = withDefaults(defineProps(), { multiple: false, size: "md", allowClear: false, - showSearch: false + showSearch: false, }); const slots = useSlots(); @@ -100,7 +100,7 @@ onMounted(() => { const handleSearch = (value: string) => { searchValue.value = value; -} +}; const getOption = function (nodes: VNode[]) { nodes?.map((item: VNode) => { @@ -174,7 +174,7 @@ provide("multiple", multiple);