优化style[scoped]的解析

pull/1/head
yutent 2023-04-27 15:46:28 +08:00
parent dc1fea1bbb
commit 574dd7e693
2 changed files with 7 additions and 3 deletions

View File

@ -54,8 +54,12 @@ function scopeCss(css = '', hash) {
if (last.includes(':')) { if (last.includes(':')) {
let res = V_DEEP.exec(last) let res = V_DEEP.exec(last)
if (res) { if (res) {
last = tmp.pop() if (tmp.length) {
last += `[data-${hash}] ` + res[1] last = tmp.pop()
last += `[data-${hash}] `
} else {
last = res[1]
}
} else { } else {
if (last.startsWith(':')) { if (last.startsWith(':')) {
let _prev = tmp.pop() let _prev = tmp.pop()

View File

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