Skip to content

Commit 3ccd156

Browse files
committed
add arrow fn
1 parent 55254ce commit 3ccd156

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
block('pager')
22
.elem('item')
3-
.match(function() { return this.ctx.url !== true; })
4-
.replace()(function() {
3+
.match(node => { return node.ctx.url !== true; })
4+
.replace()(node => {
55
const type2caption = {
66
first: '<<',
77
prev: '<',
@@ -10,14 +10,14 @@ block('pager')
1010
last: '>>'
1111
};
1212

13-
const elemMods = this.elemMods;
13+
const elemMods = node.elemMods;
1414
const type = elemMods.type;
1515

1616
return {
1717
block: 'button',
1818
mods: { theme: 'islands', size: 'm', type: 'link', disabled: type === 'current' },
19-
mix: { block: this.block, elem: this.elem, elemMods },
20-
url: this.ctx.url,
21-
text: type2caption[type] || this.ctx.number
19+
mix: { block: node.block, elem: node.elem, elemMods },
20+
url: node.ctx.url,
21+
text: type2caption[type] || node.ctx.number
2222
};
2323
});

0 commit comments

Comments
 (0)