archy/neode-ui/src/stores/appLauncher.ts

29 lines
518 B
TypeScript
Raw Normal View History

import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useAppLauncherStore = defineStore('appLauncher', () => {
const isOpen = ref(false)
const url = ref('')
const title = ref('')
function open(payload: { url: string; title: string }) {
url.value = payload.url
title.value = payload.title
isOpen.value = true
}
function close() {
isOpen.value = false
url.value = ''
title.value = ''
}
return {
isOpen,
url,
title,
open,
close,
}
})