mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-25 16:07:19 +08:00
chore: update @pureadmin/theme
latest
This commit is contained in:
parent
806f56d80c
commit
6faffacf77
@ -41,14 +41,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组件化支持
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
"@iconify-icons/ri": "^1.2.3",
|
"@iconify-icons/ri": "^1.2.3",
|
||||||
"@iconify/vue": "^4.0.0",
|
"@iconify/vue": "^4.0.0",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
||||||
"@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",
|
||||||
|
36
pnpm-lock.yaml
generated
36
pnpm-lock.yaml
generated
@ -9,7 +9,7 @@ specifiers:
|
|||||||
"@intlify/vite-plugin-vue-i18n": ^6.0.3
|
"@intlify/vite-plugin-vue-i18n": ^6.0.3
|
||||||
"@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
|
||||||
@ -115,11 +115,11 @@ devDependencies:
|
|||||||
"@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
|
||||||
"@intlify/vite-plugin-vue-i18n": 6.0.3_vite@3.1.8+vue-i18n@9.2.2
|
"@intlify/vite-plugin-vue-i18n": 6.0.3_vite@3.1.8+vue-i18n@9.2.2
|
||||||
"@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
|
||||||
"@types/node": 18.11.14
|
"@types/node": 18.11.15
|
||||||
"@types/nprogress": 0.2.0
|
"@types/nprogress": 0.2.0
|
||||||
"@types/qs": 6.9.7
|
"@types/qs": 6.9.7
|
||||||
"@typescript-eslint/eslint-plugin": 5.46.1_imrg37k3svwu377c6q7gkarwmi
|
"@typescript-eslint/eslint-plugin": 5.46.1_imrg37k3svwu377c6q7gkarwmi
|
||||||
@ -858,10 +858,10 @@ packages:
|
|||||||
"@floating-ui/core": 1.0.4
|
"@floating-ui/core": 1.0.4
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@humanwhocodes/config-array/0.11.7:
|
/@humanwhocodes/config-array/0.11.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==
|
integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==
|
||||||
}
|
}
|
||||||
engines: { node: ">=10.10.0" }
|
engines: { node: ">=10.10.0" }
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -1165,10 +1165,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
|
||||||
@ -1329,10 +1329,10 @@ packages:
|
|||||||
}
|
}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/node/18.11.14:
|
/@types/node/18.11.15:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-0KXV57tENYmmJMl+FekeW9V3O/rlcqGQQJ/hNh9r8pKIj304pskWuEd8fCyNT86g/TpO0gcOTiLzsHLEURFMIQ==
|
integrity: sha512-VkhBbVo2+2oozlkdHXLrb3zjsRkpdnaU2bXmX8Wgle3PUi569eLRaHGlgETQHR7lLL1w7GiG3h9SnePhxNDecw==
|
||||||
}
|
}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -1370,7 +1370,7 @@ packages:
|
|||||||
integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==
|
integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==
|
||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node": 18.11.14
|
"@types/node": 18.11.15
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/semver/7.3.13:
|
/@types/semver/7.3.13:
|
||||||
@ -2329,7 +2329,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001439
|
caniuse-lite: 1.0.30001439
|
||||||
electron-to-chromium: 1.4.284
|
electron-to-chromium: 1.4.284
|
||||||
node-releases: 2.0.6
|
node-releases: 2.0.7
|
||||||
update-browserslist-db: 1.0.10_browserslist@4.21.4
|
update-browserslist-db: 1.0.10_browserslist@4.21.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -2817,12 +2817,12 @@ packages:
|
|||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/css-tree/2.3.0:
|
/css-tree/2.3.1:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-1rg0LiK2MFi4R3/lVvnRokEWTZb30ljSAe5x+0HHkZ+OqZaAeiP8g8Eh91VmkyCtQn9vMgQRiaTDYgLBt+2Qyw==
|
integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==
|
||||||
}
|
}
|
||||||
engines: { node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: ">=7.0.0" }
|
engines: { node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0 }
|
||||||
dependencies:
|
dependencies:
|
||||||
mdn-data: 2.0.30
|
mdn-data: 2.0.30
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
@ -3780,7 +3780,7 @@ packages:
|
|||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint/eslintrc": 1.3.3
|
"@eslint/eslintrc": 1.3.3
|
||||||
"@humanwhocodes/config-array": 0.11.7
|
"@humanwhocodes/config-array": 0.11.8
|
||||||
"@humanwhocodes/module-importer": 1.0.1
|
"@humanwhocodes/module-importer": 1.0.1
|
||||||
"@nodelib/fs.walk": 1.2.8
|
"@nodelib/fs.walk": 1.2.8
|
||||||
ajv: 6.12.6
|
ajv: 6.12.6
|
||||||
@ -5366,10 +5366,10 @@ packages:
|
|||||||
}
|
}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/node-releases/2.0.6:
|
/node-releases/2.0.7:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==
|
integrity: sha512-EJ3rzxL9pTWPjk5arA0s0dgXpnyiAbJDE6wHT62g7VsgrgQgmmZ+Ru++M1BFofncWja+Pnn3rEr3fieRySAdKQ==
|
||||||
}
|
}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -7199,7 +7199,7 @@ packages:
|
|||||||
"@trysound/sax": 0.2.0
|
"@trysound/sax": 0.2.0
|
||||||
commander: 7.2.0
|
commander: 7.2.0
|
||||||
css-select: 5.1.0
|
css-select: 5.1.0
|
||||||
css-tree: 2.3.0
|
css-tree: 2.3.1
|
||||||
csso: 5.0.5
|
csso: 5.0.5
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -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