2.2.0 • Published 6 years ago

vue2-modal-bootstrap v2.2.0

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

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.

2.2.0

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago