From 4c20089472b20319746649decbce3a11f16cb6a0 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 07 二月 2025 18:43:24 +0800 Subject: [PATCH] 切换主题,自身设置颜色、大小 --- src/components/chat/chatComponents/multiChat/InputSelect.vue | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/chat/chatComponents/multiChat/InputSelect.vue b/src/components/chat/chatComponents/multiChat/InputSelect.vue index 34b5238..ed763e5 100644 --- a/src/components/chat/chatComponents/multiChat/InputSelect.vue +++ b/src/components/chat/chatComponents/multiChat/InputSelect.vue @@ -1,5 +1,5 @@ <template> - <div class="flex flex-col gap-1"> + <div class="flex flex-col gap-2"> <span class="text-gray-600 font-normal">{{ `${order} ${item?.data?.title}` }}</span> <div class="flex-items-center gap-5"> <!-- <span @@ -10,10 +10,13 @@ :class="{ 'cursor-not-allowed': disabled, 'bg-blue-400': subItem === activeOption, 'text-white': subItem === activeOption }" >{{ subItem }}</span > --> - <el-select v-if="isSelect" v-model="activeOption" placeholder="璇烽�夋嫨" @change="debounceSelect"> + <el-select v-if="isSelect" v-model="activeOption" placeholder="璇烽�夋嫨" @change="selectChange"> <el-option v-for="item in item?.data?.options" :key="item" :label="item" :value="item"></el-option> </el-select> - <el-input v-else @input="debounceSelect" v-model="activeOption" /> + <div v-else class="flex items-center gap-3"> + <el-input v-model="inputValue" /> + <el-button type="primary" @click="submitInput">鎻愪氦</el-button> + </div> </div> </div> </template> @@ -26,7 +29,7 @@ // :class="[...(subItem === activeOption ? ['bg-blue-400', 'text-white'] : []), disabled ? 'cursor-not-allowed' : '']" // 'bg-blue-400': subItem === activeOption, 'text-white': subItem === activeOption.value const isSelect = computed(() => props.item?.data?.options?.length > 0); - +const inputValue = ref(''); const activeOption = ref(); const selectChange = async (option) => { if (props.disabled) return; @@ -38,7 +41,8 @@ activeOption.value = option; } }; -const debounceSelect = debounce(selectChange, 500); - +const submitInput = () => { + selectChange(inputValue.value); +}; </script> <style scoped lang="scss"></style> -- Gitblit v1.9.3