0.2.0 • Published 5 years ago

vue-swappable v0.2.0

Weekly downloads
9
License
ISC
Repository
github
Last release
5 years ago

Swappable Component with VueJs

Using Shopify's draggable library

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Build library

npm run build-lib

Usage

import SwappableGrid from "./components/SwappableGrid";
<swappable-grid 
        :items="todos"
        :styleItem="styleItem"
        :styleItemText="styleItemText"
        @update="updateValue">
</swappable-grid>

Properties

  • items

    • required: true,
    • type: Array
  • maxRows:

    • required: false,
    • default: 5,
    • type: Number
  • maxCols

    • required: false,
    • default: 5,
    • type: Number

  • heightItem
    • required: false,
    • default: "4rem",
    • type: String

  • widthItem
    • required: false,
    • default: "4rem",
    • type: String

  • styleItem

    • required: false,
    • type: Object,
    • default: () => ({ "background-color": "#fff", margin: "5px" })
  • styleItemText

    • required: false,
    • type: Object,
    • default: () => ({})

  • stylePlaceholderItem
    • required: false,
    • type: Object,
    • default: () => ({ "background-color": "rgba(234, 192, 192, 0.68)", border: "1px solid #cacaca" })

Events

  • @update: Get items updated with cols and rows modified.
0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago