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