mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 05:00:03 +00:00
17 lines
378 B
TypeScript
17 lines
378 B
TypeScript
import { defineStore } from 'pinia'
|
|
import { ref } from 'vue'
|
|
|
|
export const useGlobalSeedStore = defineStore('globalSeed', () => {
|
|
// Global seed value that linked controls will use
|
|
const globalSeed = ref(Math.floor(Math.random() * 1000000))
|
|
|
|
const setGlobalSeed = (value: number) => {
|
|
globalSeed.value = value
|
|
}
|
|
|
|
return {
|
|
globalSeed,
|
|
setGlobalSeed
|
|
}
|
|
})
|