Add basic data export framework
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
13
src/pages/submit-mixin.js
Normal file
13
src/pages/submit-mixin.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export default {
|
||||
methods: {
|
||||
newUid (length) {
|
||||
const uidLength = length || 16
|
||||
const uidChars = 'abcdefghijklmnopqrstuvwxyz0123456789'
|
||||
var uid = []
|
||||
for (var i = 0; i < uidLength; i++) {
|
||||
uid.push(uidChars.charAt(Math.floor(Math.random() * ((i < 4) ? 26 : 36))))
|
||||
}
|
||||
return uid.join('')
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user