import { defineStore } from 'pinia'
const storeDefinition = {
state: () => {
return { count: 0 }
},
actions: {
increment() {
this.count++
},
},
}
const stores = {}
export function getCounterStore(key) {
if (!stores[key]) stores[key] = defineStore(key, storeDefinition)
return stores[key]()
}
import {getCounterStore} from 'awesome-counter-store.js'
...
const store1 = getCounterStore('key1')
const store2 = getCounterStore('key2')
Setting the display property to none will terminate any running animation applied to the element and its descendants. If an element has a display of none, updating display to a value other than none will start all animations applied to the element by the animation-name property, as well as all animations applied to descendants with display other than none.