A simple vue component of croper Decoupling with Images

A simple vue component of croper Decoupling with Images

A simple vue component of croper Decoupling with Images.MAGES A simple vue component of croper Decoupling with Images .a simple vue component of croper, Decoupling with Images, The maximum minimum aspectRatio value can be set.

vue-crop

a simple vue component of croper, Decoupling with Images, The maximum minimum aspectRatio value can be set.

install & use

npm install --save vue-crop-simple

import VueCrop from 'vue-crop-simple';
import 'vue-crop-simple/dist/vue-crop-simple.css';
Vue.use(VueCrop);

<vue-crop
    @changed="changeHandler"
    @beforeChange="beforeChangeHandler"
    :init-rect="{x1: 10, x2: 110, y1: 10, y2: 110}"
    :allowStartNewCrop="false"
    :min-height="100"
    :min-width="100"
    :max-width="500"
    :max-height="500">
</vue-crop>

use in plugin

import VueCrop from 'vue-crop-simple';
import 'vue-crop-simple/dist/vue-crop-simple.css';

// in vue component file
components: {
    VueCrop
}

preview

preview

props:

  • initRect

    Object default {x1: -1, y1: -1, x2: -1, y2: -1} you can set init crop area by this porp

  • showRect

    Boolean default true show or hide crop rect

  • resizeAble

    Boolean default true set the crop rect resizeable property

  • aspectRatio

    Number default undefined set the crop rect aspect radio property. this value makes from width / height

  • allowStartNewCrop

    Boolean default true allow draw a new rect(when a rect is showing).

  • minWidth

    Number default undefined the min width of crop rect

  • maxWidth

    Number default undefined the max width of crop rect

  • minHeight

    Number default undefined the min height of crop rect

  • maxHeight

    Number default undefined the max height of crop rect

events:

  • beforeChange

    trigger when user is ready to drag the crop rect.

  • changed

    trigger when drag end

  • created

    trigger when croper component is mounted

Github

yinzhida/vue-crop

vuejs javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire Dedicated VueJS Developers

Want to Hire VueJS Developer to develop an amazing app? **[Hire Dedicated VueJS Developers](https://hourlydeveloper.io/hire-dedicated-vue-js-developer/ "Hire Dedicated VueJS Developers")** on the contract (time/project) basis providing regular...

The essential JavaScript concepts that you should understand

The essential JavaScript concepts that you should understand - For successful developing and to pass a work interview

What is ECMAScript and How is it Different From JavaScript?

Many times developers use JavaScript and ECMAScript synonymously for each other. Though they are very closely linked to each other, it does not mean they are the same thing.here is a complete story on the history of JavaScript and how it came into existence. To cut the long story short, ECMA in ECMAScript refers to Europen Computer Manufacturers Association to which JavaScript 1.1 was submitted for standardization back in the year 1997.

Data Types In JavaScript

JavaScript data types are kept easy. While JavaScript data types are mostly similar to other programming languages; some of its data types can be unique. Here, we’ll outline the data types of JavaScript.

JavaScript Memory Management System

The main goal of this article is help to readers to understand that how memory management system performs in JavaScript. I will use a shorthand such as GC which means Garbage Collection. When the browsers use Javascript, they need any memory location to store objects, functions, and all other things. Let’s deep in dive that how things going to work in GC.