您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

17 行
388 B

  1. class IHKLinkCollection {
  2. constructor(div) {
  3. const observer = new ResizeObserver((entries) => {
  4. entries.map((entry) => {
  5. const w = entry.borderBoxSize[0].inlineSize;
  6. if (w < 1000) {
  7. div.dataset.cols = '1';
  8. } else {
  9. div.dataset.cols = '2';
  10. }
  11. })
  12. })
  13. observer.observe(div);
  14. }
  15. }
  16. export default IHKLinkCollection;