js 按照对象属性名排序 let frequency_data={hours5:'05:00',hours1:'00:00',hours6:'08:00',hours2:'02:00',hours4:'04:00',hours3:'03:00',} //定义一个对象 let timeObj={} //用 Object.keys获取到需要排序的属性名 数组sort排序 Object.keys(frequency_data).sort().map((key) => { timeObj[key] = this.schedForm.frequency_data[key]; });