mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-25 22:30:19 +08:00
build(projects): update tsconfig、eslintrc
This commit is contained in:
@@ -38,7 +38,7 @@ type Option = DropdownOption & {
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
visible: false,
|
||||
currentPath: ''
|
||||
currentPath: '',
|
||||
});
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
@@ -52,7 +52,7 @@ const dropdownVisible = computed({
|
||||
},
|
||||
set(visible: boolean) {
|
||||
emit('update:visible', visible);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
function hide() {
|
||||
@@ -64,29 +64,29 @@ const options = computed<Option[]>(() => [
|
||||
label: '重新加载',
|
||||
key: 'reload-current',
|
||||
disabled: props.currentPath !== tab.activeTab,
|
||||
icon: iconifyRender('ant-design:reload-outlined')
|
||||
icon: iconifyRender('ant-design:reload-outlined'),
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
key: 'close-current',
|
||||
disabled: props.currentPath === tab.homeTab.path,
|
||||
icon: iconifyRender('ant-design:close-outlined')
|
||||
icon: iconifyRender('ant-design:close-outlined'),
|
||||
},
|
||||
{
|
||||
label: '关闭其他',
|
||||
key: 'close-other',
|
||||
icon: iconifyRender('ant-design:column-width-outlined')
|
||||
icon: iconifyRender('ant-design:column-width-outlined'),
|
||||
},
|
||||
{
|
||||
label: '关闭左侧',
|
||||
key: 'close-left',
|
||||
icon: iconifyRender('mdi:format-horizontal-align-left')
|
||||
icon: iconifyRender('mdi:format-horizontal-align-left'),
|
||||
},
|
||||
{
|
||||
label: '关闭右侧',
|
||||
key: 'close-right',
|
||||
icon: iconifyRender('mdi:format-horizontal-align-right')
|
||||
}
|
||||
icon: iconifyRender('mdi:format-horizontal-align-right'),
|
||||
},
|
||||
]);
|
||||
|
||||
const actionMap = new Map<DropdownKey, () => void>([
|
||||
@@ -94,32 +94,32 @@ const actionMap = new Map<DropdownKey, () => void>([
|
||||
'reload-current',
|
||||
() => {
|
||||
app.reloadPage();
|
||||
}
|
||||
},
|
||||
],
|
||||
[
|
||||
'close-current',
|
||||
() => {
|
||||
tab.removeTab(props.currentPath);
|
||||
}
|
||||
},
|
||||
],
|
||||
[
|
||||
'close-other',
|
||||
() => {
|
||||
tab.clearTab([props.currentPath]);
|
||||
}
|
||||
},
|
||||
],
|
||||
[
|
||||
'close-left',
|
||||
() => {
|
||||
tab.clearLeftTab(props.currentPath);
|
||||
}
|
||||
},
|
||||
],
|
||||
[
|
||||
'close-right',
|
||||
() => {
|
||||
tab.clearRightTab(props.currentPath);
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
]);
|
||||
|
||||
function handleDropdown(optionKey: string) {
|
||||
|
||||
@@ -64,7 +64,7 @@ const dropdown = reactive({
|
||||
visible: false,
|
||||
x: 0,
|
||||
y: 0,
|
||||
currentPath: ''
|
||||
currentPath: '',
|
||||
});
|
||||
function showDropdown() {
|
||||
dropdown.visible = true;
|
||||
@@ -92,7 +92,7 @@ watch(
|
||||
getActiveTabClientX();
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user