【发布时间】:2021-09-25 19:46:26
【问题描述】:
所以我有以下方法:
methods: {
submit() {
this.$inertia.post('/projects', this.form);
this.openModal = false;
},
},
但即使存在验证错误,它也会关闭我的模式。 我也试过了
this.$inertia.post('/projects', this.form);
if(!this.$page.props.errors) {
this.openModal = false;
}
如果有验证错误,它不会关闭模式,但如果没有验证错误,它不会关闭它。
【问题讨论】:
标签: javascript laravel vue.js inertiajs