diff --git a/package/component/src/component/iconPicker/index.less b/package/component/src/component/iconPicker/index.less index d283f789..4d58b48e 100644 --- a/package/component/src/component/iconPicker/index.less +++ b/package/component/src/component/iconPicker/index.less @@ -53,6 +53,7 @@ font-size: 14px; color: rgba(0, 0, 0, 0.5); transition: all 0.3s; + display: inline-block; } .layui-iconpicker-down .layui-iconpicker-suffix .layui-icon-down { @@ -158,4 +159,8 @@ .layui-colorpicker-disabled, .layui-colorpicker-disabled * { cursor: not-allowed !important; +} + +.transform{ + transform: rotate(180deg); } \ No newline at end of file diff --git a/package/component/src/component/iconPicker/index.vue b/package/component/src/component/iconPicker/index.vue index 8f3b0429..74003355 100644 --- a/package/component/src/component/iconPicker/index.vue +++ b/package/component/src/component/iconPicker/index.vue @@ -30,6 +30,7 @@ const props = withDefaults(defineProps(), { const emit = defineEmits(["update:modelValue", "change"]); const selectedIcon = computed(() => props.modelValue); const dropdownRef = ref(null); +const openState = ref(false); const selectIcon = function (icon: string): void { emit("update:modelValue", icon); @@ -143,6 +144,8 @@ const searchList = (str: string, container: any) => { :disabled="disabled" :contentClass="contentClass" :contentStyle="contentStyle" + @hide="openState = false" + @show="openState = true" updateAtScroll >
{