From e48a8a5d2df77f61a4f0848f0e31055ee69e131c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Mon, 5 Dec 2022 02:43:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=80(icon-picker):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20icon-picker=20=E4=B8=8B=E6=8B=89=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/iconPicker/index.less | 5 +++++ package/component/src/component/iconPicker/index.vue | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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 >
{