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

ant-design-vue custom theme style is invalid #160

Closed
i7eo opened this issue Sep 28, 2021 · 5 comments
Closed

ant-design-vue custom theme style is invalid #160

i7eo opened this issue Sep 28, 2021 · 5 comments
Labels
help wanted Extra attention is needed resolver

Comments

@i7eo
Copy link

i7eo commented Sep 28, 2021

version:

{
    // ...
    "vue": "^3.2.19",
    "ant-design-vue": "^2.2.8",
     "vite": "^2.5.10",
     "unplugin-vue-components": "^0.15.4"
}

vite.config.js:

{
    // ...
    css: {
        preprocessorOptions: {
          less: {
            modifyVars: {
              'primary-color': '#3351c7',
              'border-radius-base': '10px'
            },
            javascriptEnabled: true
          }
        }
    },
    plugins: [
        Components({
          resolvers: [
            AntDesignVueResolver(),
          ],
          dts: true,
          include: [/\.vue$/, /\.vue\?vue/, /\.tsx$/, /\.jsx$/]
        })
     ]
}

The component does not change after startup, If I introduce the whole thing in the entry without using unplugin-vue-components, the style will change.

@antfu antfu added help wanted Extra attention is needed resolver labels Sep 30, 2021
@ekxs0109
Copy link

+1

@ekxs0109
Copy link

image

importStyle: "less"
可以正常使用自定义样式

@nabaonan
Copy link
Collaborator

use less option is ok , default is css

@i7eo
Copy link
Author

i7eo commented Oct 21, 2021

use less option is ok , default is css

alright i got it

@lifedever
Copy link

赞👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed resolver
Projects
None yet
Development

No branches or pull requests

5 participants