commonOption.js 266 B

123456789101112131415
  1. const statusOptions = [
  2. {
  3. value: 0,
  4. label: "启用",
  5. },
  6. {
  7. value: 1,
  8. label: "禁用",
  9. },
  10. ];
  11. const getLabel=(options,value)=>{
  12. let option=options.find(o=>o.value===value);
  13. return option?option.label:'';
  14. }
  15. export { statusOptions ,getLabel};