如下所示:
data: { certificates: null }, mounted: function () { var __this = this; __this.certificates = getDictForkey("学历"); }
使用this对data中变量进行调用
vue生命周期参照官方:点击进入
vue渲染页面的时候,可能会对某些数据进行字典操作,比方性别,数据中是0和1,字典值是男和女,这个时候就需要在mounted进行“性别”字典的获取,然后页面自动渲染。
如下所示:
data: { certificates: null }, mounted: function () { var __this = this; __this.certificates = getDictForkey("学历"); }
使用this对data中变量进行调用
vue生命周期参照官方:点击进入
vue渲染页面的时候,可能会对某些数据进行字典操作,比方性别,数据中是0和1,字典值是男和女,这个时候就需要在mounted进行“性别”字典的获取,然后页面自动渲染。