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

element-plus中ElNotification组件样式错位 #545

Open
5 tasks done
MicahZJ opened this issue Nov 4, 2022 · 3 comments
Open
5 tasks done

element-plus中ElNotification组件样式错位 #545

MicahZJ opened this issue Nov 4, 2022 · 3 comments

Comments

@MicahZJ
Copy link

MicahZJ commented Nov 4, 2022

Describe the bug

ElNotification组件样式错位
官网示例
Snipaste_2022-11-04_14-56-42

本地样式错位
image

引入代码如下

import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

module.exports = {
  // ...
  plugins: [
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    }),
  ],
}

Reproduction

none

System Info

node:14.18.2
system:win10
unplugin-auto-import@0.11.4
unplugin-vue-components@0.22.9
element-plus@2.2.19
vue@3.2.41
vite@3.1.8
chrome@106.0.5249.119

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@Cheng-DX
Copy link

Cheng-DX commented Nov 10, 2022

It might not be the plugin issue

@lishaobos
Copy link
Contributor

if you use auto-import, css weight wiill be higher.

@GuoJikun
Copy link

我自定义scss变量的时候,ElMessage和ElMessageBox组件直接没样式,最后只能再增加一个插件unplugin-element-plus解决

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

4 participants