This commit is contained in:
owen
2023-12-01 18:57:46 +08:00
parent 08be359578
commit b4ba1043d6
25 changed files with 64 additions and 47 deletions

View File

@ -150,4 +150,4 @@ const resetForm = () => {
}
formRef.value?.resetFields()
}
</script>
</script>

View File

@ -9,7 +9,7 @@
>
<el-table :data="formData" class="-mt-10px">
<el-table-column label="序号" type="index" width="100" />
<el-table-column label="名字" min-width="150">
<el-table-column label="名字" min-width="150">
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.name`" :rules="formRules.name" class="mb-0px!">
<el-input v-model="row.name" placeholder="请输入名字" />
@ -57,7 +57,7 @@ watch(
formData.value = []
// 2. val 非空,则加载数据
if (!val) {
return;
return
}
try {
formLoading.value = true
@ -97,4 +97,4 @@ const getData = () => {
}
defineExpose({ validate, getData })
</script>
</script>

View File

@ -48,4 +48,4 @@ const handleQuery = () => {
onMounted(() => {
getList()
})
</script>
</script>

View File

@ -6,7 +6,7 @@
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="名字" prop="name">
<el-form-item label="名字" prop="name">
<el-input v-model="formData.name" placeholder="请输入名字" />
</el-form-item>
<el-form-item label="班主任" prop="teacher">
@ -38,11 +38,11 @@ watch(
id: undefined,
studentId: undefined,
name: undefined,
teacher: undefined,
teacher: undefined
}
// 2. val 非空,则加载数据
if (!val) {
return;
return
}
try {
formLoading.value = true
@ -69,4 +69,4 @@ const getData = () => {
}
defineExpose({ validate, getData })
</script>
</script>

View File

@ -52,4 +52,4 @@ const handleQuery = () => {
onMounted(() => {
getList()
})
</script>
</script>