// 完整的写法: fullname: { get: function() { return this.firstname + " " + this.lastname }, set: function(value) { const names = value.split(" ") this.firstname = names[0] this.lastname = names[1] } }
标签:function,set,computed,firstname,get,names From: https://www.cnblogs.com/qd-lbxx/p/16592529.html