comand-component-library 3.1.52 → 3.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
import {onBeforeUpdate} from "vue"
|
2
|
+
|
1
3
|
export function useSequence() {
|
2
4
|
const sequences = {}
|
3
5
|
|
6
|
+
onBeforeUpdate(resetSequence)
|
7
|
+
|
4
8
|
function nextSequenceValue(sequenceName = "defaultSequence") {
|
5
9
|
const currentValue = sequences[sequenceName] || 0 // get currentValue for specific sequence (else set value to 0)
|
6
10
|
sequences[sequenceName] = currentValue + 1 // raise currentValue by 1
|