chore: update @pureadmin/theme latest

This commit is contained in:
xiaoxian521 2022-12-15 12:28:51 +08:00
parent e032f9a6a7
commit 66fdfebb5e
5 changed files with 31 additions and 43 deletions

View File

@ -40,14 +40,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组件化支持

View File

@ -85,7 +85,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/intro.js": "^5.1.0", "@types/intro.js": "^5.1.0",
"@types/js-cookie": "^3.0.1", "@types/js-cookie": "^3.0.1",

50
pnpm-lock.yaml generated
View File

@ -14,7 +14,7 @@ specifiers:
"@logicflow/extension": ^1.1.30 "@logicflow/extension": ^1.1.30
"@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/intro.js": ^5.1.0 "@types/intro.js": ^5.1.0
@ -153,7 +153,7 @@ dependencies:
vue-pdf-embed: 1.1.5_vue@3.2.45 vue-pdf-embed: 1.1.5_vue@3.2.45
vue-router: 4.1.6_vue@3.2.45 vue-router: 4.1.6_vue@3.2.45
vue-types: 4.2.1_vue@3.2.45 vue-types: 4.2.1_vue@3.2.45
vue-virtual-scroller: 2.0.0-beta.5_vue@3.2.45 vue-virtual-scroller: 2.0.0-beta.7_vue@3.2.45
vue3-danmaku: 1.2.0_vue@3.2.45 vue3-danmaku: 1.2.0_vue@3.2.45
vuedraggable: 4.1.0_vue@3.2.45 vuedraggable: 4.1.0_vue@3.2.45
xgplayer: 2.32.2 xgplayer: 2.32.2
@ -163,16 +163,16 @@ devDependencies:
"@commitlint/cli": 13.1.0 "@commitlint/cli": 13.1.0
"@commitlint/config-conventional": 13.1.0 "@commitlint/config-conventional": 13.1.0
"@iconify-icons/ep": 1.2.10 "@iconify-icons/ep": 1.2.10
"@iconify-icons/mdi": 1.2.34 "@iconify-icons/mdi": 1.2.35
"@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/intro.js": 5.1.0 "@types/intro.js": 5.1.0
"@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.13 "@types/node": 18.11.15
"@types/nprogress": 0.2.0 "@types/nprogress": 0.2.0
"@types/qrcode": 1.5.0 "@types/qrcode": 1.5.0
"@types/qs": 6.9.7 "@types/qs": 6.9.7
@ -933,10 +933,10 @@ packages:
vue: 3.2.45 vue: 3.2.45
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:
@ -971,10 +971,10 @@ packages:
"@iconify/types": 2.0.0 "@iconify/types": 2.0.0
dev: true dev: true
/@iconify-icons/mdi/1.2.34: /@iconify-icons/mdi/1.2.35:
resolution: resolution:
{ {
integrity: sha512-3A7ezd/9mQKM9KEqR8QIfJaBWJ/HfZ3u45oy5/yU6FlTQrfRx+f+e0hD0nwAkbOptZmz2sFsGIfwBdX4Kl+JIw== integrity: sha512-cOxQdQqMcV/CA3d2CkTFVRyvYRDE5SpX0Wekjl5lbEQ5IkAPy0hJrOebSH1Jo+IB8Nm3DbAT7xkj3TjgJ7VmEA==
} }
dependencies: dependencies:
"@iconify/types": 2.0.0 "@iconify/types": 2.0.0
@ -1271,10 +1271,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
@ -1463,10 +1463,10 @@ packages:
} }
dev: false dev: false
/@types/node/18.11.13: /@types/node/18.11.15:
resolution: resolution:
{ {
integrity: sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w== integrity: sha512-VkhBbVo2+2oozlkdHXLrb3zjsRkpdnaU2bXmX8Wgle3PUi569eLRaHGlgETQHR7lLL1w7GiG3h9SnePhxNDecw==
} }
dev: true dev: true
@ -1497,7 +1497,7 @@ packages:
integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA== integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==
} }
dependencies: dependencies:
"@types/node": 18.11.13 "@types/node": 18.11.15
dev: true dev: true
/@types/qs/6.9.7: /@types/qs/6.9.7:
@ -1513,7 +1513,7 @@ packages:
integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==
} }
dependencies: dependencies:
"@types/node": 18.11.13 "@types/node": 18.11.15
dev: true dev: true
/@types/semver/7.3.13: /@types/semver/7.3.13:
@ -2742,7 +2742,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
@ -3283,12 +3283,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
@ -4358,7 +4358,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
@ -6178,10 +6178,10 @@ packages:
} }
dev: false dev: false
/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
@ -8142,7 +8142,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
@ -8827,10 +8827,10 @@ packages:
vue: 3.2.45 vue: 3.2.45
dev: false dev: false
/vue-virtual-scroller/2.0.0-beta.5_vue@3.2.45: /vue-virtual-scroller/2.0.0-beta.7_vue@3.2.45:
resolution: resolution:
{ {
integrity: sha512-P7m/8D/7bzu45gWqCflQxyZomWL4cy75AZXz73Ri43VYRiSx1hW8QNIGr6PoAR1kZAcEqHZwYlvM76gUDA3wdA== integrity: sha512-OrouVj1i2939jaLjVfu8f5fsDlbzhAb4bOsYZYrAkpcVLylAmMoGtIL7eT3hJrdTiaKbwQpRdnv7DKf9Fn+tHg==
} }
peerDependencies: peerDependencies:
vue: ^3.2.0 vue: ^3.2.0

View File

@ -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;
}; };

View File

@ -9,7 +9,5 @@ declare module "*.scss" {
export default scss; export default scss;
} }
declare module "@pureadmin/theme";
declare module "vue-virtual-scroller"; declare module "vue-virtual-scroller";
declare module "vuedraggable/src/vuedraggable"; declare module "vuedraggable/src/vuedraggable";
declare module "@pureadmin/theme/dist/browser-utils";