首页 新闻 会员 周边

vue 3.0 element 没有看到生命周期setup 或者 create 函数

0
悬赏园豆:5 [已解决问题] 解决于 2022-12-28 09:35

export default {
name: 'systemdepartment',
components: {
saveDialog
},
data() {
return {
dialog: {
save: false
},
apiObj: this.$API.department.list,
selection: [],
search: {
keyword: null
},
treeProps:{ children: "Children" }
}
},
以上是element 框架,tree 显示页面,vue 2.0 会有一个create 函数,我也在看vue 3.0的教程,需要setup函数,但是这个页面都没有,没有看到生命周期函数 这是为什么呢?

郑英灿的主页 郑英灿 | 初学一级 | 园豆:156
提问于:2022-10-24 09:46
< >
分享
最佳答案
0

这是选项式API的写法。setup关键字是组合式写法。

API风格

收获园豆:5
写代码的小2B | 老鸟四级 |园豆:4371 | 2022-10-24 10:18
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册