fix: 🐛 修复ts类型警告
This commit is contained in:
@@ -225,10 +225,8 @@ watch(
|
||||
* 限制用户上传文件的大小
|
||||
*/
|
||||
function handleBeforeUpload(file: UploadRawFile) {
|
||||
if (file.size > props.uploadMaxSize) {
|
||||
ElMessage.warning(
|
||||
"上传文件不能大于" + Math.trunc(props.uploadMaxSize / 1024 / 1024) + "M"
|
||||
);
|
||||
if (file.size > props.maxSize) {
|
||||
ElMessage.warning("上传文件不能大于" + props.maxSize + "M");
|
||||
return false;
|
||||
}
|
||||
uploadPercent.value = 0;
|
||||
|
||||
@@ -699,7 +699,10 @@ async function handleOpenDialog(tableName: string) {
|
||||
currentTableName.value = tableName;
|
||||
// 获取字典数据
|
||||
DictAPI.getList().then((data) => {
|
||||
dictOptions.value = data;
|
||||
dictOptions.value = data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.dictCode,
|
||||
}));
|
||||
loading.value = true;
|
||||
GeneratorAPI.getGenConfig(tableName)
|
||||
.then((data) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import UserAPI from "@/api/system/user";
|
||||
import RoleAPI from "@/api/role";
|
||||
import RoleAPI from "@/api/system/role";
|
||||
import type { UserPageQuery } from "@/api/system/user";
|
||||
import type { IContentConfig } from "@/components/CURD/types";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user