Add basic data export framework
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
</f7-list>
|
</f7-list>
|
||||||
</f7-accordion-content>
|
</f7-accordion-content>
|
||||||
</f7-list-item>
|
</f7-list-item>
|
||||||
<f7-list-item title="Cordova">{{ isCordova }}</f7-list-item>
|
<f7-list-button title="Submit image" @click="submitData"/>
|
||||||
<f7-list-item title="Turn on debugging">
|
<f7-list-item title="Turn on debugging">
|
||||||
<f7-toggle v-model:checked="debugOn" style="margin-right: 16px;" />
|
<f7-toggle v-model:checked="debugOn" style="margin-right: 16px;" />
|
||||||
</f7-list-item>
|
</f7-list-item>
|
||||||
@@ -221,7 +221,10 @@
|
|||||||
import RegionIcon from '../components/region-icon.vue'
|
import RegionIcon from '../components/region-icon.vue'
|
||||||
import SvgIcon from '../components/svg-icon.vue'
|
import SvgIcon from '../components/svg-icon.vue'
|
||||||
|
|
||||||
|
import submitMixin from './submit-mixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [submitMixin],
|
||||||
props: {
|
props: {
|
||||||
f7route: Object,
|
f7route: Object,
|
||||||
},
|
},
|
||||||
@@ -432,6 +435,9 @@
|
|||||||
this.selectedChip = -1
|
this.selectedChip = -1
|
||||||
const box = this.$refs.structure_box
|
const box = this.$refs.structure_box
|
||||||
box.style.display = 'none'
|
box.style.display = 'none'
|
||||||
|
},
|
||||||
|
submitData () {
|
||||||
|
alert(this.newUid(12))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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