Skip to content

vue-office/pdf 污染了全局国际化$t函数 #505

Description

@beetleDataDev

通过插件渲染了 pdf 内容后,$t 函数被替换成 WeakMap {e => 0},影响了全局国际化 i18n 函数

Activity

  1. samyoo-zhang commented on Mar 13, 2026

    @samyoo-zhang

    同样的问题,这个bug太隐秘了! 🥲

    个人友好的建议,封装的插件如果要挂载全局,最好是能够搞一个独立空间命名的对象里,别直接往window上挂方法,避免命名冲突,污染全局。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions