fix: 修复用户中心类型检查报错

- profile 页面使用 BasicUserInfo 的标准字段 nickname/loginName

- 移除 use-echarts 未使用参数与类型,消除 TS6133
This commit is contained in:
2026-03-04 20:02:59 +08:00
parent ae9bb2c53f
commit 03c5f2cd2e
2 changed files with 3 additions and 5 deletions

View File

@@ -34,10 +34,10 @@ const tabsValue = defineModel<string>('modelValue');
class="size-20" class="size-20"
/> />
<span class="text-lg font-semibold"> <span class="text-lg font-semibold">
{{ userInfo?.realName ?? '' }} {{ userInfo?.nickname ?? '' }}
</span> </span>
<span class="text-foreground/80 text-sm"> <span class="text-foreground/80 text-sm">
{{ userInfo?.username ?? '' }} {{ userInfo?.loginName ?? '' }}
</span> </span>
</div> </div>
<Separator class="my-4" /> <Separator class="my-4" />

View File

@@ -22,8 +22,6 @@ import echarts from './echarts';
type EchartsUIType = typeof EchartsUI | undefined; type EchartsUIType = typeof EchartsUI | undefined;
type EchartsThemeType = 'dark' | 'light' | null;
function useEcharts(chartRef: Ref<EchartsUIType>) { function useEcharts(chartRef: Ref<EchartsUIType>) {
let chartInstance: echarts.ECharts | null = null; let chartInstance: echarts.ECharts | null = null;
let cacheOptions: EChartsOption = {}; let cacheOptions: EChartsOption = {};
@@ -57,7 +55,7 @@ function useEcharts(chartRef: Ref<EchartsUIType>) {
}; };
}); });
const initCharts = (t?: EchartsThemeType) => { const initCharts = () => {
const el = chartRef?.value?.$el; const el = chartRef?.value?.$el;
if (!el) { if (!el) {
return; return;