跳转的时候添加参数 id 和 类型 1为编辑 0 为详情
this.$router.push({
path: “/IPL/strategyDetail”,
});
const stateObj = {
id: ‘123’,
type: 1
};
history.replaceState(stateObj, ‘’, ‘’);
跳转过去的页面判断 赋值变量显示编辑的按钮
if (history.state.type == ‘1’) {
this.permission = true
}