is me. 2022-11-01 10:16 采纳率: 87.5%
浏览 34
已结题

vue2项目升级成vue3 created方法

问题遇到的现象和发生背景

vue2项目升级成vue3

用代码块功能插入代码,请勿粘贴截图

vue2中的代码

  created: function () {
    this.getAllFlowCategoryData()
    this.userId = this.$store.state.user.info.userId
    this.getDoingCount()
    this.getSentCount()
    this.getDoneCount()
    this.getTodoCount()
    this.getAntThisWeekDoneInfo()
  },
我的解答思路和尝试过的方法
const created = () => function (){
  console.log('aaaa')
}

我想要达到的结果

vue3中有什么方法,可以实现created()的效果嘛

  • 写回答

5条回答 默认 最新

查看更多回答(4条)

报告相同问题?

问题事件

  • 系统已结题 11月22日
  • 已采纳回答 11月14日
  • 创建了问题 11月1日