修复scoped解析

pull/1/head 0.7.5
yutent 2023-05-04 14:58:03 +08:00
parent d1e1084ec1
commit f28212f933
2 changed files with 9 additions and 3 deletions

View File

@ -72,8 +72,14 @@ function scopeCss(css = '', hash) {
output = `${last} ${output}`
}
} else {
if (last.startsWith(':')) {
output = parseVDeep(last, output)
if (last.includes(':')) {
if (last.startsWith(':')) {
output = parseVDeep(last, output)
} else {
scoped = true
last = last.replace(':', `[data-${hash}]:`)
output = `${last} ${output}`
}
} else {
scoped = true
output = `${last}[data-${hash}] ${output}`

View File

@ -1,7 +1,7 @@
{
"name": "fite",
"type": "module",
"version": "0.7.4",
"version": "0.7.5",
"bin": {
"fite": "index.js"
},