renderer: add basic pinia sample
This commit is contained in:
1 parent
edc7a835e1
commit
149a9b4862
3 files changed
+27
-22
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user