feat: 修改props参数类型

This commit is contained in:
wangzhengkun 2022-08-12 15:05:58 +08:00
parent 2f268d8ee4
commit 0155711c27
4 changed files with 4 additions and 3 deletions

View file

@ -85,6 +85,7 @@ export default {
post: ' create',
update: ' update',
delete: ' delete',
del: 'delete',
},
operatoin: 'operatoin',
status: 'status',

View file

@ -86,6 +86,7 @@ export default {
delete: '删除',
login: '登录',
logout: '退出',
del: '删除',
},
operatoin: '操作',
status: '状态',

View file

@ -72,7 +72,6 @@ const batchDelete = async (row: User.User | null) => {
} else {
ids.push(row.id);
}
console.log(ids);
await useDeleteData(deleteUser, { ids: ids }, 'commons.msg.delete');
search();
};

View file

@ -41,7 +41,7 @@ let demoForm = ref<User.User>({
interface OperateProps {
op: string;
id: number;
id: string;
}
const props = withDefaults(defineProps<OperateProps>(), {
@ -81,7 +81,7 @@ const getUser = async (id: number) => {
onMounted(() => {
if (props.op == 'edit') {
console.log(props);
getUser(props.id).catch(() => {
getUser(Number(props.id)).catch(() => {
router.back();
});
}