diff --git a/src/components/RePureTableBar/src/bar.tsx b/src/components/RePureTableBar/src/bar.tsx index b2a755567..615785249 100644 --- a/src/components/RePureTableBar/src/bar.tsx +++ b/src/components/RePureTableBar/src/bar.tsx @@ -1,7 +1,15 @@ import Sortable from "sortablejs"; import { transformI18n } from "@/plugins/i18n"; import { useEpThemeStoreHook } from "@/store/modules/epTheme"; -import { defineComponent, ref, computed, type PropType, nextTick } from "vue"; +import { + type PropType, + ref, + unref, + computed, + nextTick, + defineComponent, + getCurrentInstance +} from "vue"; import { delay, cloneDeep, @@ -34,6 +42,10 @@ const props = { isExpandAll: { type: Boolean, default: true + }, + tableKey: { + type: [String, Number] as PropType, + default: "0" } }; @@ -46,6 +58,7 @@ export default defineComponent({ const loading = ref(false); const checkAll = ref(true); const isIndeterminate = ref(false); + const instance = getCurrentInstance()!; const isExpandAll = ref(props.isExpandAll); const filterColumns = cloneDeep(props?.columns).filter(column => isBoolean(column?.hide) @@ -170,9 +183,9 @@ export default defineComponent({ const rowDrop = (event: { preventDefault: () => void }) => { event.preventDefault(); nextTick(() => { - const wrapper: HTMLElement = document.querySelector( - ".el-checkbox-group>div" - ); + const wrapper: HTMLElement = ( + instance?.proxy?.$refs[`GroupRef${unref(props.tableKey)}`] as any + ).$el.firstElementChild; Sortable.create(wrapper, { animation: 300, handle: ".drag-btn", @@ -299,6 +312,7 @@ export default defineComponent({
handleCheckedColumnsChange(value)} > diff --git a/src/layout/components/sidebar/sidebarItem.vue b/src/layout/components/sidebar/sidebarItem.vue index 8aa67d777..f9d16018a 100644 --- a/src/layout/components/sidebar/sidebarItem.vue +++ b/src/layout/components/sidebar/sidebarItem.vue @@ -145,7 +145,7 @@ function resolvePath(routePath) { props.item?.pathList?.length === 2) " truncated - class="!px-4 !text-inherit" + class="!w-full !px-4 !text-inherit" > {{ transformI18n(onlyOneChild.meta.title) }} @@ -157,7 +157,7 @@ function resolvePath(routePath) { offset: [0, -10], theme: tooltipEffect }" - class="!text-inherit" + class="!w-full !text-inherit" > {{ transformI18n(onlyOneChild.meta.title) }} @@ -185,18 +185,21 @@ function resolvePath(routePath) {
url === config.url) + return whiteList.some(url => config.url.endsWith(url)) ? config : new Promise(resolve => { const data = getToken(); diff --git a/src/views/account-settings/index.vue b/src/views/account-settings/index.vue index 86e96c1f5..01bf187e4 100644 --- a/src/views/account-settings/index.vue +++ b/src/views/account-settings/index.vue @@ -70,10 +70,10 @@ getMine().then(res => { - + - +