This commit is contained in:
yanran200730
2022-06-16 10:46:46 +08:00
parent f8cbc8d5aa
commit 4bdd07b3ca
2 changed files with 9 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
<div class="photo-footer"> <div class="photo-footer">
<div class="title"> <div class="title">
<span @click="back">返回</span> <span @click="back">返回</span>
<h2>裁剪</h2> <h2>图片处理</h2>
<span class="save-btn" @click="save">保存</span> <span class="save-btn" @click="save">保存</span>
</div> </div>
<scroll-view class="photo-bottom" scroll-x > <scroll-view class="photo-bottom" scroll-x >
@@ -17,7 +17,7 @@
</div> --> </div> -->
<div class="clipping-item" @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']"> <div class="clipping-item" @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">
<image src="./images/clipping/clipping5.png" /> <image src="./images/clipping/clipping5.png" />
<span>自由</span> <span>自由缩放</span>
</div> </div>
<!-- <div class="clipping-item" @click="currIndex = 2" :class="[currIndex === 2 ? 'active' : '']"> <!-- <div class="clipping-item" @click="currIndex = 2" :class="[currIndex === 2 ? 'active' : '']">
<image src="./images/clipping/clipping4.png" /> <image src="./images/clipping/clipping4.png" />
@@ -80,6 +80,10 @@
uni.$emit('cropper', e.path) uni.$emit('cropper', e.path)
this.back() this.back()
},
rotateAngle () {
this.$refs.Cropper.rotateAngle()
} }
} }
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<view v-show="url" :mode="modeValue" :change:mode="mwx.changeMode" :rotate="rotate" :change:rotate="mwx.changeRotate"> <view style="width: 100%; height: 100%; position: relative;" v-show="url" :mode="modeValue" :change:mode="mwx.changeMode" :rotate="rotate" :change:rotate="mwx.changeRotate">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<canvas type="2d" class="canvas" :style="{width: target.width + 'px', height: target.height + 'px'}"></canvas> <canvas type="2d" class="canvas" :style="{width: target.width + 'px', height: target.height + 'px'}"></canvas>
<!-- #endif --> <!-- #endif -->
@@ -785,6 +785,8 @@ export default {
<style scoped> <style scoped>
.panel { .panel {
position: absolute;
top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;