release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
2 changed files with 23 additions and 23 deletions
Showing only changes of commit 3f756437ee - Show all commits

View File

@ -41,7 +41,7 @@ export default defineComponent({
},
setup(props, { root }) {
let title = props.title;
let title = computed<string>(() => {
if (props.title.includes('loadFromStore')) {
const startIndex = props.title.indexOf('(') + 1;
const endIndex = props.title.indexOf(')');
@ -49,12 +49,11 @@ export default defineComponent({
.substring(startIndex, endIndex)
.replace(/"/g, '');
console.log(substring);
console.log(root.$store.getters[substring]);
console.log('loadFromStore');
title = computed(() => {
return root.$store.getters[substring];
});
return <string>root.$store.getters[substring];
}
return props.title;
});
return { realTitle: title };
}
});

View File

@ -22,10 +22,7 @@
/>
</div>
<div class="row">
<q-btn
label="show sessions"
@click="showRootGetters"
/>
<q-btn label="show sessions" @click="showRootGetters" />
</div>
</q-page>
</div>
@ -41,18 +38,22 @@ export default defineComponent({
components: { CircularProgress, Sessions, Main },
setup(_, { root }) {
onBeforeMount(() => {
root.$store.dispatch('sessions/getSessions');
root.$store.dispatch('sessions/getSessions').catch(error => {
console.warn(error);
});
const sessions = computed(() => root.$store.getters['sessions/sessions']);
});
const sessions = computed(
() => <FG.Session[]>root.$store.getters['sessions/sessions']
);
function showRootGetters() {
//ctx.root.$store.dispatch('sessions/getSessions');
console.log(sessions.value);
}
const sessionsLoading = computed(() => {
return root.$store.getters['sessions/loading'];
});
const sessionsLoading = computed(
() => <boolean>root.$store.getters['sessions/loading']
);
return {
showRootGetters,