This commit is contained in:
parent
9ff824e082
commit
6935bec1e4
|
@ -1,9 +1,15 @@
|
|||
<template>
|
||||
<canvas ref="canvasRef" />
|
||||
<button @click="eraseTo">橡皮擦
|
||||
<i class="iconfont icon-xiangpica"></i>
|
||||
</button>
|
||||
<button @click="close">销毁</button>
|
||||
<canvas ref="canvasRef" style="pointer-events: none;" />
|
||||
<div style="position: absolute;top: 0;" @click="test('click')"
|
||||
@mouseenter="test('mouseenter')" @mousemove="test('mousemove')" @mouseleave="test('mouseleave')"
|
||||
@touchstart="test('touchstart')" @touchmove="test('touchmove')" @touchend="test('touchend')"
|
||||
@touchcancel="test('touchcancel')" @mousedown="test('mousedown')" @mouseup="test('mouseup')"
|
||||
@mouseout="test('mouseout')" @mouseover="test('mouseover')" @mousewheel="test('mousewheel')">
|
||||
<!-- <button @click="eraseTo">橡皮擦</button> -->
|
||||
<!-- <i class="iconfont icon-xiangpica"></i> -->
|
||||
<!-- <button @click="close">销毁</button> -->
|
||||
<div style="width: 100px;height: 100px;background: #ffbcbc;">小星星</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
@ -43,6 +49,10 @@ const eraseTo = () => { // 橡皮擦
|
|||
// canvas.dispose()
|
||||
}
|
||||
const close = () => { FabricVue.removeCanvas() }
|
||||
|
||||
const test = (key, e) => {
|
||||
console.log('event: ', key)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in New Issue