fix(vue): group slot-scope correctly (#5563)

master
Ika 2018-11-29 10:09:38 +08:00 committed by GitHub
parent c28dc2f19c
commit 1ecd2228b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -128,8 +128,10 @@ function embed(path, print, textToDoc, options) {
return concat([
node.rawName,
'="',
mapDoc(embeddedAttributeValueDoc, doc =>
typeof doc === "string" ? doc.replace(/"/g, """) : doc
group(
mapDoc(embeddedAttributeValueDoc, doc =>
typeof doc === "string" ? doc.replace(/"/g, """) : doc
)
),
'"'
]);

View File

@ -26,6 +26,7 @@ printWidth: 80
@click=" $emit( 'click' ) "
@click=" $emit( 'click' ) ;"
@click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}"
slot-scope="{row}"
slot-scope="{destructuring:{a:{b}}}"
:class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }"
:class="(() => { return 'hello' })()"
@ -71,6 +72,7 @@ printWidth: 80
} else {
}
"
slot-scope="{ row }"
slot-scope="{
destructuring: {
a: { b }
@ -133,6 +135,7 @@ trailingComma: "es5"
@click=" $emit( 'click' ) "
@click=" $emit( 'click' ) ;"
@click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}"
slot-scope="{row}"
slot-scope="{destructuring:{a:{b}}}"
:class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }"
:class="(() => { return 'hello' })()"
@ -178,6 +181,7 @@ trailingComma: "es5"
} else {
}
"
slot-scope="{ row }"
slot-scope="{
destructuring: {
a: { b },

View File

@ -18,6 +18,7 @@
@click=" $emit( 'click' ) "
@click=" $emit( 'click' ) ;"
@click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}"
slot-scope="{row}"
slot-scope="{destructuring:{a:{b}}}"
:class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }"
:class="(() => { return 'hello' })()"