0.0.8 • Published 2 years ago

vuenos-upload-image v0.0.8

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

vuenos-upload-image

description

Prerequisites

This project using NodeJS (version 16.10.0 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
7.24.0
v16.10.0

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installation

To install and set up the library, run:

npm install vuenos-upload-image

Usage

Import component

import VuenosUploadImage from "vuenos-upload-image";
<vuenos-upload-image :imgListPreview="imgListPreview"
           :type="'upload'"
           :disabled="true"
           @getImgFileList="getImgFileList">
</vuenos-upload-image>

Upload image

  • Set type = 'upload'
  • Get list of file image through function getImgFileList()
const getImgFileList = (val) => {
    console.log(val)
}
  • Example
<vuenos-upload-image :type="'upload'"
           @getImgFileList="getImgFileList">
</vuenos-upload-image>

Preview image

  • Set type = 'preview'
  • Pass array of img path to :imgListPreview
const imgListPreview = ref([]);
  • Example
<vuenos-upload-image :type="'preview'"
           :imgListPreview="imgListPreview">
</vuenos-upload-image>

Variables binding

ATTRIBUTEDESCRIPTIONREQUIREDTYPEACCEPTED VALUEDEFAULT
imgListPreviewList of image want to show*(Only preview)Arrayempty
typeType of use*Stringupload/previewempty
getImgFileListFunction get image list*(Only upload)Function
disableddisable select imgBooleantrue/falsefalse
widthwidth of component frameNumber9075px
maxImagesmax image can uploadNumber39999
imageTypesimage type can uploadString'.jpg,.jpeg,..''image/*'
maxSizemax size of each image uploadNumber80000008000000

Versioning

v0.0.8

Author

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago