fix: 🐛 打包eslint报错问题修复

Former-commit-id: 2e30725eb36c20a00ff043843d4ad2117212c8e0
This commit is contained in:
hxr
2023-08-09 08:18:48 +08:00
parent 27cd89f3d4
commit 81c06c3d92
3 changed files with 8 additions and 7 deletions

View File

@@ -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;

View File

@@ -394,8 +394,8 @@ const rules = {
],
title: [{ required: true, message: "title is required", trigger: "blur" }],
};
const dialogStatus = ref("");
const textMap = {
const dialogStatus = ref<any>();
const textMap: any = {
update: "Edit",
create: "Create",
};

View File

@@ -69,7 +69,8 @@
</el-table>
<div class="show-d"><el-tag>The default order :</el-tag> {{ oldList }}</div>
<div class="show-d">
<el-tag>The after dragging order :</el-tag> {{ list.map((v) => v.id) }}
<el-tag>The after dragging order :</el-tag>
{{ list.map((v: any) => v.id) }}
</div>
</div>
</template>
@@ -96,7 +97,7 @@ const listLoading = ref<boolean>(true);
const list: Ref = ref<List[]>([]);
const oldList = ref<List[]>([]);
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();
});
});