diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 49fd6a5f..cfe1d673 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -93,7 +93,7 @@ function onRowClick(row: MenuVO) { function openDialog(parentId?: number, menuId?: number) { listMenuOptions() .then(({ data }) => { - menuOptions.value = [{ value: "0", label: "顶级菜单", children: data }]; + menuOptions.value = [{ value: 0, label: "顶级菜单", children: data }]; }) .then(() => { dialog.visible = true; diff --git a/src/views/table/complex-table.vue b/src/views/table/complex-table.vue index a2d81390..940cd26b 100644 --- a/src/views/table/complex-table.vue +++ b/src/views/table/complex-table.vue @@ -394,8 +394,8 @@ const rules = { ], title: [{ required: true, message: "title is required", trigger: "blur" }], }; -const dialogStatus = ref(""); -const textMap = { +const dialogStatus = ref(); +const textMap: any = { update: "Edit", create: "Create", }; diff --git a/src/views/table/drag-table.vue b/src/views/table/drag-table.vue index fb24c7da..b921f9ad 100644 --- a/src/views/table/drag-table.vue +++ b/src/views/table/drag-table.vue @@ -69,7 +69,8 @@
The default order : {{ oldList }}
- The after dragging order : {{ list.map((v) => v.id) }} + The after dragging order : + {{ list.map((v: any) => v.id) }}
@@ -96,7 +97,7 @@ const listLoading = ref(true); const list: Ref = ref([]); const oldList = ref([]); -const formatDate = (timestamp) => { +const formatDate = (timestamp: any) => { const date = new Date(timestamp); return date .toLocaleString("zh-CN", { @@ -129,7 +130,7 @@ const rowDrag = function () { Sortable.create(tbody, { // 可被拖拽的子元素 draggable: ".draggable .el-table__row", - onEnd({ newIndex, oldIndex }) { + onEnd({ newIndex, oldIndex }: { newIndex: number; oldIndex: number }) { const currRow = list.value.splice(oldIndex, 1)[0]; list.value.splice(newIndex, 0, currRow); }, @@ -140,7 +141,7 @@ onMounted(() => { fetchList({}).then((res) => { listLoading.value = false; list.value = res.data.items; - oldList.value = list.value.map((v) => v.id); + oldList.value = list.value.map((v: any) => v.id); rowDrag(); }); });