refactor: inputs-config.js 合并为 config.js,新增默认背景图配置及使用说明

This commit is contained in:
2026-05-15 15:14:11 +08:00
parent 315f568138
commit f090f18a9d
4 changed files with 166 additions and 6 deletions

View File

@@ -804,9 +804,9 @@
}
}
// 加载默认背景图
// 加载默认背景图(路径从 config.js 读取)
function loadDefaultBackground() {
const defaultBgUrl = './images/default-bg.jpg';
const defaultBgUrl = typeof DEFAULT_BG_IMAGE !== 'undefined' ? DEFAULT_BG_IMAGE : './images/default-bg.jpg';
const img = new Image();
img.onload = () => {
currentImage = img;