How I can call action from pinia store in vue 3 component? I use composition API. For example, I would like to import 'openLessonCard' - it is action in pinia store. But this method for import don't work..
<script setup>
import { openLessonCard } from '../../stores/lessonsN.js';
import { ref, computed } from 'vue'
defineProps({
data: {
type: Object,
required: true,
},
nocollapse: {
type: Boolean,
},
});
const reviewLevel = computed(() => {
return Object.values(this.data.criteria).filter((i) => i === true).length;
})
async function editReviews(id, text, a, b, c, d, e) {
let review = await this.$api.call("reviews.edit", {
id,
text,
a,
b,
c,
d,
e,
});
this.$Message("ok");
}
lessonsN.js
's code – Reconnaissance