【修复】升级vite版本,修复前端几个小bug

pull/198/head
xiaonuobase 2024-03-11 12:29:10 +08:00
parent 1f03b969b7
commit f0c72cfafb
3 changed files with 11 additions and 11 deletions

View File

@ -79,7 +79,7 @@
"typescript": "5.3.3",
"unplugin-auto-import": "0.17.2",
"unplugin-vue-components": "0.26.0",
"vite": "5.0.6",
"vite": "5.1.4",
"vite-plugin-compression": "0.5.1",
"vite-plugin-vue-setup-extend": "0.4.0",
"vue-eslint-parser": "9.3.2"

View File

@ -95,6 +95,7 @@
<a-table
v-bind="{ ...renderTableProps, ...data.localSettings }"
@change="loadData"
:loading="data.localLoading"
:row-key="(record) => record.id"
@expand="
(expanded, record) => {
@ -103,7 +104,7 @@
"
>
<template #[item]="scope" v-for="item in renderSlots">
<slot :name="item" :scope="scope" v-bind="scope || {}"></slot>
<slot v-if="item && renderTableProps.columns.length > 0" :name="item" :scope="scope" v-bind="scope || {}"></slot>
</template>
</a-table>
</div>
@ -112,8 +113,7 @@
import './index.less'
import { tableProps } from 'ant-design-vue/es/table/Table.js'
import columnSetting from './columnSetting.vue'
import './index.less'
import { get } from 'lodash-es'
import { useSlots } from 'vue'
import { useRoute } from 'vue-router'
const slots = useSlots()

View File

@ -197,7 +197,7 @@
const selectedKeys = ref([])
const openKeys = ref([])
const onSelectTag = ref(false)
const moduleMenu = ref([])
const moduleMenuData = ref([])
const moduleMenuShow = ref(true)
const doublerowSelectedKey = ref([])
const layoutSiderDowbleMenu = ref(true)
@ -266,8 +266,8 @@
}
const nextTickMenu = pMenu.value.children
if (pidKey) {
const modelPidKey = getParentKeys(moduleMenu.value, route.path)
moduleMenu.value.forEach((item) => {
const modelPidKey = getParentKeys(moduleMenuData.value, route.path)
moduleMenuData.value.forEach((item) => {
if (modelPidKey.includes(item.path)) {
tagSwitchModule(item.id)
}
@ -292,7 +292,7 @@
}
// -start
moduleMenu.value = router.getMenu()
moduleMenuData.value = router.getMenu()
//
const menuModuleId = tool.data.get('SNOWY_MENU_MODULE_ID')
if (menuModuleId) {
@ -466,9 +466,9 @@
}
//
const switchModule = (id) => {
if (moduleMenu.value.length > 0) {
if (moduleMenuData.value.length > 0) {
showThis()
const menus = moduleMenu.value.filter((item) => item.id === id)[0].children
const menus = moduleMenuData.value.filter((item) => item.id === id)[0].children
if (menus.length > 0) {
//
menu.value = menus
@ -494,7 +494,7 @@
tool.data.set('SNOWY_MENU_MODULE_ID', id)
store.setModule(id)
//
menu.value = moduleMenu.value.filter((item) => item.id === id)[0].children
menu.value = moduleMenuData.value.filter((item) => item.id === id)[0].children
}
//
const traverseChild = (menu) => {