Commit d8c63d96 authored by Yuan Zhixiang's avatar Yuan Zhixiang
Browse files

优化断点跳转布局

parent c0ed4f9f
...@@ -311,7 +311,7 @@ provide('app', { ...@@ -311,7 +311,7 @@ provide('app', {
/* 黑魔法,勿动 */ /* 黑魔法,勿动 */
display: grid; display: grid;
grid-template-columns: 34% 66%; grid-template-columns: 34% 66%;
grid-template-rows: 80% 20%; grid-template-rows: 74% 26%;
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
......
...@@ -31,6 +31,7 @@ const command_available = computed(()=>{ ...@@ -31,6 +31,7 @@ const command_available = computed(()=>{
<PrevButton v-show="!edit_mode" /> <PrevButton v-show="!edit_mode" />
<NextButton v-show="!edit_mode" /> <NextButton v-show="!edit_mode" />
<CommandButton v-show="command_available && edit_mode" /> <CommandButton v-show="command_available && edit_mode" />
<br v-show="!edit_mode">
<NextBreakpoint v-show="!edit_mode" /> <NextBreakpoint v-show="!edit_mode" />
<PrevBreakpoint v-show="!edit_mode" /> <PrevBreakpoint v-show="!edit_mode" />
</div> </div>
......
<script setup> <script setup>
import { inject } from 'vue'; import { computed, inject } from 'vue';
const { current_step, highlight_steps } = inject('app') const { current_step, highlight_steps } = inject('app')
const clickable = computed(()=>{
return highlight_steps.value.length == 0
})
function click() { function click() {
let target let target
let success = false let success = false
...@@ -23,7 +27,7 @@ function click() { ...@@ -23,7 +27,7 @@ function click() {
</script> </script>
<template> <template>
<button class="button" @click="click">下个断点</button> <button class="button" @click="click" :disabled="clickable">下个断点</button>
</template> </template>
<style scoped> <style scoped>
......
<script setup> <script setup>
import { inject } from 'vue'; import { computed, inject } from 'vue';
const { current_step, highlight_steps } = inject('app') const { current_step, highlight_steps } = inject('app')
const clickable = computed(()=>{
return highlight_steps.value.length == 0
})
function click() { function click() {
let target let target
let success = false let success = false
...@@ -23,7 +27,7 @@ function click() { ...@@ -23,7 +27,7 @@ function click() {
</script> </script>
<template> <template>
<button class="button" @click="click">上个断点</button> <button class="button" @click="click" :disabled="clickable">上个断点</button>
</template> </template>
<style scoped> <style scoped>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment