feat: 优化三个文本框显示逻辑,改为添加背景图后自动显示
This commit is contained in:
12
js/script.js
12
js/script.js
@@ -239,11 +239,23 @@
|
||||
bgOpacitySlider.value = 100;
|
||||
bgOpacityValue.textContent = '100%';
|
||||
updateBgImage();
|
||||
|
||||
// 显示预设的文本输入框
|
||||
showPresetTextInputs();
|
||||
};
|
||||
img.src = e.target.result;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
// 显示预设的文本输入框
|
||||
function showPresetTextInputs() {
|
||||
[input1, input2, input3].forEach(inputEl => {
|
||||
if (inputEl) {
|
||||
inputEl.classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加文本输入框
|
||||
function addTextInput() {
|
||||
|
||||
Reference in New Issue
Block a user