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: { methods: {
init() { init() {
const canvas = this.$refs.canvas const canvas = this.$refs.canvas
const dialog = document.querySelector('#tiny-engine-chart')
this.bpmnModeler = new BpmnModeler({ this.bpmnModeler = new BpmnModeler({
container: canvas, container: canvas,
keyboard: { keyboard: {
bindTo: window bindTo: dialog
} }
}) })

View File

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