微件

TierListMaker:修订间差异

来自卡厄思梦境WIKI

律Rhyme留言 | 贡献
无编辑摘要
标签手工回退
律Rhyme留言 | 贡献
无编辑摘要
 
第45行: 第45行:
   display: flex;
   display: flex;
   gap: 6px;
   gap: 6px;
}
/* 导出时隐藏工具按钮 */
.exporting .tier-tools {
  display: none !important;
}
}
.color-toggle {
.color-toggle {
第68行: 第72行:
   gap: 6px;
   gap: 6px;
   align-items: flex-start;
   align-items: flex-start;
  padding: 4px;
}
}
.tier-dropzone.pool {
.tier-dropzone.pool {
第74行: 第79行:
   border-radius: 6px;
   border-radius: 6px;
   background: #fafafa;
   background: #fafafa;
}
/* 导出时隐藏角色池 */
.exporting .pool-wrapper {
  display: none !important;
}
}
.pool-wrapper { margin-top: 12px; }
.pool-wrapper { margin-top: 12px; }
第150行: 第159行:
   outline: none;
   outline: none;
   cursor: text;
   cursor: text;
}
.exporting .tier-dropzone.pool {
  border-color: transparent;
  background: transparent;
}
}
</style>
</style>
第428行: 第432行:
       return;
       return;
     }
     }
   
    // 添加导出样式类
     maker.classList.add('exporting');
     maker.classList.add('exporting');
     prepareImagesForExport(table);
     prepareImagesForExport(table);
   
     ensureHtml2Canvas(function() {
     ensureHtml2Canvas(function() {
       html2canvas(table, {
       // 稍微延迟以确保CSS生效
        backgroundColor: null,
      setTimeout(function() {
        scale: 2,
        html2canvas(table, {
        useCORS: true,
          backgroundColor: '#ffffff',
        allowTaint: false,
          scale: 2,
        imageTimeout: 15000
          useCORS: true,
      }).then(function(canvas) {
          allowTaint: false,
        downloadCanvas(canvas);
          imageTimeout: 15000
      }).catch(function(err) {
        }).then(function(canvas) {
        console.error('html2canvas 失败', err);
          downloadCanvas(canvas);
        alert('保存PNG失败:' + (err && err.message ? err.message : '未知错误'));
        }).catch(function(err) {
      }).finally(function() {
          console.error('html2canvas 失败', err);
        maker.classList.remove('exporting');
          alert('保存PNG失败:' + (err && err.message ? err.message : '未知错误'));
       });
        }).finally(function() {
          maker.classList.remove('exporting');
        });
       }, 100);
     });
     });
   }
   }
第493行: 第503行:
                 }
                 }
                 n.querySelectorAll && n.querySelectorAll('.avatar-frame').forEach(makeDraggable);
                 n.querySelectorAll && n.querySelectorAll('.avatar-frame').forEach(makeDraggable);
                // 去除初始即为空的无用占位
                 if (pool.contains(n)) cleanupEmptyPlaceholdersIn(pool);
                 if (pool.contains(n)) cleanupEmptyPlaceholdersIn(pool);
               }
               }

2025年10月29日 (三) 14:50的最新版本