mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:37:07 +00:00
Add sleep() method to main.js.
Useful when the UI needs to "pause" for UX reasons. Can be called from any component with `this.$root.sleep(ms)`.
This commit is contained in:
@@ -46,6 +46,12 @@ new Vue({
|
||||
|
||||
methods: {
|
||||
|
||||
async sleep (ms = 0) {
|
||||
return await new Promise( (resolve) => {
|
||||
setTimeout( resolve, ms );
|
||||
});
|
||||
},
|
||||
|
||||
markdown (value) {
|
||||
return markdown(value);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user