web-component-gallery 2.2.13 → 2.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,7 +102,7 @@ async function parseLessVariables(content) {
|
|
|
102
102
|
function parseCSSVariables(cssVariables, resetVar) {
|
|
103
103
|
const result = {}
|
|
104
104
|
for (const [key, value] of Object.entries(cssVariables)) {
|
|
105
|
-
const match = value.match(/var
|
|
105
|
+
const match = value.match(/var\(\s*([^,)]+)\s*(?:,\s*((?:[^()]|\([^)]*\))+))?\s*\)/)
|
|
106
106
|
if (match) result[match[1]] = (match[2] || resetVar[key])
|
|
107
107
|
}
|
|
108
108
|
return result
|
|
@@ -187,11 +187,11 @@ async function updateTheme(theme) {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// 应用LESS变量更新
|
|
190
|
-
await less.modifyVars({
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
})
|
|
194
|
-
console.log("换肤成功")
|
|
190
|
+
// await less.modifyVars({
|
|
191
|
+
// ...themeVariables,
|
|
192
|
+
// ...updateVariables.less
|
|
193
|
+
// })
|
|
194
|
+
// console.log("换肤成功")
|
|
195
195
|
|
|
196
196
|
if (!Object.keys(updateVariables.css).length) return
|
|
197
197
|
|