第二阶段代码
This commit is contained in:
@@ -308,6 +308,8 @@ interface Preferences {
|
||||
transition: TransitionPreferences;
|
||||
/** 功能配置 */
|
||||
widget: WidgetPreferences;
|
||||
/** 工作台 头部 Tabbar */
|
||||
headerTabbar: any;
|
||||
}
|
||||
|
||||
type PreferencesKeys = keyof Preferences;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { Ref } from 'vue';
|
||||
|
||||
import type { TabsProps } from './types';
|
||||
|
||||
import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
@@ -8,7 +10,18 @@ import { useDebounceFn } from '@vueuse/core';
|
||||
|
||||
type DomElement = Element | null | undefined;
|
||||
|
||||
export function useTabsViewScroll(props: TabsProps) {
|
||||
interface UseTabsViewScrollReturn {
|
||||
handleScrollAt: ReturnType<typeof useDebounceFn>;
|
||||
handleWheel: (event: WheelEvent) => void;
|
||||
initScrollbar: () => Promise<void>;
|
||||
scrollbarRef: Ref<InstanceType<typeof VbenScrollbar> | null>;
|
||||
scrollDirection: (direction: 'left' | 'right', distance?: number) => void;
|
||||
scrollIsAtLeft: Ref<boolean>;
|
||||
scrollIsAtRight: Ref<boolean>;
|
||||
showScrollButton: Ref<boolean>;
|
||||
}
|
||||
|
||||
export function useTabsViewScroll(props: TabsProps): UseTabsViewScrollReturn {
|
||||
let resizeObserver: null | ResizeObserver = null;
|
||||
let mutationObserver: MutationObserver | null = null;
|
||||
let tabItemCount = 0;
|
||||
|
||||
@@ -172,7 +172,22 @@ const IOT_DICT = {
|
||||
IOT_UNIT_TYPE: 'iot_unit_type', // IOT 单位类型
|
||||
IOT_VALIDATE_TYPE: 'iot_validate_type', // IOT 数据校验级别
|
||||
} as const;
|
||||
|
||||
const DATABASE_DICT = {
|
||||
MATERIAL_UNIT: 'material_unit',
|
||||
DYNAMIC_TALENT_MATERIAL_MACHINE: 'dynamic_talent_material_machine',
|
||||
DYNAMIC_MERGE_RULE: 'dynamic_merge_rule',
|
||||
DYNAMIC_TALENT_MATERIAL_MACHINE_RULE: 'dynamic_talent_material_machine_rule',
|
||||
RATE_SETTING_VALUE_METHOD: 'rate_setting_value_method',
|
||||
QUOTA_FEE_ATTRIBUTION: 'quota_fee_attribution',
|
||||
INFO_PROFESSION: 'info_profession',
|
||||
WB_LIBRARY_TYPE: 'wb_library_type',
|
||||
HISTORY_APPLY_CATEGORY: 'history_apply_category',
|
||||
DIVISION_CATEGORY: 'division_category',
|
||||
WB_WORK_CONTENT: 'wb_work_content',
|
||||
WB_FILE_TYPE: 'wb_file_type',
|
||||
DEFAULT_COST_ATTRIBUTION: 'default_cost_attribution',
|
||||
FEE_ATTRIBUTION: 'fee_attribution',
|
||||
}
|
||||
/** 字典类型枚举 - 统一导出 */
|
||||
const DICT_TYPE = {
|
||||
...AI_DICT,
|
||||
@@ -187,6 +202,8 @@ const DICT_TYPE = {
|
||||
...MALL_DICT,
|
||||
...SYSTEM_DICT,
|
||||
...COMMON_DICT,
|
||||
...DATABASE_DICT
|
||||
} as const;
|
||||
|
||||
export { DICT_TYPE };
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ async function calcContentHeight() {
|
||||
docHeight.value = docRef.value?.offsetHeight || 0;
|
||||
setTimeout(() => {
|
||||
shouldAutoHeight.value = true;
|
||||
}, 30);
|
||||
}, 50);
|
||||
}
|
||||
|
||||
function isDocAlertEnable(): boolean {
|
||||
@@ -107,7 +107,7 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div :class="cn('h-full p-0', contentClass)" :style="contentStyle">
|
||||
<div :class="cn('h-full p-0', contentClass)" :style="contentStyle" v-if="shouldAutoHeight || !autoContentHeight">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -198,6 +198,6 @@ defineExpose({
|
||||
</slot>
|
||||
|
||||
<!-- 萌新必读 -->
|
||||
<DocLink />
|
||||
<!-- <DocLink /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -287,15 +287,24 @@ const headerSlots = computed(() => {
|
||||
/>
|
||||
</template>
|
||||
<template v-if="showHeaderNav" #menu>
|
||||
<LayoutMenu
|
||||
:default-active="headerActive"
|
||||
:menus="wrapperMenus(headerMenus)"
|
||||
:rounded="isMenuRounded"
|
||||
:theme="headerTheme"
|
||||
class="w-full"
|
||||
mode="horizontal"
|
||||
@select="handleMenuSelect"
|
||||
/>
|
||||
<slot name="menu">
|
||||
<LayoutTabbar
|
||||
v-if="preferences.headerTabbar.enable"
|
||||
:show-icon="preferences.tabbar.showIcon"
|
||||
:theme="theme"
|
||||
/>
|
||||
|
||||
<LayoutMenu
|
||||
v-else
|
||||
:default-active="headerActive"
|
||||
:menus="wrapperMenus(headerMenus)"
|
||||
:rounded="isMenuRounded"
|
||||
:theme="headerTheme"
|
||||
class="w-full"
|
||||
mode="horizontal"
|
||||
@select="handleMenuSelect"
|
||||
/>
|
||||
</slot>
|
||||
</template>
|
||||
<template #user-dropdown>
|
||||
<slot name="user-dropdown"></slot>
|
||||
|
||||
@@ -87,7 +87,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
</VbenButtonGroup>
|
||||
</div>
|
||||
|
||||
<div class="mt-2 flex justify-start">
|
||||
<!-- <div class="mt-2 flex justify-start">
|
||||
<p class="w-24 p-2">软件外包:</p>
|
||||
<img
|
||||
src="/wx-xingyu.png"
|
||||
@@ -100,7 +100,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
<p class="mt-2 flex justify-center pt-4 text-sm italic">
|
||||
本项目采用 <Badge class="mx-2" variant="destructive">MIT</Badge>
|
||||
开源协议,个人与企业可100% 免费使用
|
||||
</p>
|
||||
</p> -->
|
||||
</div>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"welcomeBack": "欢迎回来",
|
||||
"pageTitle": "开箱即用的大型中后台管理系统",
|
||||
"pageDesc": "工程化、高性能、跨组件库的前端模版",
|
||||
"pageTitle": "易慧用计价后台管理系统",
|
||||
"pageDesc": "",
|
||||
"loginSuccess": "登录成功",
|
||||
"loginSuccessDesc": "欢迎回来",
|
||||
"loginSubtitle": "请输入您的帐户信息以开始管理您的项目",
|
||||
|
||||
@@ -461,7 +461,7 @@ export const useTabbarStore = defineStore('core-tabbar', {
|
||||
*/
|
||||
async unpinTab(tab: TabDefinition) {
|
||||
const index = this.tabs.findIndex((item) => equalTab(item, tab));
|
||||
if (index === -1) {
|
||||
if (index === -1 || tab.meta.affixTab) {
|
||||
return;
|
||||
}
|
||||
const oldTab = this.tabs[index];
|
||||
@@ -537,8 +537,8 @@ export const useTabbarStore = defineStore('core-tabbar', {
|
||||
excludeCachedTabs: new Set(),
|
||||
menuList: [
|
||||
'close',
|
||||
'affix',
|
||||
'maximize',
|
||||
// 'affix',
|
||||
// 'maximize',
|
||||
'reload',
|
||||
'open-in-new-window',
|
||||
'close-left',
|
||||
|
||||
Reference in New Issue
Block a user