Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/esm/ToggleButtonGroup/isValueSelected.js 344 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
  // Determine if the toggle button value matches, or is contained in, the
  // candidate group value.
  export default function isValueSelected(value, candidate) {
    if (candidate === undefined || value === undefined) {
      return false;
    }
    if (Array.isArray(candidate)) {
      return candidate.includes(value);
    }
    return value === candidate;
  }