|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
| 3 | +exports[`slots .translate slot props are translated 1`] = ` |
| 4 | +"function anonymous(app, bdom, helpers |
| 5 | +) { |
| 6 | + let { text, createBlock, list, multi, html, toggler, comment } = bdom; |
| 7 | + let { capture, markRaw } = helpers; |
| 8 | + const comp1 = app.createComponent(\`Child\`, true, true, false, []); |
| 9 | + |
| 10 | + return function template(ctx, node, key = \\"\\") { |
| 11 | + const ctx1 = capture(ctx); |
| 12 | + return comp1({slots: markRaw({'default': {message: \`translated message\`}})}, key + \`__1\`, node, this, null); |
| 13 | + } |
| 14 | +}" |
| 15 | +`; |
| 16 | + |
| 17 | +exports[`slots .translate slot props are translated 2`] = ` |
| 18 | +"function anonymous(app, bdom, helpers |
| 19 | +) { |
| 20 | + let { text, createBlock, list, multi, html, toggler, comment } = bdom; |
| 21 | + |
| 22 | + return function template(ctx, node, key = \\"\\") { |
| 23 | + return text(ctx['props'].slots.default.message); |
| 24 | + } |
| 25 | +}" |
| 26 | +`; |
| 27 | + |
3 | 28 | exports[`slots can define a default content 1`] = `
|
4 | 29 | "function anonymous(app, bdom, helpers
|
5 | 30 | ) {
|
@@ -201,6 +226,31 @@ exports[`slots can render only empty slot 1`] = `
|
201 | 226 | }"
|
202 | 227 | `;
|
203 | 228 |
|
| 229 | +exports[`slots can use .translate suffix on slot props 1`] = ` |
| 230 | +"function anonymous(app, bdom, helpers |
| 231 | +) { |
| 232 | + let { text, createBlock, list, multi, html, toggler, comment } = bdom; |
| 233 | + let { capture, markRaw } = helpers; |
| 234 | + const comp1 = app.createComponent(\`Child\`, true, true, false, []); |
| 235 | + |
| 236 | + return function template(ctx, node, key = \\"\\") { |
| 237 | + const ctx1 = capture(ctx); |
| 238 | + return comp1({slots: markRaw({'default': {message: \`some message\`}})}, key + \`__1\`, node, this, null); |
| 239 | + } |
| 240 | +}" |
| 241 | +`; |
| 242 | + |
| 243 | +exports[`slots can use .translate suffix on slot props 2`] = ` |
| 244 | +"function anonymous(app, bdom, helpers |
| 245 | +) { |
| 246 | + let { text, createBlock, list, multi, html, toggler, comment } = bdom; |
| 247 | + |
| 248 | + return function template(ctx, node, key = \\"\\") { |
| 249 | + return text(ctx['props'].slots.default.message); |
| 250 | + } |
| 251 | +}" |
| 252 | +`; |
| 253 | + |
204 | 254 | exports[`slots can use component in default-content of t-slot 1`] = `
|
205 | 255 | "function anonymous(app, bdom, helpers
|
206 | 256 | ) {
|
|
0 commit comments