vc-panel

Install

npm install vc-tag --save
// build version
import vcTag from 'vc-tag'
// recommend for *.vue project for small bundle size
import vcTag from 'vc-tag/src/Tag.vue'
// commonjs
require('./dist/build.min.js')
// script tag
<script src='./dist/build.min.js'></script>

Usage

props

title

subTitle

info

type

example

import Vue from 'vue'
import vcPanel from '../src'
new Vue({
el: '#app',
data () {
return {
title: '主标题在此',
subTitle: '副标题再此',
info: '额外信息写在这',
type: 'info'
}
},
methods: {
success () {
this.type = 'success'
},
danger () {
this.type = 'danger'
},
warning () {
this.type = 'warning'
}
},
components: {
vcPanel
}
})
<vc-panel
:title="title"
:sub-title="subTitle"
:info="info"
:type="type"
>
<div>panel content body</div>
</vc-panel>