V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
liuy1994g
V2EX  ›  问与答

请问 Vue 3 如何使用 TS 的装饰器呀

  •  
  •   liuy1994g · 2021-01-19 14:23:04 +08:00 · 1000 次点击
    这是一个创建于 1164 天前的主题,其中的信息可能已经有所发展或是发生改变。

    加了装饰器报了堆错,google 也没查出个原因来,eslint 中也加了legacyDecorators: true的配置 tu

    1 条回复    2021-01-19 15:38:35 +08:00
    noe132
        1
    noe132  
       2021-01-19 15:38:35 +08:00
    decorator 是 class, class field 的语法
    https://es6.ruanyifeng.com/#docs/decorator
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4165 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:15 · PVG 18:15 · LAX 03:15 · JFK 06:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.