// 根据字典过滤数据 export const filterItems = (key, dict = {}) => { let val = ""; Object.keys(dict).forEach((keys) => { if (key == keys) { val = dict[keys]; } }); return val; }; // 对象转对象数组 export const transverter = (obj) => { return Object.keys(obj).map((v) => { return { id: v, name: obj[v], }; }); }; // 统一分辨率格式 export const unifyResolution = (resolution) => { return resolution.replace(/[xX*]/, "x"); };