【修复】升级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", "typescript": "5.3.3",
"unplugin-auto-import": "0.17.2", "unplugin-auto-import": "0.17.2",
"unplugin-vue-components": "0.26.0", "unplugin-vue-components": "0.26.0",
"vite": "5.0.6", "vite": "5.1.4",
"vite-plugin-compression": "0.5.1", "vite-plugin-compression": "0.5.1",
"vite-plugin-vue-setup-extend": "0.4.0", "vite-plugin-vue-setup-extend": "0.4.0",
"vue-eslint-parser": "9.3.2" "vue-eslint-parser": "9.3.2"

View File

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

View File

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