mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-12 04:03:44 +08:00
修复菜单active_menu参数刷新页面后失效问题
This commit is contained in:
@@ -150,6 +150,10 @@
|
||||
|
||||
onMounted(() => {
|
||||
updateMenu();
|
||||
const matched = currentRoute.matched;
|
||||
state.openKeys = matched.map((item) => item.name);
|
||||
const activeMenu: string = (currentRoute.meta?.activeMenu as string) || '';
|
||||
selectedKeys.value = activeMenu ? (activeMenu as string) : (currentRoute.name as string);
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '状态码',
|
||||
title: '状态',
|
||||
key: 'status',
|
||||
render(row) {
|
||||
return h(
|
||||
@@ -180,9 +180,9 @@
|
||||
{
|
||||
field: 'status',
|
||||
component: 'NSelect',
|
||||
label: '状态码',
|
||||
label: '状态',
|
||||
componentProps: {
|
||||
placeholder: '请选择状态码',
|
||||
placeholder: '请选择状态',
|
||||
options: [
|
||||
{
|
||||
label: '未使用',
|
||||
@@ -247,7 +247,7 @@
|
||||
message.success('操作成功');
|
||||
reloadTable();
|
||||
})
|
||||
.catch((e: Error) => {
|
||||
.catch((_e: Error) => {
|
||||
// message.error(e.message ?? '操作失败');
|
||||
});
|
||||
},
|
||||
@@ -289,11 +289,6 @@
|
||||
actionRef.value.reload();
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
console.log('点击了编辑', record);
|
||||
router.push({ name: 'sms_view', params: { id: record.id } });
|
||||
}
|
||||
|
||||
function handleSubmit(values: Recordable) {
|
||||
console.log(values);
|
||||
reloadTable();
|
||||
|
||||
Reference in New Issue
Block a user