VueStrap - 用 Vue.js 创建的 Bootstrap 组件

6,422 阅读1分钟
原文链接: yuche.github.io

Bootstrap components built with Vue.js.

This repository contains a set of native Vue.js components based on Bootstrap’s markup and CSS. As a result no dependency on jQuery or Bootstrap’s JavaScript is required. The only required dependencies are:

  • Vue.js (required ^0.12, test with 0.12.10).
  • Bootstrap CSS (required 3.x.x, test with 3.3.5). VueStrap doesn’t depend on a very precise version of Bootstrap.

Installation

CommonJS

$ npm install vue-strap

var alert = require('vue-strap/src/alert');
// or
var alert = require('vue-strap').alert;

new Vue({
  components: {
    'alert': alert
  }
})

ES6

$ npm install vue-strap

import alert from 'vue-strap/src/alert'
// or
import { alert } from 'vue-strap'

new Vue({
  components: {
    alert
  }
})

Browser globals

The dist folder contains vue-strap.js and vue-strap.min.js with all components exported in the window.VueStrap object.



Docs

See the documentation with live editable examples.

Local Setup

  • Install with npm install
  • Run the docs site in development mode with npm run docs. This will watch for file changes as you work.
  • Build with npm run build.