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