fix: 处理报错
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { defineComponent, type PropType } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import type { TabView } from '@/stores/tabsStore';
|
||||
import type { TabView } from '@/types';
|
||||
import styles from './PageTabs.module.less';
|
||||
|
||||
/**
|
||||
@@ -12,7 +12,7 @@ import styles from './PageTabs.module.less';
|
||||
* - 标签间分隔线
|
||||
* - 关闭按钮
|
||||
*/
|
||||
export default defineComponent({
|
||||
const PageTabs = defineComponent({
|
||||
name: 'PageTabs',
|
||||
props: {
|
||||
/** 标签列表 */
|
||||
@@ -49,7 +49,7 @@ export default defineComponent({
|
||||
return (
|
||||
<div
|
||||
key={tab.path}
|
||||
class={[styles.tabItem, isActive ? styles.active : '', styles.draggable].join(' ')}
|
||||
class={[styles.tabItem, isActive && styles.tabItemActive].filter(Boolean).join(' ')}
|
||||
onClick={() => handleClick(tab.path)}
|
||||
>
|
||||
{/* 分隔线:第一个标签 / 激活标签 / 上一个就是激活的 → 不显示 */}
|
||||
@@ -59,7 +59,7 @@ export default defineComponent({
|
||||
/>
|
||||
|
||||
{/* Chrome 风格背景:激活态 */}
|
||||
<div class={[styles.tabBg, isActive ? styles.tabBgActive : ''].join(' ')}>
|
||||
<div class={[styles.tabBg, isActive && styles.tabBgActive].filter(Boolean).join(' ')}>
|
||||
<div class={styles.tabBgInner} />
|
||||
{/* 左下曲线 */}
|
||||
<svg class={styles.tabBgCurveBefore} height="7" width="7">
|
||||
@@ -87,3 +87,5 @@ export default defineComponent({
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
export default PageTabs;
|
||||
|
||||
Reference in New Issue
Block a user