We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
4.2.6
"storybook": "8.3.5","vue": "^3.2.0","ant-design-vue": "^4.2.6",
https://github.com/vueComponent/ant-design-vue
/** @type { import('@storybook/vue3').Preview } */ import { setup } from '@storybook/vue3' import Antd, { theme as antdTheme } from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
// 安装组件库 setup(app => { app.use(Antd) })
const withThemeProvider = storyFn => ({ components: { Story: storyFn() }, setup() { const { defaultAlgorithm } = antdTheme
const themeConfig = { algorithm: defaultAlgorithm, token: { colorBgBase: '#ffffffa0', colorBgLayout: '#f5f5f5a0', colorBgContainer: '#ffffffa0', colorBgElevated: '#ffffffa0', colorBgSpotlight: '#000000a0' } }
return { themeConfig } }, template: '' })
const preview = { decorators: [withThemeProvider], parameters: { controls: { matchers: { color: /(background|color)$/i, date: /Date$/i } }, backgrounds: { default: 'light', values: [ { name: 'light', value: '#F8F8F8' }, { name: 'dark', value: '#333333' } ] } } }
export default preview
在开发环境中设置的背景色生效,但是打包后无效,期望始终生效
配置colorBgBase为#ff0000都不行
The text was updated successfully, but these errors were encountered:
补充一个现象,编写的依赖ant-design-vue的组件库打包后,在应用中使用的时候才会出现这个问题
Sorry, something went wrong.
打包的时候已经排除。 rollupOptions: { external: ['vue', 'ant-design-vue', '@ant-design/icons-vue'] }
No branches or pull requests
Version
4.2.6
Environment
"storybook": "8.3.5","vue": "^3.2.0","ant-design-vue": "^4.2.6",
Reproduction link
https://github.com/vueComponent/ant-design-vue
Steps to reproduce
/** @type { import('@storybook/vue3').Preview } */
import { setup } from '@storybook/vue3'
import Antd, { theme as antdTheme } from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
// 安装组件库
setup(app => {
app.use(Antd)
})
const withThemeProvider = storyFn => ({
components: { Story: storyFn() },
setup() {
const { defaultAlgorithm } = antdTheme
const themeConfig = {
algorithm: defaultAlgorithm,
token: {
colorBgBase: '#ffffffa0',
colorBgLayout: '#f5f5f5a0',
colorBgContainer: '#ffffffa0',
colorBgElevated: '#ffffffa0',
colorBgSpotlight: '#000000a0'
}
}
return {
themeConfig
}
},
template: ''
})
const preview = {
decorators: [withThemeProvider],
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
},
backgrounds: {
default: 'light',
values: [
{ name: 'light', value: '#F8F8F8' },
{ name: 'dark', value: '#333333' }
]
}
}
}
export default preview
What is expected?
在开发环境中设置的背景色生效,但是打包后无效,期望始终生效
What is actually happening?
配置colorBgBase为#ff0000都不行
The text was updated successfully, but these errors were encountered: