1.0.12 • Published 5 years ago

simple-modal-vue v1.0.12

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

  • Very light and simple modal component for Vue

  • No dependency required

  • No external CSS library required

  • Fully support on IE10, IE11, Edge, Firefox, Safari, Ipad Safari and Chrome of course

  • Fix scroll on Ipad

Install

npm install simple-modal-vue --save
yarn add simple-modal-vue --save

Usage

Usage in example

<template>
  <div>
    <simple-modal v-model="isShow" title="Modal Header">
      <template slot="body">
        <h2>My modal</h2>
        <input>
        <p>Hello you</p>
      </template>
      <template slot="footer">
        <button>OK</button>
      </template>
    </simple-modal>
    <button @click="isShow = !isShow">on off button</button>
  </div>
</template>

<script>
import SimpleModal from 'simple-modal-vue'
export default {
  name: 'SimpleModalExample',
  components: { SimpleModal },
  data() {
    return { isShow: false }
  },
}
</script>

Props and methods

NameRequiredTypeDefaultDescription
titlefalseStringName of the modal
hasButtonClosefalseBooleanfalseIf true allows showing the button close on the modal
hasFooterfalseBooleanfalseIf true allows showing the footer of the modal
sizefalseString 'responsive', 'small', 'big' 'responsive'If true allows resizing depend on config the modal window.

Events

NameDescription
onOpenEmits when modal is opened
onCloseEmits when modal is closed

Vesion

  • 1.0.9 Fix some minor issues
  • 1.0.5 Add unit test coverage 100%
  • 1.0.1 Publish release
1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago