comand-component-library 3.1.52 → 3.1.53
Sign up to get free protection for your applications and to get access to all the features.
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
|