bodySelectedEvent.js 577 B

12345678910111213141516
  1. import { CARD, CARD_DISABLED_BUTTON } from "../../constant";
  2. //单选
  3. export function bodySelectedEvent(props, moduleId, record, index, status) {
  4. let checkedRows = props.cardTable.getCheckedRows(CARD.table_code);
  5. if (checkedRows.length > 0) {
  6. props.button.setButtonDisabled(CARD_DISABLED_BUTTON, false);
  7. } else {
  8. props.button.setButtonDisabled(CARD_DISABLED_BUTTON, true);
  9. }
  10. }
  11. //全选
  12. export function bodySelectedAllEvent(props, moduleId, status, length) {
  13. props.button.setButtonDisabled(CARD_DISABLED_BUTTON, !(status && length > 0));
  14. }