Giter VIP home page Giter VIP logo

drag-and-drop-vue's Introduction

drag-and-drop-vue

A datepicker Vue component. Compatible with Vue 3.x

  • Install

  • Usage

  • Props

  • Events

  • The main usage of this package is for drag and drop functionality. The user create multiple sections and in that sections provide the facilities to create multiple cards. all cards are swapable and also drag and drop in any section.

  • The user canh also Edit and Delete card.

install

npm i dragandropvue
import { SimpleDragVue } from 'dragandropvue';

export default {
  // ...
  components: {
    SimpleDragVue
  }
  // ...
}

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Usage

value prop if passed should be a Date object

### Compiles and hot-reloads for development

npm run serve

<script>
data() {
    return {
      response: {
        data: [
    {
      title: "Section 1",
      drop_col_id: "",
      data: [
        { 
          title: 'Card 1',
          description: "<p>Description Of card<p>",
          attachment: null,
          deadlineDate: Deadline Date, 
        },
        { 
          title: 'Card 2',
          description: "<p>Description Of card<p>",
          attachment: null,
          deadlineDate: Deadline Date,
          },
        { 
          title: "Card 3",
          description: "<p>Description Of card<p>",
          attachment: null,
          deadlineDate: Deadline Date,
        },
      ],
    },
    {
      title: "Section 2",
      data: [
        { 
          title: 66, 
          description: "<p>Description Of card<p>",
          attachment: null,
          deadlineDate: Deadline Date,
        }
      ],
    },
    {
      title: "Section 3",
      data: [],
    },
  ],
      },
      modalOpened: false
    }
  },

</script>
<SimpleDragVue
  :responseData="response"
  :isModalOpened="modalOpened"
  addCardTitle="+Add Card"
  addSectionTitle="Add Section"
/>

Emits events

``` html
<SimpleDragVue
  :responseData="response"
  :isModalOpened="modalOpened"
  addCardTitle="+Add Card"
  addSectionTitle="Add Section"
  @add-card="addNewCardEvent"
  @edit-card="editCardEvent"
>

Available props

Prop Type Default Description
responseData Array|Object Array or Object value of card data
addSectionTitle Text Section Title property
addCardTitle Text Card Title property
isCustomEdit Boolean False Custome Edit Functionality

Events

These events are emitted on actions in the datepicker

Event Output Description
add-card The Card is Added
edit-card The Card is Edited
delete-card The Card is Deleted

Slots

Slots will help you customize content.

Sometimes you need to add your custom field in card. An example would be to use custom input field :

<template v-slot:cardForm>
  <input type="text" />
</template>

drag-and-drop-vue's People

Contributors

tvshreyanshi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.