import { CommonStore } from '@/stores/common';

const store = CommonStore();

export const formOptionsFormat = (data: any) => {
  data.forEach((item: any) => {
    if (
      ['select', 'multipleSelect', 'radio', 'checkbox'].includes(item.inputMode) &&
      item.formOptions
    ) {
      const dictData: any = store.getDictData(item.formOptions);
      item.options = dictData.A;
    }
  });
};
