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
  };
};
posted @ 2023-06-05 11:17  yjxQWQ  阅读(48)  评论(0编辑  收藏  举报