File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 17
17
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
18
18
<script src="../smart-core/source/smart.core.js"></script>
19
19
<link rel="stylesheet" href="../smart-core/source/styles/smart.default.css" type="text/css" />
20
+ <script>
21
+ window.onload = function () {
22
+ const basePath = '/images/',
23
+ carouselSquare = document.getElementById('carouselSquare'),
24
+
25
+ carouselSquare.dataSource = generateDataSource(7);
26
+
27
+ function generateDataSource(items) {
28
+ let dataSource = Array(items).fill({});
29
+
30
+ dataSource.forEach((element, index) => dataSource[index] = { image: `${basePath}carousel-square-${index + 1}.jpg` });
31
+ return dataSource;
32
+ }
33
+ }
34
+ </script>
20
35
<next-code-block></next-code-block>
21
36
</template>
22
37
</custom-element-demo>
You can’t perform that action at this time.
0 commit comments