npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-amiral-imagelist

v1.2.0

Published

A Vue.js component that image list and uploading as dragable

Downloads

3

Readme

Vue component (Vue.js 2.0) or directive (Vue.js 1.0) allowing drag-and-drop and synchronization with view model array. This component can upload&view only your image list for now. Actualy i create this component for use myself. I will add custom upload function and events to future

Demo

demo gif

Installation

With npm

npm i -S vue-amiral-imagelist

main.js file:

import imagelist from "vue-amiral-imagelist" 

Vue.use(imagelist, {
    upload_target_url : "http://localhost/amiralimagelist/upload.php"
    view_path_prefix : "http://localhost/amiralimagelist",
    upload_group_method : "query",
})

Use in project:

<vue-amiral-imagelist v-model="images" mediagroup="product" limit="6" sizetype="h" />
data: () => ({
    images: [
        "/media/product/1a7ee63a-fefc-42ea-84b2-b2d8bd949f2a.jpg",
        "/media/product/3612fe5c-ab66-4a88-a49c-6462597fbcf6.jpg"
    ],
}),

Attributes

v-model What: it's your image list container array variable Type: Array Required: true Default: null mediagroup What: it's your adverb for uploading from which image list. More info bottom of page in Default Config Type: String Required: false Default: null limit What: If you want use max image limit you can give a max limit Type: String or Number Required: false Default: null sizetype What: If you wanna allow only horizontal|vertical|square pics, you can use this as "hvs" or "h" or "v" or "s" Type: String Required: false Default: null

Good to know

the server should JSON response like at down where you will post

{"status":"success","url":"\/media\/product\/a03d49dc-0fbe-431b-9ce6-0e90b5a2969c.jpg"}

Default Config

the server should JSON response like at down where you will post

let defaults = {
    /** images will send this url
     *  then, should return JSON data like this :
     *  { "status" : "success", "url" : "/images/products/image.jpg" }
     */
    upload_target_url : "/api/fileupload", 

    /** this value for detect files which list
     * example: you will use mediagroup="product" attribute on component
     * and this value will append to url as path or as query
     * path ex: "/api/fileupload/product"
     * query ex: "/api/fileupload/?upload_group=product"
     * path is recommended for MVC
     */
    upload_group_method : "path",
    /** this value will use as key of query if upload_group_method equal query  
     * example : /api/fileupload?mediagroup=profile
    */
    upload_group_query_key : "mediagroup",

    upload_post_field_name : "file",
    
    upload_accept_filetype : "image/*",
    
    /** This value for resize JPG files to maxarea
     */
    upload_accept_maxsize  : 1920, 
    
    /** images will view on imagelist with this prefix url
     *  example: your image array list ["/images/products/image1.jpg","/images/products/image2.jpg"]
     * 	but your absolute url is "http://cdn.mysite.com/images/products/image1.jpg"
     *  then, you can use "http://cdn.mysite.com" as PathPrefix
     */
    view_path_prefix : "/storage",


    /** not need explain this keys,
     * keys already look like understandable
     */
    theme_color_border : "#ccc",
    theme_color_border_hover : "#3f51b5",
    theme_color_action_border : "#ccc",
    theme_color_action_text : "#ccc",
    theme_color_action_hover_border : "#555",
    theme_color_action_hover_background : "#555",
    theme_color_action_hover_text : "#fff",
    theme_color_progress_background : "#ddd",
    theme_color_progress_bar : "#3f51b5",

    theme_size_slot : "100px",
    theme_size_margin : "5px",

    text_add_new : "Yeni Ekle",

    draggable : true
}