vc-dialog

0.0.1 • Public • Published

vue component skeleton

install

npm install vc-dialog --save
    //global varibale  vcDailog
    <script src='../dist/vc-dialog.js'></script> 

usage

props

okText

custom the ok button text.

  • default: 确定
  • type: String

cancelText

custom the cancel button text.

  • default: 取消
  • type: String

visiable

control the visiable of dialog.

  • default: false
  • type: Boolean

onOk | optional

the callback for onOk.

  • type: Function

onCancel | optional

the callback of onCancel

  • type: Function

example

  • js
import Vue from 'vue'
import {
        vcDialog
    } from '../dist/vc-dialog.js'
 
new Vue({
    el: '#app',
    data () {
        return {
            isShow: true,
            okText: 'ok',
            cancelText: 'cancel'
        }
    },
    components: {
        vcDialog
    },
    methods: {
        onOk () {
 
        },
        onCancel () {
 
        }
    },
    ready () {
    }
})
<vc-dialog 
    :visible='isShow'
    :okText='okText'
    :cancelText='cancelText'
    :onOk='onOk'
    :onCancel='onCancel'>
    <div class="your-html">
        
    </div>     
</vc-dialog>

dev

  • Build
npm run build
  • Build example
npm run example
  • run server
npm run start

Package Sidebar

Install

npm i vc-dialog

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • yangxiaofu