renderer: add basic pinia sample

This commit is contained in:
leejooy96 committed 2022-06-14 09:11:43 +09:00
1 parent edc7a835e1
commit 149a9b4862
3 files changed
+27 -22

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { defineStore } from 'pinia'
export const useTempStore = defineStore('temp', {
state: () => ({
text: 'Sample Text'
}),
getters: {
getText: (state) => state.text
},
actions: {
setText (text) {
this.text = text
}
}
})