<template>
<div>
<van-button
round
block
type="danger"
style="margin-right: 10px"
@click="define()"
>
驳 回
</van-button>
</div>
<van-dialog
v-model:show="show"
title="驳回原因"
show-cancel-button
:beforeClose="chargeBtn"
>
<van-field
v-model="activity_repair_remark"
rows="3"
autosize
label="原因"
type="textarea"
placeholder="请输入驳回原因"
/>
</van-dialog>
</template>
<script>
export default{
setup(){
show: false,
activity_repair_remark:'',
}
//驳回
const define = () => {
state.show = true;
}
const chargeBtn = (action, done) => {
console.log("action", action);
if (action === 'cancel') {//取消按钮
state.show = false;
} else if (action === 'confirm') {
//确定按钮
//向后端传值并关闭dialog弹出框
state.show = false;
};
state.activity_repair_remark = '';
}
return {
chargeBtn,
}
}
</script>