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

[Custom Theme] Global common theme does not effect NSelect #1229

Closed
myWsq opened this issue Sep 23, 2021 · 5 comments
Closed

[Custom Theme] Global common theme does not effect NSelect #1229

myWsq opened this issue Sep 23, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@myWsq
Copy link

myWsq commented Sep 23, 2021

TuSimple/naive-ui version (版本)

2.19.1

Vue version (Vue 版本)

3.2.10

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

Chrome(93.0.4577.82)

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

MacOS 11.5.2

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/reverent-wright-9kcg8?file=/src/App.vue

Reappearance steps (重现步骤)

Override fontSizeMedium and heightMedium on n-config-provider

Expected results (期望的结果)

The Select component height should same with input component.

Actual results (实际的结果)

Global common theme does not effect NSelect

Remarks (补充说明)

The problem may be caused by InternalSelection

@github-actions github-actions bot added the untriaged need to sort label Sep 23, 2021
@07akioni
Copy link
Collaborator

@Volankey

@Volankey
Copy link
Collaborator

Select should override by the follow code

 /**
   * @type import('naive-ui').GlobalThemeOverrides
   */
   const theme = {
      common: {
        fontSizeMedium: "14px",
        heightMedium: "40px",
      },
      Select: {
        peers: {
          InternalSelection:{
           heightMedium: "40px",
          fontSizeMedium: '14px',

          }
        },
      },
    };

@myWsq
Copy link
Author

myWsq commented Sep 24, 2021

@Volankey Yeah I found that way when I view source code. I still confused why InternalSelection does not inherit global properties.

@Volankey
Copy link
Collaborator

It depends on implementation, @07akioni can give you a reasonable answer.

@07akioni
Copy link
Collaborator

@Volankey Yeah I found that way when I view source code. I still confused why InternalSelection does not inherit global properties.

I'll take a look.

@07akioni 07akioni added bug Something isn't working and removed untriaged need to sort labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants