Skip to content

Commit 5a5dbde

Browse files
committed
update
1 parent 126a199 commit 5a5dbde

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/platforms/mp/compiler/codegen-swan/config/astMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
// 'if': 's-if',
2+
'if': 's-if',
33
'v-for': 's-for',
44
'alias': 's-for-item',
55
'iterator1': 's-for-index',

src/platforms/mp/compiler/codegen-swan/convert/component.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function getSlotsName (obj) {
1010
.join(',')
1111
}
1212

13-
function tmplateSlotsObj(obj) {
13+
function tmplateSlotsObj (obj) {
1414
if (!obj) {
1515
return []
1616
}
@@ -28,13 +28,13 @@ export default {
2828
convertComponent (ast, components, slotName) {
2929
const { attrsMap, tag, mpcomid, slots } = ast
3030
if (slotName) {
31-
attrsMap['data'] = "{{{...$root[$k], $root}}}"
31+
attrsMap['data'] = '{{{...$root[$k], $root}}}'
3232
// bindedName is available when rendering slot in v-for
3333
const bindedName = attrsMap['v-bind:name']
34-
if(bindedName) {
35-
attrsMap['is'] = "{{$for[" + bindedName + "]}}"
34+
if (bindedName) {
35+
attrsMap['is'] = '{{$for[' + bindedName + ']}}'
3636
} else {
37-
attrsMap['is'] = "{{" + slotName + "}}"
37+
attrsMap['is'] = '{{' + slotName + '}}'
3838
}
3939
} else {
4040
const slotsName = getSlotsName(slots)

0 commit comments

Comments
 (0)