对象内动态属性名的值获取

 1 // path
 2 form.list.0.title         
 3 
 4 
 5 /**
 6          *
 7          * @param {String} obj
 8          * @param {String} path
 9          * @param {Number} nums
10          */
11         $_setLimit: function(obj, path, nums) {
12             let temObj = obj;
13             let keyArr = path.split(".");
14             let val = keyArr.reduce((cur, next) => {
15                  return cur[next];
16             }, this[temObj]);
17         }
原文地址:https://www.cnblogs.com/chenzeyongjsj/p/11190715.html