在HTML验证后提交表单时,我需要将数据发送到salesforce并打开指向PDF文件的链接。该表单是模式表单,并从父组件接收数据。
<form
class="mt-6"
@submit.prevent="submitForm(true)"
>
<button type="submit"><a :href="'/cms/+data.id+'.pdf' /></button>
</form>
methods: {
submitForm() {
console.log(
'Name is ' +
this.user.name +
' and the email id is ' +
this.user.email +
' and the download file ID is ' +
this.data.id
)
}
}
window.open
是否可以作为Submit函数的解决方案?数据传输后我应该怎么称呼它?