1.0.8 • Published 5 years ago

vue-simple-widget-test v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Vue.js Simple widget

Simple to use, Eazy to use

If you find bug / suggest some idea

use issue

or

contect me(desktop@kakao.com)

install

# Use npm
npm install vue-simple-widget --save
# Use yarn
yarn add vue-simple-widget

How to use

Include plugin your .vue file

import SimpleWidget from 'vue-simple-widget';

components: {
  SimpleWidget;
}

Create widget:

<simple-widget
    widgetId='Your ElementId'
    ....
  // input your options
></simple-widget>

or Include your main.js

import Vue from 'vue';
import SimpleWidget from 'vue-simple-widget';

Vue.use(SimpleWidget);

Input your content:

<simple-widget>
  <template v-slot:header>
    <p>vue-simple-widget</p>
  </template>
  <template v-slot:content>
    <p> Input your text! </p>
  </template>
</simple-widget>

Properties

| Name | Required | Default | Description |

NameRequiredTypeDefaultDescription
widgetIdtrueString,Numberinput your element id
widthfalseNumber330pxwidget width, only support px
heightfalseNumber360pxwidget height, only support px
headerAlignfalseStringleftleft,right,center
contentAlignfalseStringleftleft,right,center
verticalPostionfalseStringbottombased on widgetId set vetical postion top,bottom
horizontalPostionfalseStringrightbased on widgetId set horizontal postion left,right

Example

<template>
  <div>
    <button id="showWidget" @click="show = true">
      show
    </button>

    <simple-widget
      v-if="show"
      widgetId="showWidget"
      headerAlign="center"
      contentAlign="right"
      width="400"
      height="200"
      verticalPostion="top"
      horizontalPostion="left"
      @close="show = false"
    >
      <template v-slot:header>
        header
      </template>
      <template v-slot:content>
        content
      </template>
    </simple-widget>
  </div>
</template>

<script>
export defult{
  data(){
    return{
      show: false
    }
  }
}
</script>
1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago