在提交表单的时候,需要阻止默认行为
RegContent组件
<Button long @click.native.prevent="submit" :disabled="!gtValidate" size="large" >
{{gtValidate?"同意条款并注册":"请先进行验证"}}
</Button>
在路由的时候看到了一个路由配置的时候的阻止默认事件
route.js
{path:'/RegContent',
component: _ =>import('src/views/RegContent'),
meta: {allowBack:false }// 阻止浏览器默认行为返回
},