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