chore: update @pureadmin/theme
latest
This commit is contained in:
parent
4d57c9e3d7
commit
bc548d500c
@ -33,14 +33,7 @@ export function getPluginsList(
|
||||
themePreprocessorPlugin({
|
||||
scss: {
|
||||
multipleScopeVars: genScssMultipleScopeVars(),
|
||||
// 在生产模式是否抽取独立的主题css文件,extract为true以下属性有效
|
||||
extract: true,
|
||||
// 会选取defaultScopeName对应的主题css文件在html添加link
|
||||
themeLinkTagId: "head",
|
||||
// "head"||"head-prepend" || "body" ||"body-prepend"
|
||||
themeLinkTagInjectTo: "head",
|
||||
// 是否对抽取的css文件内对应scopeName的权重类名移除
|
||||
removeCssScopeName: false
|
||||
extract: true
|
||||
}
|
||||
}),
|
||||
// svg组件化支持
|
||||
|
@ -58,7 +58,7 @@
|
||||
"@iconify-icons/ep": "^1.2.7",
|
||||
"@iconify-icons/ri": "^1.2.3",
|
||||
"@iconify/vue": "^4.0.0",
|
||||
"@pureadmin/theme": "^2.4.0",
|
||||
"@pureadmin/theme": "^3.0.0",
|
||||
"@types/element-resize-detector": "1.1.3",
|
||||
"@types/js-cookie": "^3.0.1",
|
||||
"@types/mockjs": "^1.0.7",
|
||||
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@ -8,7 +8,7 @@ specifiers:
|
||||
"@iconify/vue": ^4.0.0
|
||||
"@pureadmin/descriptions": ^1.1.0
|
||||
"@pureadmin/table": ^1.9.0
|
||||
"@pureadmin/theme": ^2.4.0
|
||||
"@pureadmin/theme": ^3.0.0
|
||||
"@pureadmin/utils": ^1.8.5
|
||||
"@types/element-resize-detector": 1.1.3
|
||||
"@types/js-cookie": ^3.0.1
|
||||
@ -111,7 +111,7 @@ devDependencies:
|
||||
"@iconify-icons/ep": 1.2.10
|
||||
"@iconify-icons/ri": 1.2.4
|
||||
"@iconify/vue": 4.0.2_vue@3.2.45
|
||||
"@pureadmin/theme": 2.4.0
|
||||
"@pureadmin/theme": 3.0.0
|
||||
"@types/element-resize-detector": 1.1.3
|
||||
"@types/js-cookie": 3.0.2
|
||||
"@types/mockjs": 1.0.7
|
||||
@ -1041,10 +1041,10 @@ packages:
|
||||
vue: 3.2.45
|
||||
dev: false
|
||||
|
||||
/@pureadmin/theme/2.4.0:
|
||||
/@pureadmin/theme/3.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-aqX2O5WpqOCUiy6jhle92Pj7gDqF1/cHPWD+fWcDmmgmV7l7zqEDMWmZI1Iueg55fGxR39D400LaD2VrE8ihGA==
|
||||
integrity: sha512-1qs0fve9DY4XgI5xafTd9qRPuWSo2QGON7avBqKSSSjXpCbo2BOccsH6qh5N2BxVBVZQJBYZoMq3bAUdK2Q0Jw==
|
||||
}
|
||||
dependencies:
|
||||
"@zougt/some-loader-utils": 1.4.3
|
||||
|
@ -2,10 +2,7 @@
|
||||
* @description ⚠️:此文件仅供主题插件使用,请不要在此文件中导出别的工具函数(仅在页面加载前运行)
|
||||
*/
|
||||
|
||||
type MultipleScopeVarsItem = {
|
||||
scopeName: string;
|
||||
varsContent: string;
|
||||
};
|
||||
import { type multipleScopeVarsOptions } from "@pureadmin/theme";
|
||||
|
||||
/** 预设主题色 */
|
||||
const themeColors = {
|
||||
@ -113,8 +110,8 @@ const themeColors = {
|
||||
/**
|
||||
* @description 将预设主题色处理成主题插件所需格式
|
||||
*/
|
||||
export const genScssMultipleScopeVars = (): MultipleScopeVarsItem[] => {
|
||||
const result = [] as MultipleScopeVarsItem[];
|
||||
export const genScssMultipleScopeVars = (): multipleScopeVarsOptions[] => {
|
||||
const result = [] as multipleScopeVarsOptions[];
|
||||
Object.keys(themeColors).forEach(key => {
|
||||
result.push({
|
||||
scopeName: `layout-theme-${key}`,
|
||||
@ -129,7 +126,7 @@ export const genScssMultipleScopeVars = (): MultipleScopeVarsItem[] => {
|
||||
$menuTitleHover: ${themeColors[key].menuTitleHover} !default;
|
||||
$menuActiveBefore: ${themeColors[key].menuActiveBefore} !default;
|
||||
`
|
||||
} as MultipleScopeVarsItem);
|
||||
} as multipleScopeVarsOptions);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
3
types/shims-vue.d.ts
vendored
3
types/shims-vue.d.ts
vendored
@ -8,6 +8,3 @@ declare module "*.scss" {
|
||||
const scss: Record<string, string>;
|
||||
export default scss;
|
||||
}
|
||||
|
||||
declare module "@pureadmin/theme";
|
||||
declare module "@pureadmin/theme/dist/browser-utils";
|
||||
|
Loading…
Reference in New Issue
Block a user