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