|
@@ -6,6 +6,9 @@ import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
|
|
import { isNullAndUnDef } from '/@/utils/is';
|
|
|
import projectSetting from '/@/settings/projectSetting';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
+import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
+
|
|
|
+const { t } = useI18n();
|
|
|
|
|
|
export function initAffixTabs(): string[] {
|
|
|
const affixList = ref<RouteLocationNormalized[]>([]);
|
|
@@ -60,10 +63,10 @@ export function useTabsDrag(affixTextList: string[]) {
|
|
|
`.${prefixCls} .ant-tabs-nav-wrap > div`,
|
|
|
)?.[0] as HTMLElement;
|
|
|
const { initSortable } = useSortable(el, {
|
|
|
- filter: (e: ChangeEvent) => {
|
|
|
- const text = e?.target?.innerText;
|
|
|
+ filter: (_evt, target: HTMLElement) => {
|
|
|
+ const text = target.innerText;
|
|
|
if (!text) return false;
|
|
|
- return affixTextList.includes(text);
|
|
|
+ return affixTextList.map((res) => t(res)).includes(text);
|
|
|
},
|
|
|
onEnd: (evt) => {
|
|
|
const { oldIndex, newIndex } = evt;
|