diff --git a/assets/js/ticket-center-core.js b/assets/js/ticket-center-core.js index 8c1efe85..46dba94a 100644 --- a/assets/js/ticket-center-core.js +++ b/assets/js/ticket-center-core.js @@ -276,12 +276,12 @@ */ function bindShell(shell, onClick) { var ctx = { uploadRoot: null }; + // 文件选择器保持脱离文档:shell 是 flex 居中容器,挂进去会成为第二个 flex 子项, + // 把对话框挤偏并露出原生「选择文件」按钮(主题样式会覆盖 [hidden])。 var input = document.createElement('input'); input.type = 'file'; input.accept = IMAGE_ACCEPT; input.multiple = true; - input.hidden = true; - shell.appendChild(input); input.addEventListener('change', function () { var files = Array.prototype.slice.call(input.files || []); input.value = '';