const { t } = useI18n();不能在setup外执行
传递函数
const chartOptions = (
t: Function,
color: string = "warning",
height: string = "auto"
): ApexOptions => {
return {
// Rest of your chart options
categories: [t("Totalnumber"), t("normal"), "关闭", "审核中", "被封"],
// Other chart configuration
};
};