当consignmenttypeName为库存或寄售时,我想返回true,否则返回false。这是我的代码。
<template>
<div class="modal fade bd-example-modal-xl" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">The title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<h2>{{ modalData.projectName }}</h2>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</template>
<script>
export default{
name: "modalBlock",
props:['modalData'],
data(){
return {
}
},
methods: {
close() {
this.$emit('close');
},
}
}
</script>
此代码是否存在任何错误。当consignmenttypeName不等于库存或寄售时,此代码返回false吗?