Giter Club home page Giter Club logo

vue-dialog's Introduction

#API接口

title String

content String

btntype 1.alert类型 2.confirm类型

使用方法

先要安装cooking 具体安装和使用方法 https://github.com/ElemeFE/cooking/blob/master/README_zh-cn.md

npm install vue-dialog_xiaomingming --registry=https://registry.npm.taobao.org

npm run dev

调用方法例子

<template>
  <h1>vue-dialog</h1>
  <p>A vue project.</p>
  <dialog :title="dialog.title" :content="dialog.content" :btntype="dialog.btntype" :showstatus.sync="dialog.showstatus"></dialog>
  <a href="javascript:void(0)" @click="onShow">显示</a>
</template>


<script>
  import dialog from 'vue-dialog_xiaomingming/src/dialog.vue'	
  export default {
    name: 'app',
	components: {
       dialog
    },
    data(){
    	return {
    		dialog:{
    			title:"这是标题",
    			content:"这是内容",
    			modalId:1,
    			btntype:2,
    			showstatus:false
    		}
    		
    	}
    },
    methods:{
    	onShow(){
    		this.dialog.showstatus = true;
    	}
    },
    events:{
    	OK_EVENT(){
    		alert(this.dialog.modalId)
    	}
    }
  };
</script>

vue-dialog's People

Contributors

minerchow avatar

Watchers

James Cloos avatar  avatar

Forkers

hcy1314520

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.