검색 이벤트 추가
This commit is contained in:
parent
618814acfd
commit
cc748e6d32
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="input-group mb-3 bg-white">
|
||||
<input type="text" class="form-control" placeholder="Search" @change="searchInput" />
|
||||
<input type="text" class="form-control" placeholder="Search" @change="search" />
|
||||
<button type="button" class="btn btn-primary"><i class="bx bx-search bx-md"></i></button>
|
||||
</div>
|
||||
</template>
|
||||
@ -17,7 +17,7 @@
|
||||
});
|
||||
|
||||
const emits = defineEmits(['update:data']);
|
||||
const searchInput = function (event) {
|
||||
const search = function (event) {
|
||||
//Type Number 일때 maxlength 적용 안됨 방지
|
||||
if (event.target.value.length > props.maxlength) {
|
||||
event.target.value = event.target.value.slice(0, props.maxlength);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="container-xxl flex-grow-1 container-p-y">
|
||||
<search-bar @update:data="searchText = $event" />
|
||||
<search-bar @update:data="search" />
|
||||
|
||||
<div class="row g-3">
|
||||
<div class="mt-8">
|
||||
@ -44,6 +44,10 @@
|
||||
const goDetail = idx => {
|
||||
router.push(`/board/get/${idx}`);
|
||||
};
|
||||
|
||||
const search = e => {
|
||||
console.log('검색:', e);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user