Skip to content

Commit 41904b7

Browse files
committed
add demo
1 parent af38c83 commit 41904b7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/appShell.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,17 @@ export class AppShell extends BaseCustomWebComponentConstructorAppend {
232232
code = decodeURIComponent(p.substring(5));
233233
if (p.startsWith('style='))
234234
style = decodeURIComponent(p.substring(6));
235+
if (p.startsWith('demo=')) {
236+
const d = decodeURIComponent(p.substring(5));
237+
code = '';
238+
if (d == '1') {
239+
for (let i = 0; i < 300; i++) {
240+
let l = 20 + (80 * (i % 10));
241+
let t = 30 + (30 * Math.round(i / 10));
242+
code += '<button style="width:80px;height:30px;position:absolute;left:' + l + 'px;top:' + t + 'px;">Button</button>';
243+
}
244+
}
245+
}
235246
}
236247

237248
await customElements.whenDefined('dock-spawn-ts');

0 commit comments

Comments
 (0)