카테고리수정정
This commit is contained in:
parent
b393a29026
commit
f25ad7ffed
@ -18,8 +18,8 @@
|
||||
type="button"
|
||||
class="btn"
|
||||
:class="{
|
||||
'btn-outline-primary': category.value !== selectedCategory,
|
||||
'btn-primary': category.value === selectedCategory
|
||||
'btn-outline-primary': category.value.toString() !== selectedCategory?.toString(),
|
||||
'btn-primary': category.value.toString() === selectedCategory?.toString()
|
||||
}"
|
||||
@click="selectCategory(category.value)"
|
||||
>
|
||||
@ -27,13 +27,11 @@
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps, ref, watch } from 'vue';
|
||||
import { defineProps, defineEmits, ref, watch } from 'vue';
|
||||
|
||||
// lists prop 정의
|
||||
const props = defineProps({
|
||||
lists: {
|
||||
type: Array,
|
||||
@ -44,7 +42,7 @@ const props = defineProps({
|
||||
required: false,
|
||||
},
|
||||
selectedCategory: {
|
||||
type: [String, Number],
|
||||
type: String,
|
||||
default: null,
|
||||
required: false,
|
||||
},
|
||||
@ -63,4 +61,5 @@ watch(() => props.selectedCategory, (newVal) => {
|
||||
selectedCategory.value = newVal;
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user