mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-07 23:25:30 +08:00
feat: 修改props参数类型
This commit is contained in:
parent
2f268d8ee4
commit
0155711c27
4 changed files with 4 additions and 3 deletions
|
@ -85,6 +85,7 @@ export default {
|
||||||
post: ' create',
|
post: ' create',
|
||||||
update: ' update',
|
update: ' update',
|
||||||
delete: ' delete',
|
delete: ' delete',
|
||||||
|
del: 'delete',
|
||||||
},
|
},
|
||||||
operatoin: 'operatoin',
|
operatoin: 'operatoin',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
|
|
|
@ -86,6 +86,7 @@ export default {
|
||||||
delete: '删除',
|
delete: '删除',
|
||||||
login: '登录',
|
login: '登录',
|
||||||
logout: '退出',
|
logout: '退出',
|
||||||
|
del: '删除',
|
||||||
},
|
},
|
||||||
operatoin: '操作',
|
operatoin: '操作',
|
||||||
status: '状态',
|
status: '状态',
|
||||||
|
|
|
@ -72,7 +72,6 @@ const batchDelete = async (row: User.User | null) => {
|
||||||
} else {
|
} else {
|
||||||
ids.push(row.id);
|
ids.push(row.id);
|
||||||
}
|
}
|
||||||
console.log(ids);
|
|
||||||
await useDeleteData(deleteUser, { ids: ids }, 'commons.msg.delete');
|
await useDeleteData(deleteUser, { ids: ids }, 'commons.msg.delete');
|
||||||
search();
|
search();
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@ let demoForm = ref<User.User>({
|
||||||
|
|
||||||
interface OperateProps {
|
interface OperateProps {
|
||||||
op: string;
|
op: string;
|
||||||
id: number;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<OperateProps>(), {
|
const props = withDefaults(defineProps<OperateProps>(), {
|
||||||
|
@ -81,7 +81,7 @@ const getUser = async (id: number) => {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.op == 'edit') {
|
if (props.op == 'edit') {
|
||||||
console.log(props);
|
console.log(props);
|
||||||
getUser(props.id).catch(() => {
|
getUser(Number(props.id)).catch(() => {
|
||||||
router.back();
|
router.back();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue