admin管理员组

文章数量:1278985

If I don't select from the options, I want to search by query when I press enter.

I tried html element id keyup event what should i do?

<UInputMenu
            v-model="query"
            size="lg"
            :search="search"
            class="border-[#CECECE] rounded-lg bg-[#F5F5F5] sm:w-[263px] placeholder:text-[#A8A8A8] absolute flex items-center justify-center"
            :class="
              userProfile?.id ? 'w-[calc(100%-80px)]' : 'w-[calc(100%-210px)]'
            "
            placeholder="search product..."
            selected-icon=""
            :ui="{
              icon: {
                trailing: {
                  pointer: '',
                  padding: {
                    lg: '!px-1',
                  },
                },
              },
            }"
            @update:model-value="handleSearch"
          >
            <template #trailing>
              <UButton
                icon="i-heroicons-magnifying-glass"
                variant="soft"
                class="min-w-14 justify-center"
                @click="handleSearch(query)"
              />
            </template>
          </UInputMenu>

本文标签: javascriptHow to stop the selecting first suggestionStack Overflow