Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能修复一下 vue-print-nb-jeecg 打印预览checkbox,radio会自动全部勾选的问题 #4416

Closed
zjm-my opened this issue Dec 14, 2022 · 2 comments

Comments

@zjm-my
Copy link

zjm-my commented Dec 14, 2022

版本号:

3.0.0

前端版本:

vue2

问题描述:

使用vue-print-nb-jeecg 进行打印预览 checkbox,radio会自动全部勾选
能否修复下

截图&代码:

image

来自:ant-design-vue-jeecg/node_modules/vue-print-nb-jeecg/lib/printarea.js

if (typeInput === 'radio' || typeInput === 'checkbox') {

          **item.checked && copiedInput.setAttribute('checked', item.checked);**
        } else if (typeInput === 'select') {
          [].forEach.call(copiedInput.querySelectorAll('option'), function (op, b) {
            if (op.selected) {
              op.setAttribute('selected', true);
            }
          });
        } else if (typeInput === 'textarea') {
          copiedInput.innerHTML = item.value;
        } else {
          copiedInput.value = item.value;
          copiedInput.setAttribute('value', item.value);
        }

参考自:https://blog.csdn.net/ffukk/article/details/115628969

@zhangdaiscott
Copy link
Member

jl

@sjlei
Copy link

sjlei commented Apr 11, 2023

问题已修复,下版本发布

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants