vue2-modal-bootstrap

2.2.0 • Public • Published

vue2-modal-bootstrap

vue2 modal bootstrap. support render custom component!

import Vue from 'vue'
import VueModalPlugin from 'vue2-modal-bootstrap'
Vue.use(VueModalPlugin)

var vm = this.$modal({
    title: '确定',
    message: '操作后无法撤销',
    prompt: true,
    autoClose: false,
    okText: '好',
    cancelText: '取消',
    size: 'sm',
    callback: function (value) {
      console.log(value)
    },
    data: {
      text: 'this is custom component'
    },
    events: {
      click () {
        console.log('click')
      }
    }
  },
  {
    props: {
      text: ''
    },
    template: '<div @click="$emit(\'click\')">{{text}}</div>'
  }
)

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.2.00latest

Version History

VersionDownloads (Last 7 Days)Published
2.2.00
2.1.50
2.1.40
2.1.30
2.1.20
2.0.20
2.0.10
2.0.00

Package Sidebar

Install

npm i vue2-modal-bootstrap

Weekly Downloads

0

Version

2.2.0

License

MIT

Unpacked Size

25.2 kB

Total Files

13

Last publish

Collaborators

  • renyufei