up
This commit is contained in:
@@ -7,6 +7,7 @@ import { onMounted, ref } from "vue";
|
||||
import Cropper from 'cropperjs';
|
||||
|
||||
|
||||
|
||||
const image = new Image();
|
||||
image.src = "https://wnfed.com/usr/uploads/2020/07/736937178.jpg";
|
||||
image.alt = 'Picture';
|
||||
@@ -20,8 +21,7 @@ onMounted(()=>{
|
||||
|
||||
cropper.value = new Cropper(image, {
|
||||
container: imagecroppert.value,
|
||||
aspectRatio: 1,
|
||||
viewMode: 2,
|
||||
|
||||
|
||||
|
||||
});
|
||||
@@ -33,12 +33,23 @@ onMounted(()=>{
|
||||
|
||||
})
|
||||
|
||||
function getsele(){
|
||||
console.log(cropper.value.getCropperCanvas())
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div class="cropper-container" ref="imagecroppert"></div>
|
||||
|
||||
|
||||
<button @click="getsele">getsele</button>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user