gitofzgt / dynamic-theme-demos Goto Github PK
View Code? Open in Web Editor NEWImplementing dynamic themes using plugins
Implementing dynamic themes using plugins
大佬你好, 访问这个地址: https://gitofzgt.github.io/dynamic-theme-demos/vite-antd-vue-preset-theme/
然后切换主题不生效.
使用了大佬的插件后,tailwindcss就失效了
Hello, The demo projects/vite-antd-vue-preset-theme
is not working...
比如
ant-design-pro+ts+vite 更改主题色
ant-design-vue+ts+vite 更改主题色
大佬🐂🍺
Hello, is it possible to switch between themes when arbitraryMode = true
?
When running the "webpack-react-antd-dynamic-theme" demo in this repo, I noticed that when arbitraryMode = true
is set in the config of ThemeCssExtractWebpackPlugin
, the html
tag does not contain theme info like class="theme-mauve"
, and I cannot switch between the themes defined in multipleScopeVars
array.
When I comment out arbitraryMode = true
, then the themes are working but now I cannot set arbitrary theme color.
getDynamicThemePluginConfig.js
const multipleScopeVars = [
{
// 必需
scopeName: "theme-mauve",
// path和varsContent选一个
path: path.resolve("src/theme/mauve-vars.less"),
// varsContent:`@--color-primary:#9c26b;`
},
{
scopeName: 'theme-second',
path: path.resolve('src/theme/second-vars.less'),
}
];
// ...
new ThemeCssExtractWebpackPlugin({
// 以下是任意主题模式的参数 arbitraryMode:true 有效
// arbitraryMode: true,
// ...
})
Any help is appreciated, thank you.
你好,我vue-cli4 +webpack4+ less项目,按照demo能切换皮肤,预先生成主题css文件。但是打包之后用nginx代理了二级路径比如127.0.0.1/web/#/,然后访问theme-default 就报404(404访问路径为:127.0.0.1/theme-default.css , 实际应该多二级目录127.0.0.1/web/theme-default.css才行)。 我看了下打包之后的index.html,然后我看了下打包之后的index.html下面。主题themeTagLik 的路径为‘/assets/xxx/xxx/theme-default.css’,前面多了一个‘/’, 然后再看了源码源码设置themeTagLink的时候 路径前面都配了‘/’导致代理时候就出现错误。目前没找到其他的配置方法,只得把前面‘/’删了
我在你项目中的table.vue加入一段css, 编译后color属性丢失了, 如果下方less不使用变量名就是正常的
<style scoped lang="less">
:deep(.ant-table) th{
color: @primary-color !important;
}
</style>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.