feat: use keyboard to change

This commit is contained in:
anti 2024-09-02 15:25:16 +08:00
parent 72be3f922e
commit 0378e6346a
2 changed files with 5 additions and 2 deletions

View File

@ -57,10 +57,11 @@ export default {
methods: {
init() {
const canvas = this.$refs.canvas
const dialog = document.querySelector('#tiny-engine-chart')
this.bpmnModeler = new BpmnModeler({
container: canvas,
keyboard: {
bindTo: window
bindTo: dialog
}
})

View File

@ -98,13 +98,15 @@
<tiny-dialog-box
class="tiny-engine-chart"
id="tiny-engine-chart"
v-model:visible="state.chart"
append-to-body="true"
width="100%"
top="5vh"
maxHeight="90vh"
tabindex="0"
>
<design-chart />
<design-chart v-if="state.chart" />
</tiny-dialog-box>
</div>
</template>