'what should i use istead of ans if i want to make a list?
what should i use istead of ans if i want to make a list? I tried putting more ans var but it doesn't work only displays the last ans
<script setup>
import { ref } from "@vue/reactivity";
const faqToggle = ref(false);
const faqItems = ref([
** {
title: "test",
ans: "· test1",
id: 1,
},**
]);
const id = ref(null);
const toggle = (fid) => {
if (fid === id.value) {
faqToggle.value = !faqToggle.value;
} else {
faqToggle.value = true;
}
id.value = fid;
};
</script>
title: "test",
ans: "· test1",
ans: "· test2",
ans: "· test3",
ans: "· test4",
id: 1,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
