aboutsummaryrefslogtreecommitdiff
path: root/src/components/TutorialPane.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-08 00:24:47 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-08 00:25:36 +1000
commitef4a9b9223d6019f0b782eb2f944f3cfe2b6ed41 (patch)
treec5838cdf157b403f07b4b90d512fb832a3dbf4d8 /src/components/TutorialPane.vue
parent4209790a0c1737bc9cbf7df2bdcedc541b715dad (diff)
Adjust SCollapsible, allowing for v-model and @open
Diffstat (limited to 'src/components/TutorialPane.vue')
-rw-r--r--src/components/TutorialPane.vue36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/components/TutorialPane.vue b/src/components/TutorialPane.vue
index 9a27dd1..90d0aca 100644
--- a/src/components/TutorialPane.vue
+++ b/src/components/TutorialPane.vue
@@ -118,6 +118,24 @@ export default defineComponent({
return this.uiOpts.touchDevice;
},
},
+ methods: {
+ onStartTutorial(){
+ this.stage = 1;
+ },
+ onSkipTutorial(){
+ this.$emit('skip');
+ this.$emit('close');
+ },
+ onPrevClick(){
+ this.stage = Math.max(1, this.stage - 1);
+ },
+ onNextClick(){
+ this.stage = Math.min(this.stage + 1, this.lastStage);
+ },
+ onClose(){
+ this.$emit('close');
+ },
+ },
watch: {
stage(newVal, oldVal){
// If starting tutorial, disable 'all' actions
@@ -147,24 +165,6 @@ export default defineComponent({
}
},
},
- methods: {
- onStartTutorial(){
- this.stage = 1;
- },
- onSkipTutorial(){
- this.$emit('skip');
- this.$emit('close');
- },
- onPrevClick(){
- this.stage = Math.max(1, this.stage - 1);
- },
- onNextClick(){
- this.stage = Math.min(this.stage + 1, this.lastStage);
- },
- onClose(){
- this.$emit('close');
- },
- },
created(){
if (this.skipWelcome){
this.stage += 1;