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

配置lineNumber为true后,代码复制按钮不出现 #372

Closed
biubiupiu320 opened this issue May 6, 2020 · 7 comments
Closed

配置lineNumber为true后,代码复制按钮不出现 #372

biubiupiu320 opened this issue May 6, 2020 · 7 comments
Assignees
Milestone

Comments

@biubiupiu320
Copy link
Contributor

调用Vditor.preview方法时,如果传入的config配置了lineNumber为true,那么代码复制按钮就会不见

@biubiupiu320
Copy link
Contributor Author

经过测试,改一下CSS样式似乎就正常了
.vditor-copy {
display: inline;
}

.vditor-copy span {
    z-index: 1;
}

@biubiupiu320
Copy link
Contributor Author

另外建议在upload的配置中增加请求附加参数配置,在上传方法中遍历附加请求参数,追加到form中

@Vanessa219
Copy link
Owner

另外建议在upload的配置中增加请求附加参数配置,在上传方法中遍历附加请求参数,追加到form中

上传除了文件信息可以放在 headers 中 https://hacpai.com/article/1549638745630#options-upload

@biubiupiu320
Copy link
Contributor Author

另外建议在upload的配置中增加请求附加参数配置,在上传方法中遍历附加请求参数,追加到form中

上传除了文件信息可以放在 headers 中 https://hacpai.com/article/1549638745630#options-upload

使用请求头可能会对与一些已经设计部署好的后端产生更改,添加额外请求参数总是好的。

@Vanessa219
Copy link
Owner

表单上传的对象如下,你是需要在 formData 中添加其他对象么?这样已经设计部署好的后端也是需要产生更改的

const formData = new FormData();
formData.append("file[]", File[i]);

@biubiupiu320
Copy link
Contributor Author

表单上传的对象如下,你是需要在 formData 中添加其他对象么?这样已经设计部署好的后端也是需要产生更改的

const formData = new FormData();
formData.append("file[]", File[i]);

这个我看到了,我改过了的,添加了额外的请求参数。我后端上传文件就是有多个参数,我改了一下源码。我只是建议你们也添加这个配置项,可能其他人也有这个需求呢。

@Vanessa219
Copy link
Owner

你修改过的话可以直接提 PR

@Vanessa219 Vanessa219 added this to the 3.2.0 milestone May 7, 2020
Vanessa219 added a commit that referenced this issue May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants