31 lines
562 B
Vue
31 lines
562 B
Vue
<template>
|
||
<!-- 同意或不同意组件,点击不同意的时候出现额外的输入框说明原因 -->
|
||
<el-row>
|
||
<el-button type="primary" @click="doAgree">同意</el-button>
|
||
<el-button @click="dontAgree">不同意</el-button>
|
||
</el-row>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
name: '',
|
||
props: {},
|
||
emits: ['not-agree', 'agree'],
|
||
data() {
|
||
return {
|
||
reason: 'dont agree reason',
|
||
};
|
||
},
|
||
methods: {
|
||
doAgree() {
|
||
this.$emit('agree');
|
||
},
|
||
dontAgree() {
|
||
this.$emit('not-agree', this.reason);
|
||
},
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style scoped></style>
|