label, value 형식으로 수정
This commit is contained in:
parent
d47e3f0d6d
commit
608f7be852
@ -1,21 +1,20 @@
|
||||
<template>
|
||||
<ul class="cate-list list-unstyled d-flex flex-wrap mb-0">
|
||||
<li
|
||||
v-for="category in lists"
|
||||
:key="category.CMNCODVAL"
|
||||
class="mt-2 mx-1"
|
||||
>
|
||||
<button
|
||||
<li v-for="category in lists" :key="category.value" class="mt-2 mx-1">
|
||||
<button
|
||||
type="button"
|
||||
class="btn"
|
||||
:class="{
|
||||
'btn-outline-primary': category.CMNCODVAL !== selectedCategory,
|
||||
'btn-primary': category.CMNCODVAL === selectedCategory
|
||||
'btn-outline-primary': category.value !== selectedCategory,
|
||||
'btn-primary': category.value === selectedCategory
|
||||
}"
|
||||
@click="selectCategory(category.CMNCODVAL)"
|
||||
>{{ category.CMNCODNAM }}</button>
|
||||
@click="selectCategory(category.value)"
|
||||
>
|
||||
{{ category.label }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -48,10 +47,10 @@ const selectCategory = (cate) => {
|
||||
.cate-list {
|
||||
overflow-x: scroll;
|
||||
flex-wrap: nowrap !important;
|
||||
|
||||
|
||||
li {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user