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

How to set z-index attribute in the image preview container? #5317

Closed
QC2168 opened this issue Oct 13, 2023 · 3 comments
Closed

How to set z-index attribute in the image preview container? #5317

QC2168 opened this issue Oct 13, 2023 · 3 comments
Labels
feature request New feature or request

Comments

@QC2168
Copy link
Contributor

QC2168 commented Oct 13, 2023

This function solves the problem (这个功能解决的问题)

I use the drawer component and set the z-index to 5000, while I use the image component in the drawer component. However, I encountered a drawer layer level that is higher than the image preview, resulting in the image not being displayed

Expected API (期望的 API)

:z-index="5000"

@github-actions github-actions bot added the feature request New feature or request label Oct 13, 2023
@QC2168
Copy link
Contributor Author

QC2168 commented Oct 13, 2023

I tried using deep, but it didn't work

:deep(.n-image-preview-container){
  z-index: 5001 !important;
}

@z0ffy
Copy link
Contributor

z0ffy commented Oct 13, 2023

I tried using deep, but it didn't work

:deep(.n-image-preview-container){
  z-index: 5001 !important;
}

n-image-preview-container元素是跟app同级的,把deep去掉,并且去掉scope就可以了

@QC2168
Copy link
Contributor Author

QC2168 commented Oct 14, 2023

我在index.css中写入解决了,如果在App.vue上不添加上deep的话,Vue会额外处理类名的 @667-1

@QC2168 QC2168 closed this as completed Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants