unplugin-vue-components icon indicating copy to clipboard operation
unplugin-vue-components copied to clipboard

element-plus中ElNotification组件样式错位

Open MicahZJ opened this issue 3 years ago • 4 comments

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
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Used Package Manager

yarn

Validations

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

MicahZJ avatar Nov 04 '22 07:11 MicahZJ

It might not be the plugin issue

Cheng-DX avatar Nov 10 '22 11:11 Cheng-DX

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

lishaobos avatar Feb 21 '23 09:02 lishaobos

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

GuoJikun avatar Feb 20 '25 05:02 GuoJikun

ElMessage 和 ElMessageBox 组件直接没样式

我好像是加了 dts: true 之后才出现的,不加也不影响运行

duanluan avatar May 25 '25 04:05 duanluan