naive-ui icon indicating copy to clipboard operation
naive-ui copied to clipboard

n-drawer 上使用n-button 自定义背景颜色显示不正常

Open qiquanlu opened this issue 2 years ago • 2 comments

TuSimple/naive-ui version (版本)

2.32.2-beta.0

Vue version (Vue 版本)

3.2.37

Browser and its version (浏览器及其版本)

Chrome Version 104.0.5112.79 (Official Build) (arm64)

System and its version (系统及其版本)

MacOS(12.2.1)

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/compassionate-dew-31xnl5?file=/src/Demo.vue

Reappearance steps (重现步骤)

添加一个n-button,通过css让其background-color为绿色,hover变黄色。 同一个button在主界面显示正常,在n-drawer里hover正常,非hover时没有显示background-color

Expected results (期望的结果)

n-button的背景颜色在n-drawer里正常显示

Actual results (实际的结果)

n-button的背景颜色在n-drawer里不显示

Remarks (补充说明)

qiquanlu avatar Aug 10 '22 18:08 qiquanlu

是正常显示的 image

Sepush avatar Aug 10 '22 23:08 Sepush

hover的时候显示正常,但是没有hover的时候背景色并不是绿色,见截图 Screen Shot 2022-08-11 at 2 51 40 PM

当点击drawer上任意一点后,显示正常,如下 Screen Shot 2022-08-11 at 2 51 48 PM

qiquanlu avatar Aug 11 '22 18:08 qiquanlu

这是 auto-focus 导致的,所以一进去就用了 button 的 focus 状态了。

07akioni avatar Aug 12 '22 15:08 07akioni

这是 auto-focus 导致的,所以一进去就用了 button 的 focus 状态了。

感谢!

qiquanlu avatar Aug 12 '22 17:08 qiquanlu