prevent dispatch form event

when component import an Input, prevent dispatch event from Input to
Form
This commit is contained in:
梁灏 2017-03-13 18:58:31 +08:00
parent 4a5d5cc9f2
commit 21dad188c1
8 changed files with 92 additions and 54 deletions

View file

@ -1,20 +1,22 @@
<template>
<i-button @click.native="time">显示一个10秒的提示</i-button>
<div>
<i-button @click.native="success">显示成功提示</i-button>
<i-button @click.native="warning">显示警告提示</i-button>
<i-button @click.native="error">显示错误提示</i-button>
</div>
</template>
<script>
export default {
methods: {
time () {
this.$Message.info('我将在10秒后消失', 3, () => {
console.log(1111)
});
success () {
this.$Message.success('这是一条成功的提示');
},
warning () {
this.$Message.warning('这是一条警告的提示');
},
error () {
this.$Message.error('对方不想说话,并且向你抛出了一个异常');
}
},
mounted () {
this.$Message.config({
top: 50,
duration: 3
});
}
}
</script>