点击图像对比原图

This commit is contained in:
itorr
2022-08-12 18:09:07 +08:00
parent 6a47152fbe
commit f3b6cd4642
3 changed files with 9 additions and 2 deletions

View File

@@ -175,6 +175,7 @@ const data = {
style,
runing: false,
convolutes,
diff: false,
};

View File

@@ -67,7 +67,7 @@ canvas{
canvas{
}
&:active{
&[data-diff]{
img{
opacity: 1;
}

View File

@@ -18,7 +18,13 @@
<!-- <img src="../one-last-image-logo-color.png"> -->
</header>
<div>
<div class="output-box" :data-cover="style.cover">
<div class="output-box"
:data-cover="style.cover"
:data-diff="diff"
@touchstart.prevent="diff = true"
@touchend.prevent="diff = false"
@mousedown.prevent="diff = true"
@mouseup.prevent="diff = false">
<img src="images/asuka-8.jpg" @load="setImageAndDraw">
<canvas ref="canvas"></canvas>
</div>